This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

can't access servlet from jsp  RSS feed

 
jawwad ahmed
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All;
Well i am trying to access servlet from jsp.My jsp file is putten in
path
g:\tomcat4\webapps\examples\web\client\login\Login.jsp
My servlet is putten in the path
g:\tomcat4\webapps\examples\WEB-INF\classes
My jsp code is as follows.
<form method="GET" action="../../HelloWorld">
<center>
<table border>
<tr><td>USERDID:</td>
<td><input type=text name=userid></td></tr>
<tr><td>PASSWORD:</td>
<td><input type=password name=password></td></tr>

<table>

<br><INPUT TYPE=SUBMIT VALUE=SUBMIT>

</center>
</FORM>
Thanks
Jawwad Ahmed
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the action attribute of the form should probably be:
/servlet/yourservletname
rather htan what it is now unless you do know well how to set the web.xml correctly so that the servlet can be got from:
yourserver:8080/examples/web/yuorservlet
or whatever
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!