Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet can call through main class in java  RSS feed

 
Rajesh Pandey Rajesh Pandey
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Freind

I am Rajesh Pandey from india delhi .I am sharing one problem that is it possible that we can call a servlet from main class in java. As i know that ejb can be call from main using jndi .But in case of servlet how is it possible.Thanks in advance..


With Best Regards
Rajesh Pandey
email:-info@sixthquadrant.com
mob :--+919811903737
India Delhi
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh,
What would you expect to have the servlet do from the main class?

If you want a web page back, you can use a URLConnection to call the servlets URL. If you want to test it, you can pass a mock/dummy request/response in.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!