aspose file tools
The moose likes Struts and the fly likes Simple Struts Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Simple Struts Question" Watch "Simple Struts Question" New topic
Author

Simple Struts Question

Scott Maclary
Ranch Hand

Joined: May 11, 2005
Posts: 34
If I have the following entry in struts-config.xml:



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

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)?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Simple Struts Question
 
Similar Threads
Navigating with form actions in Struts
action mapping for pre-login
Struts handle first request.
Struts JSP/ActionForm error
what this input attribute means in action element of struts-config.xml