• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Can't enter in a jsp.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic