dcsimg
How to use servlet inside Jsp file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tim_Wang
Posted On:   Saturday, November 19, 2005 04:11 PM

I use inside a Jsp file "xxx.jsp", for example.

The Jsp code is like:



...





When first time requesting this page, servelt is executed and reponses, but after submitting the page again, the servlet seems not work.

Do I need to use doPost instead of doGet?

Thank you in advance.

Re: How to use servlet inside Jsp file

Posted By:   alan_do  
Posted On:   Wednesday, November 23, 2005 10:12 PM

i am surprised that it worked for you at all. you should've gotten a response already committed error because you already have a jsp compiled and responded, then tried to execute another request to a separate servlet. please double check.


the way to do it correctly is to use JSTL c:import tag (or some other http request tag) to call the servlet.

About | Sitemap | Contact