• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • 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: 1514
  • 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
 
Liar, liar, pants on fire! refreshing plug:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic