Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing values through html

 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your form action is wrong. It needs to match the URL mapping of the servlet in the web.xml deployment descriptor.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying bear
Can you please say how can i do that.

My web.xml is here
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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