wood burning stoves 2.0*
The moose likes Servlets and the fly likes problem in calling servlets from html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "problem in calling servlets from html" Watch "problem in calling servlets from html" New topic
Author

problem in calling servlets from html

shabbir zakir
Ranch Hand

Joined: Nov 12, 2000
Posts: 183
i can call my servlet throgh my browser. But when i call my servlet from a html page it gives the error page not found. The foollowing is the html tag.Please remind me what i ma forgetting.
thanks in advance.
<Form method=GET ACTION="examples/servlet/EchoParmsServlet">

<Table BORDER=0 CELLPADDING=2 CELLSPACING=0 WIDTH=550>
<TR VALIGN=TOP>
<td>TO:</TD>
<TD>
<select NAME="TO" SIZE=1>

<OPTION VALUE="CS"> CUSTOMER SERVICE
<OPTION VALUE="EX"> EXECUTIVE
<OPTION VALUE="FI">fINANCE
<OPTION VALUE="HR">HUMAN RESOURCES
<OPTION VALUE="IT">INFORMATION TECHNOLOGY
<OPTION VALUE="MK">MARKETING
<OPTION VALUE="FA">FACILITIES
<OPTION VALUE="PC">PURCHASING
<OPTION VALUE="SP">SHIPPING
</SELECT>
</TD>
</TR>

<TR VALIGN=TOP>
<td>YOUR NAME:</TD>
<TD><INPUT NAME="EMAIL" TYPE="TEXT" SIZE=20></TD>
</TR>


<TR VALIGN=TOP>
<tD>PHONE NUMBER:</TD>
<TD>
<INPUT NAME="PHONE" TYPE="TEXT" SIZE=20>
<INPUT NAME="DAYPHONE" TYPE="RADIO" VALUE="1" CHECKED>DAY
<INPUT NAME="DAYPHONE" TYPE="RADIO" VALUE="0" EVENING
</TD>
</TR>
<TR VALIGN=TOP>
<TD COLSPAN=2>
<FONT SIZE=-1>
PLEASE CHECK ALL THAT APPLY: <BR>
<INPUT NAME="CATEGORY" TYPE="CHECKBOX" VALUE="1">
COMMENT ONLY,NO RESPONSE NECESSARY <BR>
<INPUT NAME="CATEGORY" TYPE="CHECKBOX" VALUE="2">
PLEASE ADD ME TO YOUR MAILING LIST
</FONT>
</TD>
</TR>

</TD>
</TR>

<TR VALIGN=TOP>
<TD>&NBSP;</TD>
<TD>
<INPUT TYPE="SUBMIT" VALUE="SEND">
<INPUT TYPE="RESAET" VALUE="CLEAR">
</TD>
</TR>

</TABLE>

</FORM>

Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Try typing in the full path "http://localhost:8080/examples/servlet/EchoParmsServlet"
Also, if yourservlet is part of a package, putthe package name in front of the classname. i.e yourpackagename.EchoParmsServlet

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Sophia Oscario
Greenhorn

Joined: May 14, 2001
Posts: 22
Have you check the directory of your HTML file and your servlet file ?
Make sure that you write the directory correctly.
If it doesn't work, check your servlet engine and your web server.
Is it worked on different port ?
By the way, what servlet engine do you use ?

------------------
** Science belongs to the world **


** Science belongs to the world **
Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124

Hello,
I am not sure but I feel that ur doing some mistake with the path in the html page
bcoz I havent seen anytime url like this
examples/servlet/EchoParmsServlet
it should be /servlet/examples/EchoParmsServlet
So just check it out .

------------------
Sandeep Jain


Try and Try Till u succeed<br /> <br />Sandeep Jain
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in calling servlets from html
 
Similar Threads
Rounding off $$ amounts
raw HTML in Mozilla
Redirct page in Tilse with JSTL
I am unable to find error in this program.
Forms and Table cells - are they compatible?