• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Problem referencing a servlet from a html  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys ,

I'm having a problem as shown here http://stackoverflow.com/questions/15908994/call-servlet-from-jsp-and-use-if

Basically I want to send the info from me html form to a servlet , upon reaching the servlet i want to then display a button to let the user proceed to a jsp page .


I'm not sure where I'm going wrong , I've googled several tutorials but can't find anything that works , I'm assuming I've left something simple out , ...in my html the form is declared as this <form id="form" name="form" method="post" action="RegistrationServlet" >


the xml looks like this


 
Marshal
Posts: 5965
916
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ventris Learchus wrote:
<servlet-path>Quiz/Quiz.RegistrationServlet</servlet-path>


This has to be <servlet-class>fully.qualified.ClassName</servlet-class>

Example for if your RegistrationServlet class is packaged in 'com' package:
<servlet-class>com.RegistrationServlet</servlet-class>
 
Ventris Learchus
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i made the change you suggested and it seem to have worked however I am now getting the following error
screen.png
[Thumbnail for screen.png]
 
Devaka Cooray
Marshal
Posts: 5965
916
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What that simply says is your form sends data in HTTP POST request, and your servlet does not have a doPost(-) method declared in it.
 
Ventris Learchus
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a snippet of the servlet code
 
Ventris Learchus
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nvm , after adding a dopost method i cleaned the solution and that fixed it
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!