aspose file tools
The moose likes Tomcat and the fly likes JSP precompile error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "JSP precompile error" Watch "JSP precompile error" New topic
Author

JSP precompile error

Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
I am running into a problem when precompiling jsp pages that use <%@ include ... > and relative paths.

This is the error I get:

The include directive that is causing the problem is:
<%@ include file="../../shared/intro-hdr.inc" %>

If I change it toa uri that is relative to the application root, such as:
<%@ include file="/shared/intro-hdr.inc" %>
it works just fine. No problem with any future applications. The problem in that we already support several applications with several hundred jsp pages that use the first format. Manually changing all of them would take many, many man hours... Plus they have been precompiled before without error. We have no idea what is different now.

We are using apache's jasper jspc tool.

Any suggestions?
[ August 16, 2005: Message edited by: Paul Bourdeaux ]

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

Since the japser compiler is Tomcat specific, I'm going to move this over to the Tomcat forum where it will get more exposure to the Tomcat-savvy.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

I've never done any pre-compilation, so I don't have any specific answer to your issue.

And, not that it's any help to you, I long ago learned that relative references are a headache waiting to happen. Not only are there unexpected gotcha's like this wating for you, the relative nature of the references creates an artificial binding between files that locks you into a particular structure. Making any file structure changes becomes a much bigger deal that it needs to be.
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
I long ago learned that relative references are a headache waiting to happen

I whole heartedly agree! Unfortunately these applications were in place before I was...
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JSP precompile error
 
Similar Threads
struts2: howto correctly deligate actions on the struts.xml's include files
Can JSP's include servlets?
JSP precompile error
A few study aids for the beta!!
JSP Tags