• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet not getting invoked  RSS feed

 
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..<br>
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());<br>
i have been using this for long but this time i dont know what is happening here..<br>
i am getting this on tomcat<br>
2002-01-11 01:11:11 - Ctx( ): 400 R( /) null<br>
if i am calling it directely from browser it gets initiliased<br>
does someone please suggest what is the cause..<br>
thankx
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you never call connect() or
getContent() on the URLConnection object.
Originally posted by satyendra adhikari:
hello!
within a java programme i am trying to invoke a servlet with url..<br>
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());<br>
i have been using this for long but this time i dont know what is happening here..<br>
i am getting this on tomcat<br>
2002-01-11 01:11:11 - Ctx( ): 400 R( /) null<br>
if i am calling it directely from browser it gets initiliased<br>
does someone please suggest what is the cause..<br>
thankx
 
satyendra adhikari
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am calling it like here..
URLConnection urlconn=url.openConnection();
anyway i have been using it for many months..
it just not working..
bfn
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!