This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Dynamic Submission of a page using Struts

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to submit a page dynamically using Struts tags?
Right now I'm having two pages A & B.
Page A calls an action class, which will call Page B on success
Page A -> action class1 -> Page B
But I would like to introduce an interim page A1 (between A & B), which will show some text message to the user.
1. Page A calls an action class on submit, which will redirect to Page A1 (on success)
2. Then Page A1 calls another action class dynamically (no user submission), which will re-direct to Page B.
User Submitting Page A -> action class1 -> Auto Submission of Page A1 -> action class2 -> Page B
Introducing Page A1 to show some text message to user, when the application processing at the back end.
But I don't know how to submit Page A1 dynamically. Tried to submit using response.sendRedirect, RequestDispatcher & java script submission. Is there any one help me on this?
Thanks in advance.
[ April 25, 2003: Message edited by: Bala Rajamani ]
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understand you correctly, you want page A1 to automatically forward itself to the new action after a set period of time? There are a few ways to do that, both on the client side. Note that niether is 100% compatible with all browsers, but you can use both in the same page - and get close.
Place in your header, which forwards to a target, index.jsp in this case, after a wait of 15 seconds.

The 2nd method is to have a javascript funtion, such as redirect() below, called from the <body> tag onLoad. Redirect just pauses a set time, and then calls another function such as go_now(), which does the forward.

Hope this helps.
 
Bala Raj
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Paul. But I can�t use both the solutions, because of the following reasons.
1) If I use javascript submit I loose request object, which I need to forward for the action class2.
2) My whole application is using standard header information (Meaning only one header.jsp) for the whole application.
I want to display Page A1 until I get reply from action class2.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it is just to show an intermediate message, i would suggest the same page to show the intermediate message(instead of using a different jsp).
just i put the whole screen in <div> and made it visible till the submit, after the submit the rest i made invisible and put a message in the same screen. I am not sure if it works fine in netscape navigator...
 
Quick! Before anybody notices! Cover it up with this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic