• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet not getting invoked

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic