Used to use -package to specify the base package name and then JspC would assume that the directory structure of your JSPs was the fully qualified package name: bold assumption on the surface but that's what the appservers expected as well. Now the -package is used on every JSP in the tree you point at using -webapp - calling the JspC compiler with a java fork from ant versus built-in ant task with an unknown vintage of Jasper. Seems like a bug but then perhaps assuming directories were sub-packages was deemed to presumptive.
----- Original Message ----- From: "Jules Gosnell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 10:50 AM Subject: Re: [JBoss-user] classpath for JSP compiling > Rod Macpherson wrote: > > >To summarize, > > > >1. deploy-time compilation precludes a specific optimization. > >2. develop-time compilation requires a classpath. > > > >If deploying raw pages you lose that optimization anyway and since we > >precompile as a pre-test sanity check we already have the classpath in our > >build script. The problem is the latest Jasper does not assume a package > >structure anymore and that makes it difficult to automate deployment of > >compiled pages. Anyway, you have provided a solution and we will happily > >work with that. > > > except that it is a Jasper1 solution - the Jasper2 package collapsing > problem (if it is a real problem, I have not investigated) is not > accounted for.... > > I don't know much about JSPs, but I think I saw something like a > %package tag. Perhaps this will cause Jasper2 to compile your pages into > the correct hierarchy. > > Please report back and I will update the FAQ. > > Cheers, > > Jules > > P.P.S. > > The example in the FAQ uses Ant's <replace> task to insert > Jasper-generated xml into web.xml. I now use xmltask > (www.oopsconsultancy.com). It allows you to cut-n-paste xml elements > between different files etc, giving you much finer control. I find it > vey useful... > > > > > > > > > >----- Original Message ----- > >From: "Jules Gosnell" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Monday, February 17, 2003 2:38 AM > >Subject: Re: [JBoss-user] classpath for JSP compiling > > > > > >>Rod Macpherson wrote: > >> > >>>Can we specify that we want all JSPs compiled at deploy time? The servlet > >>>approach has shortcomings such as losing the ability to just update a > >>> > >page > > > >>>on the fly. Since jetty controls the package structure and the location > >>> > >of > > > >>>class files it would be nice to have a compile-on-deploy switch or at > >>> > >least > > > >>>an interface to point to a war and say "compile this". > >>> > >>compile on the fly is a development-time feature. > >> > >>compile-on-deploy is simply JSP precompilation. The only difference > >>being that the one is done by the container, the other by the developer. > >> > >>There is an extra optimisation step that can be taken in the latter, > >>which is to actually cut Jasper out of the dispatch of URI->Servlet, > >>mapping url-patterns in your web.xml directly to compiled pages. > >> > >>This step is problematic to perform in an automated manner, due to the > >>need for development time knowledge (which jsps are servlets and which > >>are just included, etc...). > >> > >>Since taking the middle route (compile-on-deploy) gives you neither the > >>development-time benefit of compile-on-the-fly, nor the production-time > >>benefit of removing Jasper from the dispatch (precompilation), I have > >>chosen not to implement it. > >> > >>JSP precompilation is explained in the Jetty/JBoss FAQ : > >> > >>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/* > >>FAQ*?rev=HEAD&content-type=text/vnd.viewcvs-markup > >> > >>I will add this discussion, > >> > >> > >>Cheers, > >> > >> > >>Jules > >> > >>> > >>>----- Original Message ----- > >>>From: "Jules Gosnell" <[EMAIL PROTECTED]> > >>>To: <[EMAIL PROTECTED]> > >>>Sent: Sunday, February 16, 2003 9:35 AM > >>>Subject: Re: [JBoss-user] classpath for JSP compiling > >>> > >>> > >>>>Jasper expects it's classpath to be passed as a string via an > >>>> > >init-param. > > > >>>>This string is generated by walking up the classloader hierarchy and > >>>>adding all relevant dirs/jars to it. > >>>> > >>>>This generation is done on deployment of the war. > >>>> > >>>>It looks s if it is missing the classes in your ejb-jar. > >>>> > >>>>was it deployed when you deployed the war ? If not redeploy it and try > >>>>again. If so, let me know and we will investigate further (if you are > >>>>using Jetty). > >>>> > >>>>Jules > >>>> > >>>> > >>>>SainTiss wrote: > >>>> > >>>>>Hi, > >>>>> > >>>>>I'm writing a simple JSP in which I try to access an Entity EJB. Yet > >>>>>while accessing the jsp, I get javac errors in the JBoss log, like > >>>>> > >this: > > > >>>>>Error compiling file: > >>>>> > >>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhos t > >> > >/ > > > >>>eenloketsysteem/jsp/stTest_jsp.java > >>> > >>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhos t > >> > >/ > > > >>>eenloketsysteem/jsp/stTest_jsp.java:7: package > >>> > >eenloketsysteem.entitybeans > > > >>>does not exist > >>> > >>>>>import eenloketsysteem.entitybeans.*; > >>>>>^ > >>>>> > >>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhos t > >> > >/ > > > >>>eenloketsysteem/jsp/stTest_jsp.java:45: cannot resolve symbol > >>> > >>>>>symbol : class PersoonUtil > >>>>>location: class org.apache.jsp.stTest_jsp > >>>>> PersoonUtil pUtil = new PersoonUtil(); > >>>>> ^ > >>>>> > >>>>>And so on... > >>>>> > >>>>>Obviously, JBoss seems unable to locate the Beans... The beans are in a > >>>>>.jar file with the following structure: > >>>>> > >>>>>META-INF/MANIFEST.MF > >>>>>META-INF/ejb-jar.xml > >>>>>META-INF/jboss.xml > >>>>>META-INF/jbosscmp-jdbc.xml > >>>>>eenloketsysteem/entitybeans/PersoonUtil.class > >>>>>eenloketsysteem/entitybeans/Persoon.class > >>>>>eenloketsysteem/entitybeans/PersoonData.class > >>>>>... > >>>>> > >>>>>The JSP is in a .war file like this: > >>>>> > >>>>>META-INF/MANIFEST.MF > >>>>>WEB-INF/jboss-web.xml > >>>>>WEB-INF/web.xml > >>>>>jsp/stTest.jsp > >>>>>... > >>>>> > >>>>>The URL I use for accessing the JSP is: > >>>>>Http://localhost:8080/eenloketsysteem/jsp/stTest.jsp > >>>>> > >>>>>Now the odd thing is, that I also have some servlets in that .war > >>>>> > >(which > > > >>>>>are compiled by myself of course, and not by JBoss), and there's no > >>>>>problem with them, i.e. JBoss does find the Beans at runtime, when the > >>>>>servlets need them... > >>>>> > >>>>>I guess the most logical explanation would be that JBoss uses a special > >>>>>classpath when compiling JSP's, but I'm not sure... > >>>>> > >>>>>Does anyone know what could be the problem here? > >>>>> > >>>>>Thanks, > >>>>> > >>>>>Hans > >>>>> > >>>>> > >>>> > >>>> > >>>> > >>>>------------------------------------------------------- > >>>>This sf.net email is sponsored by:ThinkGeek > >>>>Welcome to geek heaven. > >>>>http://thinkgeek.com/sf > >>>>_______________________________________________ > >>>>JBoss-user mailing list > >>>>[EMAIL PROTECTED] > >>>>https://lists.sourceforge.net/lists/listinfo/jboss-user > >>>> > >>> > >>> > >>>------------------------------------------------------- > >>>This sf.net email is sponsored by:ThinkGeek > >>>Welcome to geek heaven. > >>>http://thinkgeek.com/sf > >>>_______________________________________________ > >>>JBoss-user mailing list > >>>[EMAIL PROTECTED] > >>>https://lists.sourceforge.net/lists/listinfo/jboss-user > >>> > >> > >> > >> > >>________________________________________________________________________ > >>This email has been scanned for all viruses by the MessageLabs SkyScan > >>service. For more information on a proactive anti-virus service working > >>around the clock, around the globe, visit http://www.messagelabs.com > >>________________________________________________________________________ > >> > >> > >>------------------------------------------------------- > >>This sf.net email is sponsored by:ThinkGeek > >>Welcome to geek heaven. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>JBoss-user mailing list > >>[EMAIL PROTECTED] > >>https://lists.sourceforge.net/lists/listinfo/jboss-user > >> > > > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by:ThinkGeek > >Welcome to geek heaven. > >http://thinkgeek.com/sf > >_______________________________________________ > >JBoss-user mailing list > >[EMAIL PROTECTED] > >https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > ________________________________________________________________________ > This email has been scanned for all viruses by the MessageLabs SkyScan > service. For more information on a proactive anti-virus service working > around the clock, around the globe, visit http://www.messagelabs.com > ________________________________________________________________________ > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
