1000 Java Tips ebook
Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java
programming articles and tips. Please take your copy here.
Take your copy of free "Java Technology Screensaver"!.
Easy Learn Java: Programming Articles, Examples and Tips - Page 281
1060 Stories (530 Pages, 2 Per Page)
Use a Java Applet to access remote Web services
In this article, I show you how to create a system that uses your browser to
request and interact with Web service data from an arbitrary source. First, I
into the Web page. Finally, I create a servlet that acts as a proxy for
This article assumes that you are familiar with Java technology and (to a
lesser extent) with XML. In addition to a Java development environment such as
J2SE 1.4 or above, you'll need several pieces of software for this article. To
send and receive the SOAP messages, you'll need the SOAP with Attachments
Application Program Interface (API) for Java, or SAAJ (see "Send
and receive SOAP messages with SAAJ" for help in setting it up) and
you'll need a servlet engine such as IBM® WebSphere® Application Server or
Apache Tomcat to run the servlet. See Resources
for links to the various software packages you'll need.
A simple request
Applets have always been designed to play in a "sandbox" in which they
can't hurt anything on a user's system, so their security is tighter than that
of their server-based application counterparts. But what if you want an applet
that can make arbitrary Web requests? This article shows you how
to work around this problem by building a server-based proxy. It also shows
First, take a look at the request you're ultimately going to make from the
applet. Although this technique works for any kind of data you can pass through
a URL, this article focuses on Web services, so I'll start with the simple SOAP
message in Listing 1.
3 comments | | Score: 0
Posted by Anonymous on Friday, December 17, 2004 (00:00:00) (4319 reads)
How to use Java built-in profiler.
Question:Can you give good examples on using of Java built-in profiler?
Answer: Yes, read below...
One of the features of Java is automatic allocation and deallocation of
memory as objects are created and then no longer referenced. Applications that
have a lot of object creation and especial creation of very large objects can
stress this process of memory management called garbage collection (GC), and
thus can cause the application to perform poorly.
This do*****ent is meant to help you use the -Xrunhprof command to find which
objects are filling up the heap and what classes are calling them.
The -Xrunhprof flag
Built into all Java is the hprof tools that allow tracing and profiling
information to be output to a file. From a heap debugging standpoint, this tool
can provide some basic information, that is fairly easy to interpret. There are
two basic functions that can be profiled, one is the live SITES, and the other
is to DUMP the entire heap. Each of these then has information that points to a
java trace of the object allocation.
The whole 4-pages aryicle you can read here...
comments? | | Score: 0
Posted by Anonymous on Wednesday, December 15, 2004 (00:00:00) (4086 reads)