Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoking Servlet thru URL ??

Status
Not open for further replies.

db2sachin

Programmer
Jun 9, 2003
24
0
0
AU
Can I call a sevlet from an HTML page throught its URL directly without having any submit button on the HTML form ?
 
hi

yes you can but the url is function the way you map the servlet in your application server.

if you don't map the servlet the standard url for calling a servlet is :


if you have a servlet whose name is MyServlet and package is com.mypackage...



manu0
 
Again, the answer is yes. But it does sometimes depend on the server that hosts the servlet. And some servlets are not necessarily in packages. For example, if you had a servlet called Hello.java, with the jakarta server installed on your machine. then u would call the servlet like so:

where localhost is your machines IP number and port# is the port to connect to. /examples/servlet is the default path where the jakarta server stores its servlets.

Hope that helped.
Kunal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top