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

Simple Struts Question

Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have the following entry in struts-config.xml:

...what page will be displayed when the url is ""?

I can see what would happen if someone were to submit a form to this URL how it would react (code would be processed and if there was a "failure" it would display the "Failure" case - same with the success case).

But what about just displaying the url which maps to the action (without a post to the action)?
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An action will behave the same way regardless of whether it's called from a form submission or as a URL. The execute method will be called and the logic there will determine whether the "success" or "failure" forward is returned.

It's customary to have two different actions for each form: One to prepare for its display and another to process the results of the form submission.
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic