wood burning stoves 2.0*
The moose likes JSP and the fly likes Precompile Failing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Precompile Failing" Watch "Precompile Failing" New topic
Author

Precompile Failing

Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
I have an annoying situation...

I have a web app with several jsps that use custom tags. They use this line to call the taglib:If I don't precompile the web app, it works perfectly. However, if I try to precompile it, the precompile fails saying tht it cannot open the tag class. This failure occurs in both Tomcat 3.3.2 and iPlanet. Any suggestions? Thanks in advance.


“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: 60752
    
  65

uri="/WEB-INF/tlds/pathway.tld"


Not sure if this is an issu or not, but is this really the URI that's declared within the TLD? Or just its file path?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
Actually, it is both the uri and the file path (not my choice of naming conventions, but it was in place before I was ).

I don't however, think that this is an issue, as the compiler seems to be able to find the tld... For instance, in my tld I have the following tagAnd the error generated by the precompiler says that it "cannot open class org.cait.usdlc.tags.PathwayTag".

It baffels me because it works just fine if I let it tranlate and compile with the first request...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Sounds like it may be a classpath issue with the pre-compiler. Are you sure that the classes are available to the pre-compile process?
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
Good call. No, I am not sure that the class is available to the precompiler... I will have to look into that. Although that would explain why it worked when the server was running...

Do you think it would be enough to simply set the classpath enivornment variable before running the precompiler? (i.e. setenv CLASSPATH ~/subversion/webapps... )
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Most probably -- assuming that the pre-compiler program uses the CLASSPATH variable. (Tomcat, for example, does not).
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
That seems to have done the trick. Thanks Bear.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Precompile Failing
 
Similar Threads
JSTL version causing exceptions?
Final Mock Q9 on Page 802
How to user Struts Tags in a WebApplication
Deploying w/ Ant to Weblogic
JSTL problem