Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Its strange..my servlet not getting invoked..

 
satyendra adhikari
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello!
within a java programme i am trying to invoke a servlet with url..
URL url=new URL("http://satya:8080/des/servlet/LoginServlet");
URLConnection urlconn=url.openConnection();
urlconn.setUseCaches(false);
urlconn.setDefaultUseCaches(false);
urlconn.setDoInput(true);
urlconn.setDoOutput(true);
pw =new ObjectOutputStream(urlconn.getOutputStream());
i have been using this for long but this time i dont know what is happening here..
i am getting this on tomcat
2002-01-11 01:11:11 - Ctx( ): 400 R( /) null
if i am typing servlet URL on browser it gets initiliased...
does someone please suggest what is the cause..
thankx...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you writing out to "pw"?
 
satyendra adhikari
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello!
I am writing two objects typically DES key and Encrypted message objects and after that i just close down the pw and connection.But i have seen that if i read something from my servlet after writing to it it is working fine..and there is no problem..so is it necessary to get something from a servlet after giving it something??
and also i searched the web for this and at some places i found it mentioned as a bug in tomcat??
is it??
thank you for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic