You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Da...@vwr.com on 2005/07/01 06:14:46 UTC

strutshtml:form name issue

Hello,

I am using struts 1.0. I am upgrading my app from tomcat 3.2.3 to 5.5.9. I
am using java 1.4.0.

I have the following in the jsp

<strutshtml:form action="/xxx/enter.do">
    <strutshtml:hidden name="loginForm" property="actionType" value
="enter"/>
    <strutshtml:hidden name="loginForm" property="organization" value="
<%=orgID%>"/>
    <strutshtml:hidden name="loginForm" property="showChildRecords"/>
</strutshtml:form>

<jsp:include page="includes/functions.js" flush="true"/>
<strutshtml:form action="/xxx/EntryB2BOptions.do">
...
</strutshtml:form>

which worked fine on 3.2.3. I coped the war file directly to 5.5.9

and the second form now renders with the form name of the first.

<form name="loginForm" method="POST" action="/path/xxx/enter.do">
    <input type="hidden" name="actionType" value="enter">
    <input type="hidden" name="organization" value="XXXXXXX">
    <input type="hidden" name="showChildRecords" value="false">
</form>

<bunch of javascript>

<form name="loginForm" method="POST" action="/path/xxx/EntryB2BOptions.do">
...
</form>

the mapping looks like this

        <action    path="/xxx/EntryB2BOptions"
               type="com.xxx.web.action.EntryB2BOptionsAction"
               name="entryB2BOptionsForm"
               scope="request"
               input="/vwr/error.jsp">
               <forward name="success"      path
="/xxx/B2BOptionsInput2.jsp"/>
               <forward name="toAddCustomer"    path
="/xxx/CustomerLoginsInput2.jsp"/>
           <forward name="others"   path="/xxx/enter.do?actionType=enter"/>

        </action>

and

        <action    path="/xxx/enter"
               type="com.xxx.web.action.IndexAction"
               name="loginForm"
               scope="request"
               input="/vwr/error.jsp">
               <forward name="success" path
="/xxx/EntryB2BOptionsInput2.jsp"/>
        </action>


What in the world could be the reason for this?



_________________________________
Dave Kershaw
Lead Programmer Specialist, e-Business/Technology
VWR International, http://www.vwr.com
Phone: 610.429.5558
Fax: 610.431.8429



The information contained in this e-mail message may be privileged,
confidential and protected from disclosure. If you are not the intended
recipient, any dissemination, distribution or copying is strictly
prohibited. If you think that you have received this e-mail message in
error please e-mail the sender and delete the message. Thank you.




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


Re: strutshtml:form name issue

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: <Da...@vwr.com>

> the mapping looks like this
>        <action    path="/xxx/enter"

> I have the following in the jsp
> <strutshtml:form action="/xxx/enter.do">

In my projects, those two match exactly.  For example:
  <action    path="/editContact"
  <html-el:form action="/editContact">

I've never paid any attention to what 'name' attribute is used in the <form> 
tag, nor do I have more than one form per page, but try taking the ".do" out 
of the <html:form> tags and see if anything changes.

Also, is the 'xxx' a module name, or is it the context name?  If it's the 
name of the context, AFAIK you can leave it out.

-- 
Wendy Smoak 



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