Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Struts-JSP execute action class without manual submission

Posted on 2004-03-30
4
Medium Priority
?
692 Views
Last Modified: 2007-12-19
In a STRUTS-JSP , how do we submit an action without submit step/without user interaction. When a JSP is run , would like the *.do (action class) to be executed automatically. I gues similar to onload of JSP. But I am not sure which method needs to be called and what attributes need to be passed. Exlplanation of the flow and an example will be of great help

I understand the workflow of defining an ActionForm, associate it with a submitting JSP page, passing it to an Action and forwarding the results to a view JSP page; what I'm not seeing is how to generate a dynamic JSP page without the submit step?...

Thanks
0
Comment
Question by:ramanirp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Accepted Solution

by:
jarasa earned 252 total points
ID: 10722048
Hi, not sure if this is what you want.

You can do that with Javacript, just place a script right before </BODY> like this:

<BODY>
.......
<FORM name="yourForm" action="yourNextAction">
<Input type="Hidden" name="Field1" value=<%= request.getParameter("FIELD1") %>
</FORM>
.......
<Scrtipt>
top.document.yourForm.submit();
</Script>
</BODY>

This will automatically redirect to yourNextAction.

Javier
0
 
LVL 14

Assisted Solution

by:kennethxu
kennethxu earned 248 total points
ID: 10725708
>> how to generate a dynamic JSP page without the submit step?
simple call the url that mapped to the action class.e.g
http://www.yoursite.com/youapp/youaction.do
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question