Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Ant's jspc task - doesn't work on Tomcat 4.1.18

I'm trying to use Ant's JSPC task to pre-compile my JSPs. I've used Erik Hatcher's example from Java Development with Ant. It works great when using a 4.0.x version of Tomcat, and the following jasper.classpath:

<path id="jasper.classpath">
    <fileset dir="${tomcat.home}/lib">
        <include name="jasper-*.jar"/>
    </fileset>
    <fileset dir="${tomcat.home}/common/lib">
        <include name="servlet.jar"/>
    </fileset>
</path>

However, it doesn't work on Tomcat 4.1.17. I had to change the jasper.classpath to find the appropriate jars (they're in different directories now), plus I had to include ant.jar or I got java.lang.NoClassDefFoundError: org/apache/tools/ant/AntClassLoader. Where everything works on the older Tomcat version, now it fails - what gives?

compile-jsp:
     [jspc] Compiling 8 source filesD:\source\appfuse\build\jspc\java
  [jasperc] 2002-12-21 11:15:51 - uriRoot implicitly set to 
            "D:\Tools\tomcat-4.1.17\webapps\appfuse"
  [jasperc] error:/common/footer.jsp(0,0) null
  [jasperc] 2002-12-21 11:15:53 - ERROR-the file '\common\footer.jsp' 
            generated the following general exception: org.apache.jasper.JasperException: 
            /common/footer.jsp(0,0) null

Posted in Java at Dec 21 2002, 05:23:49 PM MST 3 Comments
Comments:

My co-author, Steve, is the one who spent the most time with <jspc> and he often fields questions about it on the ant e-mail lists. I believe it boils down to the ever changing Tomcat API's and making a <jspc> task that can accomodate them all or at least be kept up-to-date needs to be tackled by the Jasper team. Personally, I don't use <jspc> because of such headaches - although I would like to use it.

Posted by Erik Hatcher on December 22, 2002 at 08:44 AM MST #

thanks for this, fixed my problem. by the way this "call back" to ant still exists in tomcat 4.1.18

Posted by rich on December 27, 2002 at 06:23 PM MST #

I received a comment on this issue from the ant-user mailing list: <code> 1. blame me for this example, not erik :) 2. blame me for committing the jspc task to ant cvs too. If I'd known how brittle it was going to be, I never would have. 3. I havent looked at tomcat 4.18 yet. Features and stability of jasper are always an ongoing issue. Personally I'd like the jasper team to do the back end of the ant task, so they can keep it in sync. Your problem implies they are using ant itself for javac compilation, though I'll have to go into the jasper source to see. One of those 'somebody needs to sit down and spend an evening looking at jasper' problems. -steve</code>

Posted by Matt Raible on December 29, 2002 at 11:54 AM MST #

Post a Comment:
  • HTML Syntax: Allowed