how are u accessing yr servlet? one of teh reasons cd be like teh doPost() method is missing.
doPost() is there. what else needs to be set ? there seems to be a whole bunch of *.xml configuration files.
it wd help if u cd post yr servlet here, and also the htm/whatever from which its invoked.
Here are the code snippets. The client is a simple Applet and the Server is a simple Servlet.
smsurlcon = (HttpURLConnection) nurl.openConnection();
OutputStream os = smsurlcon.getOutputStream();
String sout = "param="+cmd1+","+cmd2+","+cmd3;
is = smsurlcon.getInputStream();
//is = nurl.openStream();
int i = 0;
while (!(is.available()>0)&& i < 10)
System.out.println(" waiting " + i);
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
System.out.println(" Entering doPost()");
System.out.println("Content type: "+request.getContentType());
try using smsurlcon.setRequestMethod("POST");
tried using setting the method to "POST", which by the way does not have anything to do with the server/Tomcat .
The client(Applet) uses "POST" as soon as the OutputSream is opened.
I think , the problem is solved. There were two copies of the same Servlet classes in the JBoss jar file and the Tomcat war file. I do not always update the JBoss jar file as that requires a restart (hot deploy is broken in JBoss EJB). The Tomcat war file can be hot deployed. Unfortunately, Tomcat picks up the Servlet class from the EJB jar file rather than the Tomcat war file - I guess that is the price paid for using the same JVM. Although I think it can be corrected.
Yes, I have read abt issues caused by Unified Class laoder in JBoss 3 and above. Seems the solutions lies in scoping using ear files and jboss-app.xml. Haven't tried it though.