You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/12/17 13:19:47 UTC

DO NOT REPLY [Bug 25588] New: - Tag don't recognize current Struts module for the attribute 'action'

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25588

Tag <html:form> don't recognize current Struts module for the attribute 'action'

           Summary: Tag <html:form> don't recognize current Struts module
                    for the attribute 'action'
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: flaviostutz@hotmail.com


The html:form tag don't recognize the current Struts module.

   Example:
   I have an action-mapping in the module "author" named "loginAuthor".
   When I try to access a very simple JSP (/author/login.jsp) with a 
<html:form action="/loginAuthor">, Struts gives an error saying "Cannot 
retrieve mapping for action /loginAuthor".
   What is strange though is that I can go to /author/loginAuthor.do and Struts
finds the mapping then. It seems like the <html:form> tag doesn't realize that 
it is in the "author" module.

Here are the code samples:
-----------------------from web.xml--------------------------------
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>

    <init-param>
      <param-name>config/author</param-name>
      <param-value>/WEB-INF/struts-author-config.xml</param-value>
    </init-param>

    <load-on-startup>2</load-on-startup>

  </servlet>

  <servlet-mapping url-pattern='*.do' servlet-name='action'/>

------------  from struts-author-config.xml -----------------------
        <action-mappings>
                <action path="/loginAuthor"
                     type="com.fullscreen.web.pubtool.author.LoginAuthorAction"
                        input="/login.jsp">
                        <forward name="next" 
                            path="/loadAuthorItems.do"                        
                            redirect="true"/>
                </action>
        </action-mappings>


------------------------- from author/login.jsp ---------------------------

<%@ page language="java" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>

<html:html>

    <html:form action="/loginAuthor" method="POST">

        Email address: <input type="text" name="email">
        Password: <input type="password" name="password">

        <html:submit/>

    </html:form>

</html:html>

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