Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
JspServlet classpath init param is ignored

JspServlet classpath init param is ignored

2006-12-14       - By werner loibl [celumsolutions]

 Back
Reply:     1     2     3     4     5  

Hi,

I am trying to set a custom classpath for the JspServlet to allow JSPs
to reference classes that are not located in one of the default
locations (WEB-INF/classes, WEB-INF/lib). But I can't get this to work,
it seems JspServlet ignores the servlet init param. From looking into
the sources it seems that the init param is read and remembered but
never accessed or used later on in the JSP compilation process (though
I'm not absolutely sure since I am not familiar with the tomcat code
base at all). I tried both the JDTCompiler and the AntCompiler. I tested
with tomcat 5.5.20.

Does anyone know whether the classpath init param is meant to work resp.
to be used in this situation?

Thanks for your help!

Werner



This is my web.xml

<?xml version="1.0" encoding="UTF-8 (See http://UTF-8.ora-code.com)"?>
<web-app version="2.4"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       xmlns="http://java.sun.com/xml/ns/j2ee"
<http://java.sun.com/xml/ns/j2ee>
xmlns:web="http://java.sun.com/xml/ns/j2ee"
<http://java.sun.com/xml/ns/j2ee>  
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<http://www.w3.org/2001/XMLSchema-instance> >
<servlet>
  <servlet-name>jsp</servlet-name>
  <servlet-class>org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet</servlet-class>
  <init-param>
    <param-name>fork</param-name>
    <param-value>false</param-value>
  </init-param>
  <init-param>
    <param-name>xpoweredBy</param-name>
    <param-value>false</param-value>
  </init-param>
  <init-param>
    <param-name>classpath</param-name>
    <param-value>file:/X:/lib/plugin.jar <file:///X:/lib/plugin.jar>
</param-value>
  </init-param>
  <init-param>
    <param-name>compiler</param-name>
    <param-value>javac1.5</param-value>
  </init-param>
  <load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>jsp</servlet-name>
  <url-pattern>*.jsp</url-pattern>
</servlet-mapping>
</web-app>

This is my test JSP. DummyOutput is a simple test class

<%@ page import="test.*" %>
<%
new DummyOutput().doMagic();
%>



©2008 junlu.com - Jax Systems, LLC, U.S.A.