360066 jsps referenced in web.xml <jsp-file> elements do not compile

This commit is contained in:
Jan Bartel 2011-10-06 17:32:31 +11:00
parent 76cdf9badb
commit a8f24a2b64
5 changed files with 33 additions and 5 deletions

View File

@ -271,9 +271,9 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
}
}
// TODO is this too soon?
/* Set the webapp's classpath for Jasper */
context.setAttribute("org.apache.catalina.jsp_classpath", context.getClassPath());
/* Set the system classpath for Jasper */
holder.setInitParameter("com.sun.appserv.jsp.classpath", getSystemClassPath(context));
}
@ -321,6 +321,8 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
{
holder.setForcedPath(jsp_file);
holder.setClassName(jspServletClass);
//set the system classpath explicitly for the holder that will represent the JspServlet instance
holder.setInitParameter("com.sun.appserv.jsp.classpath", getSystemClassPath(context));
}
// handle load-on-startup

View File

@ -95,12 +95,11 @@
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.1.1-SNAPSHOT</version>
<version>7.5.2-SNAPSHOT</version>
<configuration>
<stopPort>8087</stopPort>
<stopKey>foo</stopKey>

View File

@ -250,6 +250,17 @@
<url-pattern>/javadoc-proxy/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>foo.jsp</servlet-name>
<jsp-file>/jsp/foo/foo.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>foo.jsp</servlet-name>
<url-pattern>/jsp/foo/</url-pattern>
</servlet-mapping>
<error-page>
<error-code>404</error-code>
<location>/error404.html</location>

View File

@ -0,0 +1,15 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
</head>
<body>
<h1>FOO Example</h1>
<hr>
<p>A trivial FOO example
<hr>
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i}" />
<br />
</c:forEach>
</body>
</html>

View File

@ -11,6 +11,7 @@
<li><a href="tagfile.jsp">JSP 2.0 Tag File demo</a><br/>
<li><a href="expr.jsp?A=1">JSP 2.0 Tag Expression</a><br/>
<li><a href="jstl.jsp">JSTL Expression</a><br/>
<li><a href="foo/">Mapping to &lt;jsp-file&gt;</a><br/>
</ul>
<a href="/">Main Menu</a>