File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat & XML-rpc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat & XML-rpc" Watch "Tomcat & XML-rpc" New topic

Tomcat & XML-rpc

Joe Schaffer

Joined: Mar 24, 2004
Posts: 29
Hi everybody,

Actually I have some problems to understand the real requirements for the XML-RPC. What I later on want to do is to transport information in an XML format and transform them on my server into SQL data for further tasks.

The simple program I am looking for is the Servlet Class - HelloServer. This contains the doPost/doGet functions. Accessing this should be performed by a commandline call "java HelloClient" .

The client should then trigger a "System.out.println" on the Server Side which will be displayed in the Tomcat server window. I think this should only be a few lines. My actual code is the following:

My Error Message is on the HelloClient command line: Werver returned HTTP response code: 500 for URL: http://localhost:9090/HelloServerServlet/servlet/HelloServer

On the tomcat side I get
- Ctx(/HelloServerServlet) : Exception in preInit HelloServer - java.lang.InstantiationException: HelloServer
at java.lang.Class.newInstance0( There is none of my classes mentioned! Mentioned are Class, ServletHandler, ContextManager, Tomcat3Adapter, Http11Processor, Http11Protocol, PoolTcpEndpoint, ThreadPool, Thread all have the .java ending

Thx for your help


William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
1. Put your servlet class in a package
2. create the correct web.xml for your application, specifying the servlet class and the url-mapping you will be using.
3. Read this FAQ entry on the invoker servlet to understand why you should NOT be using a URL with /servlet/ in it.
Joe Schaffer

Joined: Mar 24, 2004
Posts: 29

Thanks for your help. I additionally found an error in my code. I haven't initialized the XML-RPC

THis is missing in the server:


I agree. Here's the link:
subject: Tomcat & XML-rpc
jQuery in Action, 3rd edition