• Post Reply Bookmark Topic Watch Topic
  • New Topic

reset method in struts1.3

 
mohit dhiman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
difference between

public void reset(ActionMapping mapping, ServletRequest request)

and

public void reset(ActionMapping mapping, HttpServletRequest request)

in my application only 2nd case reset method is working, but there is no reset method gets called when i am using the first case
 
Joe Ess
Bartender
Posts: 9370
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difference between the methods is the types they will handle.  Can you think of an circumstance where Struts would be dealing with a ServletRequest that is not an HttpServletRequest?
 
mohit dhiman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but why reset(ActionMapping mapping, ServletRequest request) is not being called but reset(ActionMapping mapping, HttpServletRequest request) is being called at container startup.
 
Joe Ess
Bartender
Posts: 9370
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mohit dhiman wrote:but why reset(ActionMapping mapping, ServletRequest request) is not being called but reset(ActionMapping mapping, HttpServletRequest request) is being called


I refer you to my previous answer.

mohit dhiman wrote:
at container startup.


I don't know why this method would be called at container startup.  As far as I know, the only time it is called is before the controller populates a form (see here).
 
mohit dhiman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks buddy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!