<action path="/bar" forward="/bar.jsp"/>
My logout action mappings typically look like this:
<action path="/actor/logout" type="SessionManagerAction" parameter="executeLogout">
<forward name="success" path="/shared/main_index.jsp"/>
</action>
I would think yours would be similar except that your forward path would be to a login page instead of a main index page, and you might not be using the parameter attribute. The parameter attribute is there because I have a single action that handles login as well as logout, so it has to be parameterized.
Those books drive me crazy too. (Don't you just love the ones that say things like "Here is some code. Now, if this code was *actually meant to be used*, we would be handling errors, etc., here . . . "). They are written in three months typically, and, in my judgment, usually not edited by anyone who could pass Journalism 101.
There are exceptions though. Two I have encountered:
"Thinking in Java" (self published) by Bruce Eckel
"A Programmer's Guide to Java Certification" by Mughal and Rasmussen (my favorite Java book of all).
I actually enjoyed reading the Servlet specification as well (it used to be only 70 pages long -- then it was truly awesome).
Erik
Chuck Chopp wrote:
Erik Weber wrote:
Chuck, I think reading the Servlet specification would help you a lot! I think it is well edited, and it sure helped me a lot.
Thanks for that tip. I will head on over to Sun's web site and read over the specs themselves independent of the actual servelet container implementations.
The part that was getting me was something that was hinted at in an example in one of the books I mentioned, but the example wasn't complete enough to get working code from it.
JSP #1 accepts user credentials and the submit button invokes Action #1.
Action #1 verifies user credentials and either forwards to JSP #2 or stores errors in the request and forwards badk to JSP #1.
JSP #2 can have several functions performed with different submit buttons, most of which forward to other JSPs and one of them invokes a logout action. The part that was giving me fits was getting the logout action mapping done properly since there's no input form associated with it. Once I got it worked out properly, I could have the logout action do its task and then that action, in turn, forwarded back to JSP #1 that prompts for a login.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]