Solved

Struts-JSP execute action class without manual submission

Posted on 2004-03-30
4
690 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 63 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 62 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This article outlines the struggles that Macs encounter in Windows-dominated workplace environments – and what Mac users can do to improve their network connectivity and remain productive.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
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…
Suggested Courses

630 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