| Author |
How to fire an action in a JSP
|
Sagar Shroff
Ranch Hand
Joined: Jun 07, 2011
Posts: 196
|
|
Hello Ranchers i m facing a requirement which i am not able to solve.
I will explain you my problem with a simple example
<form action="goAction">
.
.
.
.
<input type="submit"/>
</form
When i do submit the goAction will be searched in struts.xml .
So now my requirement is like i am having a index.jsp where i am checking some condition based on the status of session and gives a message to the user after giving the message
i want it to redirect to an Action class.
I tried with response.redirect and forward like response.redirect("goAction") but it does not go to action class
|
OCJP-90%,OCPWCD-95%
|
 |
harshvardhan ojha
Ranch Hand
Joined: Jul 26, 2007
Posts: 157
|
|
sagar why don't you just forward it to the action like
and anyways all .do action will be interrupted by servlet, so it will reach your action class.
|
 |
Sagar Shroff
Ranch Hand
Joined: Jun 07, 2011
Posts: 196
|
|
thanks it worked
|
 |
 |
|
|
subject: How to fire an action in a JSP
|
|
|