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!

HTML & Servlets

Status
Not open for further replies.

vellakaran

Programmer
May 22, 2003
9
0
0
CA
Hello,
Here is the problem: I'm getting a error saying that the servlet is not available. I'm trying to call the servlet from an HTML form. I'm using Tomcat 4.1 and i was wondering where specifically do i have to put the servlet and the HTML form. My servlet compiles. also in my HTML form i have this code: <Form Method = &quot;GET&quot; Action = &quot; is this the right way to invoke the servlet?? any suggestions would be appreciated!

cheers!
 
I think I can provide with a suggestion.
1. First Start the Tomcat Server
2. Open any browser's window and in the address bar type : 3. Hope this will show u the index page of the server a let u in on a little bit of directory structure.
4. This should enable u to create a servlets folder in folder where the index page is existing.Place all your sevlets the servlets folder and then try to give a path.
 
I'm not sure about Tomcat but i have used Blazix and you need to tell the servlet engine where the servlet is and the url pattern it should recognise.

You point your action to the patttern specified. Your servlet could be called 'servlet1.class' but the pattern might be '/login' - in which case the tag should be

<form action=&quot; method=&quot;POST&quot;>

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top