wood burning stoves 2.0*
The moose likes Servlets and the fly likes Passing values through html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Passing values through html" Watch "Passing values through html" New topic
Author

Passing values through html

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
hi
i am unable to get the appropriate output to this program
First i entered the values in html form and when i click submit button i get this error in my browser.

Firefox can't find the file at /C:/Tomcat/webapps/adi/WEB-INF/classes/adi1?username=adeeb&password=adeeb&B1=Submit.


But the html file as well as the class file are in the same folder.

My html code is here


and the servlet code is here



Somebody please help.
Thanks & Regards
In Advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60732
    
  65

Your form action is wrong. It needs to match the URL mapping of the servlet in the web.xml deployment descriptor.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
Thanks for replying bear
Can you please say how can i do that.

My web.xml is here
adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
Ok bear i got the solution but, how can i do the same when i am using an applet.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60732
    
  65

Applets are a separate concern. I do not see how they factor into this at all.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12753
    
    5


There is one problem - ALL classes used in servlets should be in a package to avoid hard to debug problems.

Read this FAQ entry on the invoker servlet to undrestand why.

Bill
 
Don't get me started about those stupid light bulbs.
 
subject: Passing values through html
 
Similar Threads
Calling JNDI from JSP
HTML form
Can't access HTML form page in browser
About create a session!
passing parameters from JSP to a Servlet