facebook

Problem with Struts

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #201256 Reply

    I am a newbie but I think I’ve done everthing right. I’m using the latest versions:
    Eclipse 2.1.2/MyEclipse 2.6.100/Tomcat 5

    I am doing the following:

    New->Project->J2EE->Web Module Project
    Name: Test
    <Finish>

    Right-click on Test, MyEclipse->Add Struts Capabilities
    Take Defaults
    <Finish>

    Right-click on Web Root->New->Other->J2EE->Web->JSP
    Accept Defaults/use Template 2 (std JSP struts 1.1)

    When I deploy and then run the JSP, this is what I get:

    org.apache.jasper.JasperException: File “/WEB-INF/struts-bean.tld” not found
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
    org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:202)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
    org.apache.jasper.compiler.Parser.parse(Parser.java:171)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:247)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:149)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:135)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

    If I try to change the JSP to refer to the taglib under the Test1/WEB-INF/struts-bean.tld instead then I get other errors. Is this a configuration problem?

    thanks

    #201272 Reply

    support-michael
    Keymaster

    This is most likely a configuration problem.

    1) Did you configure your MyEclipse>Struts TLD and Library properties? These prefs tell the Struts Capabilities wizard where to locate the Struts TLD and libraries it uses to add to a web project during the configuration process. If the answer is “no” then please configure these preferences. You can download the Struts libs/tlds from http://jakarta.apache.org/struts/index.html. Once completed you can either:

    a) Copy TLDs into the Test/<webroot folder>/WEB-INF folder and the struts jars into Test/<webroot folder>/WEB-INF/lib

    or

    b) Creating a new Test project (the preferred method) and copy files from the old project into the new project

    Michael
    MyEclipse Support

    #201275 Reply

    Yes, I did configure the jars and tlds in the MyEclipse Struts config. I added all the jars and all the tlds for the 1.1 struts package. When I right-clieked and selected ‘Add Struts Capabilities’, it copied all these files into the locations you mentioned.

    #201295 Reply

    support-michael
    Keymaster

    Please verify that your project includes the struts-bean.tld file under the Test/<your web-root folder>/WEB-INF directory. It appears it either is not in your project or it is not being deployed. The Struts JSP wizard adds taglib directives with relative uri’s for all of the Struts tag libraries. The ME 2.7RC version of this wizard will use the uri of the struts tld.

    Michael
    MyEclipse Support

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Problem with Struts

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