Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Struts popup problem

Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am having the following scenario in my project.I have a main.jsp which has a popup page named popup.jsp.The popup.jsp file has a submit button which leads to a action class for logic processing.The action class has 2 forwards one for error and other for success.If error is reported the error message should popup in a message window.If success is reported,the forward JSP page should open in place of the parent page(i.e. main.jsp).
How to achieve the above mentioned scenario?Please reply to this as soon as possible.Thanks in advance.
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is definitely NOT an easy task. keep in mind errors are accessed each request and will be lost if the page is redirected. the only way i can think of achieving this result is to pass the error keys into a javascript method that is to be called onLoad of the page. if errors exists, onLoad is called (use jsp or jstl for this check). the onload methods will do a window popup then document.write the error values looked up by the keys using jstl fmt:message or struts bean:message tag).
expectation is the root of all heartache - shakespeare. tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic