You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by su mo <su...@gmail.com> on 2005/11/24 07:51:29 UTC
Action executing twice
Hi,
Struts action is calling execute method twice due to presence of "#" in the
input jsp file
I have the HTML table with <td> like <td background="#23.jpg">.
I could not understand what is the relationship between these two. Removing
this
# character makes the Struts action executing only once.
I have attached the sources if anyone can help me to understand.
Best Regards
Su Mo
Re: Action executing twice
Posted by Laurie Harper <la...@holoweb.net>.
'#23.jpg' is an anchor -- a link to a point somewhere in the current
document. So when the browser loads your page, it sees that you've asked
for a background image and tries to load it from the URL you've
specified, which in this case is the page itself, not what you intended.
L.
su mo wrote:
> Hi,
>
> Struts action is calling execute method twice due to presence of "#" in the
> input jsp file
> I have the HTML table with <td> like <td background="#23.jpg">.
>
> I could not understand what is the relationship between these two. Removing
> this
> # character makes the Struts action executing only once.
>
> I have attached the sources if anyone can help me to understand.
>
> Best Regards
> Su Mo
>
>
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE struts-config PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
>
> <struts-config>
> <!-- Form Bean Definitions -->
> <form-beans>
> <form-bean name="sampleActionForm" type="com.company1.strutsSample.form.SampleActionForm">
> </form-bean>
>
>
> </form-beans>
>
>
>
> <!-- ========== Action Mapping Definitions ============================== -->
> <action-mappings>
>
> <action path="/addSample" type="com.company1.strutsSample.action.SampleAction"
> name="sampleActionForm" scope="request"
> validate="false" input="/pages/sample.jsp">
>
> </action>
> </action-mappings>
>
>
> <message-resources parameter="ApplicationResources" null="false"/>
>
> <!--<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
> <set-property
> property="pathnames"
> value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> </plug-in>-->
>
> </struts-config>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org