facebook

Problems while adding struts module

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #274147 Reply

    Vaneet
    Member

    HI,

    I am facing problems while adding a strus module.

    Can u please provid me a link for MyEclipse struts module tutorial.

    #274148 Reply

    Vaneet
    Member

    Hi,

    when i am trying to call a action using the following html link tag
    <html:link forward=”greet”>Go to mMI/html:link><br>

    Its giving me the following error ———-

    EVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForward named search
    at org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:467)
    at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:341)
    at org.apache.jsp.index_jsp._jspx_meth_html_005flink_005f0(index_jsp.java:111)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:84)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
    21-Aug-2007 14:22:38 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForward named search
    at org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:467)
    at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:341)
    at org.apache.jsp.index_jsp._jspx_meth_html_005flink_005f0(index_jsp.java:111)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:84)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)

    #274156 Reply

    Loyal Water
    Member
    #274162 Reply

    Vaneet
    Member

    Hi,

    I am able to run a vanilla strus app , but i am running out of luck when creating a struts module.

    Please help me in making a struts module work.

    #274169 Reply

    Riyad Kalla
    Member

    Vaneet,
    Can you post your web.xml file for me to take a look at?

    #274175 Reply

    Vaneet
    Member

    Web .xml :

    <?xml version=”1.0″?>

    <!DOCTYPE web-app PUBLIC
    “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
    http://java.sun.com/dtd/web-app_2_3.dtd”&gt;

    <web-app>

    <!– Action Servlet Configuration –>
    <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/employee</param-name>
    <param-value>/WEB-INF/struts-config-employee.xml</param-value>
    </init-param>
    <init-param>
    <param-name>config/reports</param-name>
    <param-value>/WEB-INF/struts-config-reports.xml</param-value>
    </init-param>
    <init-param>
    <param-name>config/module1</param-name>
    <param-value>/WEB-INF/struts-config-module1.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <!– Action Servlet Mapping –>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <!– The Welcome File List –>
    <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
    </welcome-file-list>

    <!– Struts Tag Library Descriptors –>
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>

    </web-app>

    #274244 Reply

    Riyad Kalla
    Member

    Vaneet,
    I think this is just a misunderstanding about how to use Struts Modules and not a MyEclipse issue.

    If you check here:
    http://struts.apache.org/1.x/struts-taglib/tlddoc/html/link.html

    note that the html:link tag has a module argument that needs to be filled in with the module you are accessing.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Problems while adding struts module

You must be logged in to post in the forum log in