Tomcat 4.1.x pre-compiling JSPs within custom folder structure
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Wood_Chuck
Posted On:   Monday, June 14, 2004 08:34 AM

hello, i'm using ant to pre-compile my JSPs. however, Tomcat 4.1.x seems to only recognize JSPs that were compiled into the package org.apache.jsp the problem is that my JSPs are organized in sub folders and do not all reside within one large folder. when the ant task converts the .jsp to .java files it does so correctly and maintains my folder structures by appending to the org.apache.jsp package such that, if i had a sub folder named foobar, all jsps inside that folder would have the package org.apache.jsp.foobar in their .java files. however, if before compiling the .java files i must "flatten" every package declaration to just "org.apache.jsp" for Tomcat    More>>

hello,


i'm using ant to pre-compile my JSPs. however, Tomcat 4.1.x seems to only recognize JSPs that were compiled into the package org.apache.jsp


the problem is that my JSPs are organized in sub folders and do not all reside within one large folder.


when the ant task converts the .jsp to .java files it does so correctly and maintains my folder structures by appending to the org.apache.jsp package such that, if i had a sub folder named foobar, all jsps inside that folder would have the package org.apache.jsp.foobar in their .java files.


however, if before compiling the .java files i must "flatten" every package declaration to just "org.apache.jsp" for Tomcat 4.1.x to recognize them. and this causes problems for me because some JSPs (that exist in different sub folders) have identical file names, so there are duplicate class compilation errors, etc.


ideally, my ant build.xml should have ONE task and ONE after it. but now i am forced to have many tasks to preserve folder structure (to avoid duplicate exceptions), and then i have to carefully rebuild this folder structure placing the corresponding compiled .class files back to the way they were.


does anyone have a better suggestion/solution for this? this is not a good long-term solution since everytime i create another sub folder to organize JSPs i have to add another ant task, etc., etc..


why does Tomcat 4.1.x want every compiled JSP in "org.apache.jsp"? is there a way around this?


thanks in advance!

   <<Less
About | Sitemap | Contact