Why my servlet is called twice when I click a submit image on javascript?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dhanesh_Choudhary
Posted On:   Friday, May 30, 2003 02:43 PM

I have coded my jsp in the same way as it was suggested. I donot have more than one action parameter in my jsp. But wherever I submit a page to servlet It is called always called twice. I sending hidden parameter to servlet, first time it works well but since it is calling twice second time it goes with null. and servlet throw null pointer exception. Not able to understand why it is happening. Same thing is working fine with weblogic. . Here is the sample code I am using <%=request.getContextPath()%>/servlet/RCAServlet">    More>>

I have coded my jsp in the same way as it was suggested. I donot have more than one action parameter in my jsp. But wherever I submit a page to servlet It is called always called twice. I sending hidden parameter to servlet, first time it works well but since it is calling twice second time it goes with null. and servlet throw null pointer exception. Not able to understand why it is happening. Same thing is working fine with weblogic. . Here is the sample code I am using

<%=request.getContextPath()%>/servlet/RCAServlet">

   <<Less

Re: Why my servlet is called twice when I click a submit image on javascript?

Posted By:   Zac_Jacobson  
Posted On:   Friday, May 30, 2003 03:00 PM

Is the element you're calling this function from an input of type submit? That might cause double-submit, thought I'm not sure why the parameter wouldn't be passed in the second time.

What browser are you using? Perhaps not having your script tags match (one is uppercase) is causing problems.

About | Sitemap | Contact