3 Replies Latest reply on Jul 2, 2004 4:18 AM by Kabir Khan

    JBoss and Struts

    Andrew Serff Newbie

      Hello. I'm new to JBoss, but I have used the SunOne AS quite a bit. I have a simple application that has one jsp that uses Struts (one form, one action). I can deploy and run my webapp in the SunOne app server. However, when i deploy and try to run in JBoss, i get this error:

      org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: com.wintecinc.struts.taglib.html.ErrorsTei
       org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
       org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
       org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:283)
       org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:422)
       org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
       org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:162)
       org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
       org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
       org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
       org.apache.jasper.compiler.Parser.parse(Parser.java:126)
       org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
       org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
       org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
       org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      
      root cause
      
      java.lang.ClassNotFoundException: com.wintecinc.struts.taglib.html.ErrorsTei
       java.net.URLClassLoader$1.run(URLClassLoader.java:199)
       java.security.AccessController.doPrivileged(Native Method)
       java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:419)
       org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
       org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:162)
       org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
       org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
       org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
       org.apache.jasper.compiler.Parser.parse(Parser.java:126)
       org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
       org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
       org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
       org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      


      are there deployment descriptors or anything special that i need to put in my web.xml to get it to work in jboss? here is how my web app is layed out:

      META-INF/
      META-INF/MANIFEST.MF
      images/
      index.html
      images/codlogo.png
      index.jsp
      WEB-INF/
      WEB-INF/struts-config.xml
      WEB-INF/lib/
      WEB-INF/lib/taglib/
      WEB-INF/lib/j2ee.jar
      WEB-INF/lib/struts.jar
      WEB-INF/lib/cod.jar
      WEB-INF/lib/mysql.jar
      WEB-INF/lib/taglib/struts-bean.tld
      WEB-INF/lib/taglib/struts-config_1_0.dtd
      WEB-INF/lib/taglib/struts-config_1_1.dtd
      WEB-INF/lib/taglib/struts-form.tld
      WEB-INF/lib/taglib/struts-html.tld
      WEB-INF/lib/taglib/struts-logic.tld
      WEB-INF/lib/taglib/struts-nested.tld
      WEB-INF/lib/taglib/struts-template.tld
      WEB-INF/lib/taglib/struts-tiles.tld
      WEB-INF/lib/taglib/struts-validator.tld
      WEB-INF/lib/taglib/web-app_2_2.dtd
      WEB-INF/lib/taglib/web-app_2_3.dtd
      WEB-INF/lib/taglib/struts.tld
      WEB-INF/lib/commons-validator.jar
      WEB-INF/lib/commons-beanutils.jar
      WEB-INF/lib/commons-collections.jar
      WEB-INF/lib/istcustom.jar
      WEB-INF/lib/commons-digester.jar
      WEB-INF/lib/commons-fileupload.jar
      WEB-INF/lib/commons-lang.jar
      WEB-INF/lib/commons-logging.jar
      WEB-INF/lib/jakarta-oro.jar
      WEB-INF/lib/AbsoluteLayout.jar
      WEB-INF/web.xml
      


      Do you see any holes or have any suggestions that might help me out here? Thanks in advance!

        • 1. Re: JBoss and Struts
          Mike Finn Apprentice

          First, let's get the obvious out of the way:
          Where is the JAR that contains your tag classes? It's not obvious by looking at your WAR structure. Is it there, or in $JBOSS/server/xxx/lib?

          mike

          • 2. Re: JBoss and Struts
            Andrew Serff Newbie

            which tag classes are you talking about? the struts taglib are in the lib/taglib dir. I'm building the above structure into a war file and dropping it into the server/default/deploy directory. Guess i don't exactally know what your asking for...sorry. let me know

            • 3. Re: JBoss and Struts
              Kabir Khan Master

              You only seem to have the .tld files containing the descriptors for the taglibs. You also need the jar files. In my slightly old version of Struts, struts.jar contains some of the taglibs, and utility.jar, i18n.jar etc. contains the rest. Any taglibs you write yourself need to go into the Web-INF/lib or WEB-INF/classes folder depending on your packaging.

              Open the jar files in your WEB-INF/lib dir and see if they contain the missing files.