Tomcat cannot resolve '<%@ include file', possibly related to taglibs JasperException: File Not Found
In the jsp i have:
<%@ include file="/assets/includes/inc_standard_init.jsp" %>
In the browser I get:
org.apache.jasper.JasperException: /oprs.jsp(1,1) File "/assets/includes/inc_standard_init.jsp" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) ...
I've tried several versions of the path including ../assets, ../../assets, etc. The weird thing is I do not have this problem in my primary development environment, only when I've tried to move to another computer. I've compared the httpd.conf and server.xml files and I haven't been able to find any discrepancies between the environments. Ultimately I think this is a configuration problem in either Apache 2.2.14 or Tomcat 5.5.27 configuration.
Additionally, when I go to http://localhost/assets/includes/inc_standard.jsp I get this error:
org.apache.jasper.JasperException: File "/WEB-INF/tld/siteuser.tld" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) ...
Obviously I shouldn't be able to access the contents of /WEB-INF directly. I don't see how this is working in one environment but not the other. Any Ideas?
/WEB-INF/lib:
acosog_utils.jar
activation.jar
ant-antlr-1.6.5.jar
antlr-2.7.6.jar
app.jar
asm-attrs.jar
asm.jar
autoform-ext.jar
autoform.jar
axis-ant.jar
axis-schema.jar
axis.jar
catalina-ant.jar
catalina-deployer.jar
cglib-2.1.3.jar
classes12.jar
commons-codec-1.3.jar
commons-collections-2.1.1.jar
commons-collections-3.0.jar
commons-collections.jar
commons-dbcp.jar
commons-dbutils-1.0.jar
commons-discovery-0.2.jar
commons-el.jar
commons-httpclient-3.1.jar
commons-logging-1.0.4.jar
commons-logging-1.1.1.jar
commons-logging.jar
commons-pool.jar
dom4j-1.6.1.jar
domain.jar
ehcache-1.1.jar
ehcache-1.2.3.jar
examples.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar
hibernate3.jar
ibatis-2.3.0.677.jar
jakarta-regexp-1.2.jar
jasper-compiler.jar
jasper-runtime.jar
jaxrpc.jar
jms.jar
jsp-api.jar
jstl.jar
jta.jar
junit.jar
kjdk.jar
log4j-1.2.11.jar
log4j.properties
mail.jar
mysql-connector-java-3.1.10-bin.jar
开发者_StackOverflow社区naming-common.jar
naming-factory.jar
naming-resources.jar
ojdbc14_g.jar
oracle_8.1.7.1_classes12.jar
portlet-api.jar
quartz-all-1.6.5.jar
RandoNode.jar
resolver.jar
saaj.jar
serializer.jar
servlet-api.jar
servlet.jar
siteuser.jar
spring-orm.jar
spring-web.jar
spring-webmvc-portlet.jar
spring-webmvc.jar
spring.jar
standard.jar
tools.jar
velocity-1.4.jar
velocity-dep-1.4.jar
wsdl4j-1.5.1.jar
xerces.jar
xercesImpl.jar
xml-apis.jar
xml.jar
xmlparserv2.jar
apache-tomcat-5.5.27/common/lib:
commons-el.jar
jasper-compiler-jdt.jar
jasper-compiler.jar
jasper-runtime.jar
jsp-api.jar
naming-factory-dbcp.jar
naming-factory.jar
naming-resources.jar
servlet-api.jar
standard.jar
apache-tomcat-5.5.27/server/lib:
catalina-ant-jmx.jar
catalina-ant.jar
catalina-cluster.jar
catalina-optional.jar
catalina-storeconfig.jar
catalina.jar
commons-modeler-2.0.1.jar
servlets-cgi.renametojar
servlets-default.jar
servlets-invoker.jar
servlets-ssi.renametojar
servlets-webdav.jar
standard.jar
tomcat-ajp.jar
tomcat-apr.jar
tomcat-coyote.jar
tomcat-http.jar
tomcat-jkstatus-ant.jar
tomcat-util.jar
First step is to remove all appserver specific JAR's out of the WEB-INF/lib
. This includes the servlet-api.jar
and servlet.jar
. They would only coillide with the JAR's already available in the appserver's classpath and makes your webapp totally unportable.
You should never move/duplicate any appserver-specific JAR files outside their default location. You may add another webapp-specific JAR's to it so that they get shared among all webapps or any JAR's which are required by appserver's resource management (e.g. JDBC drivers for datasources), but nothing more than that.
Also ensure that the JRE/lib
is kept default the same way. You should in no way add any 3rd party JAR's to it though.
精彩评论