struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: Problems when not using html:form
Date Mon, 02 Feb 2004 15:53:01 GMT
I think that if you just fully-qualify the action of your form, it would work.

That is,
<form name="LoginForm" method="post" action="/Login.do" focus="userName">

Joe


At 10:10 AM -0500 2/2/04, MichaelBoucher@edgil.com wrote:
>Hi folks,
>
>For a variety of reasons, I can't use the struts HTML tags in my jsps.  To
>get things started, I got it working using html:form, but now I have to
>remove that tag.  So, I'm trying to figure out how to specify the form to
>correctly call my action.  The jsp gets displayed correctly, but when I
>click the submit button, I get an invalid path error.
>
>Here's what my jsp looks like...
>
>    <!-- html:form action="Login" focus="userName" -->
>    <form name="LoginForm" method="post" action="Login.do" focus="userName">
>       <table border="0" width="100%">
>       <!-- input fields removed for brevity... -->
>       <tr>
>          <td align="right">
>             <input type="submit" name="Login" property="Login" value="Log
>In" >
>          </td>
>          <td align="left">
>             <input type="submit" name="Reset" property="Reset" value
>="Reset" >
>          </td>
>       </tr>
>       </table>
>    </form>
>
>And here's the relevant portion of my struts-config file...
>
>   <action-mappings>
>     <action path="/Login" type
>="com.edgil.TransactionMgr.Actions.LoginAction" name="LoginForm" scope
>="request" input="/jsp/Login.jsp">
>       <forward name="Main" path="/jsp/Main.jsp" redirect="false"/>
>     </action>
>   etc...
>
>
>When I click submit, here's what I get:
>
>Apache Tomcat/4.0.6 - HTTP Status 400 - Invalid path /jsp/Login was
>requested
>--------------------------------------------------------------------------------
>type: Status report
>message: Invalid path /jsp/Login was requested
>description: The request sent by the client was syntactically incorrect
>(Invalid path /jsp/Login was requested).
>
>I suspect that /jsp/... is coming from the fact that the jsp is found in a
>directory, called jsp, which is at the same level as WEB_INF.
>
>So, what do I need to specify in the form to trigger the action correctly?
>
>Thanx!
>
>Mike
>----
>Mike Boucher                  mboucher@edgil.com
>Edgil Associates              www.edgil.com
>
>"Don't take life too seriously, you'll never get out of it alive!"
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org


-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
       "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
             -- Jef Raskin

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message