1 2 Previous Next 21 Replies Latest reply on Mar 10, 2004 3:44 AM by Remy Maucherat

    Standard taglib with jboss 3.2.3, tomcat 5

    Nathan Thompson Newbie

       

      "natet1" wrote:
      I'm trying to get up and running using tomcat 5 with jboss 3.2.3. I've gotten the tomcat5 instance setup and running, but I keep running into the following problem when trying to use taglibs:

      org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application


      This is when trying to view the samples that come with the jakarta taglibs standard 1.1 distribution. (I've deployed the same "standard-examples" war file under a stand-alone tomcat 5 install and they work without problem).

      Anybody got any ideas?

      Thanks!

      Nate


        • 1. Re: Standard taglib with jboss 3.2.3, tomcat 5
          Joshua Tharp Newbie

           

          "joshua_tharp" wrote:
          Having the same issue. Have you found the solution to this yet?

          Josh


          • 2. Re: Standard taglib with jboss 3.2.3, tomcat 5
            ahardy66 Novice

            I also just ran into this issue and am trying to figure it out.

            Does JBoss require DTDs to be located locally?

            • 3. Re: Standard taglib with jboss 3.2.3, tomcat 5
              Heiko Rupp Master

              JBoss tries to get the locally from JBoss/docs/dtd, where they are delivered with the server.
              This is also an advantage for you, as the server can also be started / operated when the network is not up.

              • 4. Re: Standard taglib with jboss 3.2.3, tomcat 5
                ahardy66 Novice

                Ah OK. Thanks for the info. But that URL is not meant to be looked up - it's just meant to be unique and somehow the container can match it against the dtd in a jar somewhere. So it doesn't matter whether my machine is online or not. Or at least it shouldn't.

                The one that is causing me problems right now:

                http://java.sun.com/jsp/jstl/fmt

                has no .tld on the Sun website.

                It's just a problem because I don't know where the .tld is. The exception message says

                ".... http://java.sun.com/jsp/jstl/fmt cannot be resolved in either web.xml or the jar files deployed with this application"

                I used to have such an entry in the web.xml but about a year ago I removed it for some reason which I shall have to look up, since it's slipped my mind now. This was just with tomcat, not jboss obviously.

                And of course theoretically it would be nice to be able to specify something (if I have to specify anything) that is container-independent, as opposed to a declaration that points to an internal JBoss directory. After all, it is in my web.xml.

                I'll see if I can find anything out at jakarta.apache.org/taglibs/
                Adam

                • 5. Re: Standard taglib with jboss 3.2.3, tomcat 5
                  Heiko Rupp Master

                  Ah ok, I see.
                  I can't tell about the taglibs, but generally the dtds for system config files should be locally.

                  • 6. Re: Standard taglib with jboss 3.2.3, tomcat 5
                    ahardy66 Novice

                    my mistake, going on about dtds when I meant tlds. sorry.

                    Anyway I discovered the tlds jboss needs are in the JSTL taglib jars jstl.jar and standard.jar. I've included these jars in both my project WAR and in the JBoss server/default/lib directory already anyway so they're not helping.

                    "fmt" is the first of 8 taglib declarations I've got. Mostly JSTL and struts. I assume that this problem will crop up with all of them.

                    I've been searching and googling like mad but havent found the solution. Would someone please give me a clue?

                    Thanks
                    Adam

                    • 7. Re: Standard taglib with jboss 3.2.3, tomcat 5
                      ahardy66 Novice

                      Tomcat.SAR is not searching in the war through the Jar files for tlds. I can't see why.

                      In stand-alone mode, tomcat5 handles this fine. It extracts the tlds from the jars in the war.

                      Why or how can tomcat.sar be different from stand-alone mode?

                      This is causing me alot of wasted time, I'd really appreciate any response.
                      thanks
                      Adam

                      • 8. Re: Standard taglib with jboss 3.2.3, tomcat 5
                        Joshua Tharp Newbie

                        Could it be a Tomcat version thing? (JBoss has <Tomcat 5 which doesn't take JSP spec 1.2?)

                        • 9. Re: Standard taglib with jboss 3.2.3, tomcat 5
                          ahardy66 Novice

                          Thanks for the response. However it's definitely tomcat 5.0.16 that I'm using - I installed it using the ant build script in the jboss docs directory.

                          I've narrowed it down to a particular class in tomcat's catalina startup but I'd have to run a debugger over it to work out why it's failing. I suspect it's swallowing an exception.

                          I'm surprised no-one else has had this. There must be hundreds of people trying to deploy JSTL in JBoss.

                          And how about these guys who had this problem over a month ago? Have you given up guys? What's the deal? No solution at all? A bit of feedback would go down really well.

                          Adam

                          • 10. Re: Standard taglib with jboss 3.2.3, tomcat 5
                            Andrew May Newbie

                            We're using JSTL 1.1 with JBoss 3.2.3 and Jetty 5 beta2 with no problems.
                            We have jstl.jar in the server/default/lib directory and standard.jar in the WEB-INF/lib directory of each of our webapps.

                            We used a similar configuration for JSTL 1.0 with Jetty 4.

                            Servlet 2.4 containers (i.e. Jetty 5 & Tomcat 5) should pick up tld's in WEB-INF or jars in WEB-INF/lib without any declarations in web.xml - there's a bunch of stuff about this in the 2.4 spec.

                            • 11. Re: Standard taglib with jboss 3.2.3, tomcat 5
                              ahardy66 Novice

                              Yes, I read the spec. Glad it works for you with Jetty. I might have to debug this tomorrow with extra logging statements in the TldConfig class, where the action is meant to happen. I can't see anything in the code that gives any hint why it would fail.

                              If I compile the tomcat jars myself from source, can I use them? Or has JBoss modified anything in tomcat?

                              Adam

                              • 12. Re: Standard taglib with jboss 3.2.3, tomcat 5
                                Remy Maucherat Novice

                                 

                                "ahardy66" wrote:
                                Thanks for the response. However it's definitely tomcat 5.0.16 that I'm using - I installed it using the ant build script in the jboss docs directory.

                                I've narrowed it down to a particular class in tomcat's catalina startup but I'd have to run a debugger over it to work out why it's failing. I suspect it's swallowing an exception.

                                I'm surprised no-one else has had this. There must be hundreds of people trying to deploy JSTL in JBoss.

                                And how about these guys who had this problem over a month ago? Have you given up guys? What's the deal? No solution at all? A bit of feedback would go down really well.

                                Adam


                                I have tested the following workaround, using the current 3.2.x CVS code. In the Tomcat 5 SAR, in jboss-service.xml, set UseJBossWebLoader to false.

                                <attribute name="UseJBossWebLoader">false</attribute>


                                I assume there's a problem somewhere when enumerating the classloader contents in Jasper.

                                • 13. Re: Standard taglib with jboss 3.2.3, tomcat 5
                                  ahardy66 Novice

                                  Can someone tell me which module to download? I've downloaded and compiled the whole lot from CVS 3 times now and I'm not getting any further.

                                  I assumed that the module I needed is JBoss-3.2, looking at the list of modules in the jboss root. That wouldn't checkout though.

                                  I tried jboss-all, jboss and jboss-3.2, the last of which isn't in the list but I saw someone who'd left a message here about it.

                                  The only one that gave me a compilable end-result was jboss-3.2 with -r BRANCH_3_2, but the work-around doesn't work here.

                                  I tried jboss-3.2 -r HEAD but that won't compile due to an error with 'thirdparty/xdoclet-xdoclet/lib not found'

                                  I can't find any notices saying what I need. It would definitely save alot of time.

                                  I have also heard about 'snapshots' of the CVS tree referred to in an old forum msg, but I can't find them anywhere. Do they still exist?

                                  Adam

                                  • 14. Re: Standard taglib with jboss 3.2.3, tomcat 5
                                    Remy Maucherat Novice

                                    Get jboss-3.2 with Branch_3_2.
                                    The fix works for me.

                                    1 2 Previous Next