You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by pt...@apache.org on 2008/02/02 17:23:27 UTC
svn commit: r617821 -
/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/jetty/src/main/webapp/jspRedirector.jsp
Author: ptahchiev
Date: Sat Feb 2 08:23:27 2008
New Revision: 617821
URL: http://svn.apache.org/viewvc?rev=617821&view=rev
Log:
added the jsp redirector
Added:
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/jetty/src/main/webapp/jspRedirector.jsp
Added: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/jetty/src/main/webapp/jspRedirector.jsp
URL: http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/jetty/src/main/webapp/jspRedirector.jsp?rev=617821&view=auto
==============================================================================
--- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/jetty/src/main/webapp/jspRedirector.jsp (added)
+++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/jetty/src/main/webapp/jspRedirector.jsp Sat Feb 2 08:23:27 2008
@@ -0,0 +1,28 @@
+<%@page import="org.apache.cactus.server.*,org.apache.cactus.internal.server.*" session="true" %><%
+
+ /**
+ * Note:
+ * It is very important not to put any character between the end
+ * of the page tag and the beginning of the java code expression, otherwise,
+ * the generated servlet containss a 'out.println("\r\n");' and this breaks
+ * our mechanism !
+ */
+
+ /**
+ * This JSP is used as a proxy to call your server-side unit tests. We use
+ * a JSP rather than a servlet because for testing custom JSP tags for
+ * example we need access to JSP implicit objects (PageContext and
+ * JspWriter).
+ */
+
+ JspImplicitObjects objects = new JspImplicitObjects();
+ objects.setHttpServletRequest(request);
+ objects.setHttpServletResponse(response);
+ objects.setServletConfig(config);
+ objects.setServletContext(application);
+ objects.setJspWriter(out);
+ objects.setPageContext(pageContext);
+
+ JspTestRedirector redirector = new JspTestRedirector();
+ redirector.doGet(objects);
+%>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org