Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 6210 invoked from network); 1 Mar 2005 18:40:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Mar 2005 18:40:39 -0000 Received: (qmail 4380 invoked by uid 500); 1 Mar 2005 18:40:25 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 4268 invoked by uid 500); 1 Mar 2005 18:40:24 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 4253 invoked by uid 99); 1 Mar 2005 18:40:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from viefep12-int.chello.at (HELO viefep12-int.chello.at) (213.46.255.25) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 10:40:23 -0800 Received: from gwextensa ([62.178.82.35]) by viefep12-int.chello.at (InterMail vM.6.01.03.05 201-2131-111-107-20040910) with ESMTP id <20050301184016.DGA16598.viefep12-int.chello.at@gwextensa> for ; Tue, 1 Mar 2005 19:40:16 +0100 From: =?iso-8859-1?Q?G=FCnther_Wieser?= To: "'Struts Users Mailing List'" Subject: RE: html:form complains of bean missing Date: Tue, 1 Mar 2005 19:40:12 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcUeitvyCBFYc9zBSiaXqicfg13OZAAAopCg In-Reply-To: <34385CBC5E8E664EB0007814636AB36A012D58A5@exchange1.dimensions.com> Message-Id: <20050301184016.DGA16598.viefep12-int.chello.at@gwextensa> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hi 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 session. 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 requested. if you want the code for this, let me know, i can provide it. kr, guenther -----Original Message----- From: Scott Purcell [mailto:spurcell@vertisinc.com] Sent: Tuesday, March 01, 2005 7:17 PM To: user@struts.apache.org 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 html:form tag: works: does not work: When I use the above I get this error in the browser: javax.servlet.ServletException: Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:495) at org.apache.jsp.main_jsp._jspService(main_jsp.java:175) But I have no reason to have a bean for this action. How does one handle this problem? Thanks Scott --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org