• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in calling servlets from html

 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sophia Oscario
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 **
 
Sandeep Jain
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic