if you want a single point where you can check if a user is logged in or
not, you can do something like the following:
create a class "MyRequestProcessor extends TilesRequestProcessor" (in this
case it is because i use tiles) and implement the process() method.
within this method check for the login var that you e.g. put into the
in the struts-config.xml add
and everythings fine.
what you need to do in the MyReqestProcessor class is to exclude all URLs
from checking that are used for e.g. the login form, or an error message in
case something went wrong.
if you want to be very nice to your users, store the URL that the user
requested in the session, than redirect to the login form, and if everything
went fine with the login, send him to the page that he/she originally
if you want the code for this, let me know, i can provide it.
From: Scott Purcell [mailto:firstname.lastname@example.org]
Sent: Tuesday, March 01, 2005 7:17 PM
Subject: html:form complains of bean missing
First off, as I am learning Struts I just wanted to thank those, for bearing
with my learning curve and helping out so far.
Here is the issue:
I want to pass all my forms, even forms without params to the
com.skp.action.LoginAction action class, because this class handles the
"isLoggedIn" issue through a subclass of Action.
Anyway, I have a jsp page that has no params, so I have no bean to collect
user data, so I configured my action like so:
Anyway, I just want to always use the LoginAction as a "Front Controller" to
my web app, and catch the status of "logged-in" etc.
This works well, but I have to use conventional code and not the
does not work: