• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

How to do it in Struts, pls. help!

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a main jsp, let call it jsp1. jsp1 has a hyperlink; when the link is clicked, it opens another jsp window, let name it jsp2. In jsp2, there are two buttons, Submit and Cancel. When the cancel button is clicked, it goes back to jsp1 and closes jsp2 window. When the submit button is clicked, it validates the inputs; if there is no error, it also goes back to jsp1 and closes jsp2 window. If any errors occur, it displays the error messages in jsp2.
Can someone know how to implement the above requirement with Struts?

Thanks!
 
author & internet detective
Posts: 41184
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bob,
That's a lot of questions! Let's look at which Struts technologies to use for the different parts of your requirements:

"I have a main jsp, let call it jsp1. jsp1 has a hyperlink; when the link is clicked, it opens another jsp window, let name it jsp2." - javascript for pop up and struts config file for link to jsp2

"In jsp2, there are two buttons, Submit and Cancel." - html submit and cancel tags in Struts

"When the cancel button is clicked, it goes back to jsp1 and closes jsp2 window. " - again javascript to close the window and struts config for link

"When the submit button is clicked, it validates the inputs; if there is no error, it also goes back to jsp1 and closes jsp2 window. If any errors occur, it displays the error messages in jsp2." - Struts validation framework. Note that you may run into some trouble on this requirement. I don't think you can redirect to different pages easily.
 
reply
    Bookmark Topic Watch Topic
  • New Topic