• 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

Can't enter in a jsp.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody.

I have implemented an action with a "prepare()" "update()" and a "validate()" method in Struts 2.

I have mapped it like:

applicationContext.xml





I can execute the action, but the methods are called in this order (prepare() - validate() - update() ) and then, it makes thre redirect to my mainMenu, without stop and watch the jsp.

What i'm doing wrong?

Cheers.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without knowing what the "update" method returns, it's impossible to help.

Right now it sounds like it's doing exactly what it should be--if you return "success" from update() it'll go to the mainMenu action, as configured.
 
Juan Acv
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The method update() returns SUCCESS, yes.

I have read to use an action to access the form, an other to update.

It looks like it works, but now, I have this problem:



#application.types should populate a select tag, and it comes from a listener (I have read the example from Struts 2 Design and Programming: A Tutorial ) but it looks like it can't find it.

Maybe I shoud use #application['types']?

Thanks.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please start new threads for new questions.

You don't include any code or JSP at all, so it's impossible to help anyway.
 
reply
    Bookmark Topic Watch Topic
  • New Topic