File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to fire an action in a JSP

 
Sagar Shroff
Ranch Hand
Posts: 209
Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
harshvardhan ojha
Ranch Hand
Posts: 157
1
Android Java MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 209
Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks it worked
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic