• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting teh same JSP

 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have simple struts JSP and am using struts validation framework for validating the user input...
ON ce, we enter emplooyee name in the JSP, it will validate the user input
for required, special chars, spaces, .. I am displaying the error messages as pop-ups..
Now my doubt is , after the validation is fine, i shold get the same page, with some data displayed in the same page..
how can I achieve this..
thanks
Raman
[ October 07, 2003: Message edited by: M K Raman ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the validation is successful you should then be finding out what the forward is in your <action/> elements in the struts-config.xml file. So you might have something like
<action....
..>
<forward name="valid" path="/page.jsp" />
</action>
In this example, page.jsp is the same page, so when you come back to this page, you should have some data, a bean, or some request/session/application objects that you can deal with that were not there before.
So somewhere in your JSP page you would perform some logic to determine whether or not you are to display your data.
This is, at least, how I would approach it being somewhat new to STRUTS myself. But if someone has a better approach I would be happy to hear it.
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot. I got ur point and am able to implement the same...
[ October 07, 2003: Message edited by: M K Raman ]
[ October 07, 2003: Message edited by: M K Raman ]
reply
    Bookmark Topic Watch Topic
  • New Topic