If an action is used in a form tag, it is expected that it has a form
attribute defined for it. Otherwise, Struts does not know where to put the
data posted from the form.  In your case, you don't have much of a form or
need to store posted data.  You could redefine as a link rather than a form.

Steve

 -----Original Message-----
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 19, 2003 8:47 AM
 To: Struts-Users
 Subject: Exception if no form in my action mapping - why?
 
 
 Hi;
 
 When I set an action mapping as this (no form):
     <action path="/Logout" type="net.windward.store.LogoutAction">
         <forward name="next" redirect="true" path="/var/login.jsp"/>
     </action>
 
 It threw an exception. When I added a from like this:
     <action path="/Logout" 
 type="net.windward.store.LogoutAction" name="loginForm">
         <forward name="next" redirect="true" path="/var/login.jsp"/>
     </action>
 
 It worked. Any ideas?
 
 In my .jsp I have:
 <html-el:form action="/Logout" styleClass="whiteBkgnd">
     <html-el:submit property="submit" value="Logout"/>
 </html-el:form>
 
 thanks - dave
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to