• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

problem in calling servlets from html

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>

 
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 **
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic