jvanzyl 01/09/16 22:46:42
Added: src/tdk/cactus cactus.properties log_client.properties
redirector.jsp web.xml
src/tdk/cactus/tomcat4 server.xml
Log:
- adding a cactus setup contributed by jeff brekke. we'll get cactus
running soon to test the sample/test app.
Revision Changes Path
1.1 jakarta-turbine-tdk/src/tdk/cactus/cactus.properties
Index: cactus.properties
===================================================================
# Configuration file for Cactus.
# Each project using Cactus need to have such a file put in the client side
# CLASSPATH (Meaning the directory containgin this file should be in the client
# side CLASSPATH, not the file itself of course ... :) )
# Defines the URLs that will be used by Cactus to call it's redirectors
# (Servlet and JSP). You need to specify in these URLs the webapp context
# that you use for your application. In the example below, the context is
# "test".
cactus.servletRedirectorURL = http://localhost:8080/test/ServletRedirector
cactus.jspRedirectorURL = http://localhost:8080/test/JspRedirector
1.1 jakarta-turbine-tdk/src/tdk/cactus/log_client.properties
Index: log_client.properties
===================================================================
# Properties for configuring Log4j
# This is the configuring for logging on the JUnit side (i.e. the client side)
log4j.appender.cactus = org.apache.log4j.FileAppender
log4j.appender.cactus.File = cactus_client.log
log4j.appender.cactus.Append = false
log4j.appender.cactus.layout = org.apache.log4j.PatternLayout
log4j.appender.cactus.layout.ConversionPattern = %r [%t] %-5p %c{2} %x - %m %n
log4j.category.org.apache.commons.cactus = DEBUG, cactus
1.1 jakarta-turbine-tdk/src/tdk/cactus/redirector.jsp
Index: redirector.jsp
===================================================================
<%@page import="org.apache.commons.cactus.server.*" session="false" %><%
/**
*
* 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).
*/
JspTestCaller caller = new JspTestCaller();
JspImplicitObjects objects = new JspImplicitObjects();
objects.m_Config = config;
objects.m_Request = request;
objects.m_Response = response;
objects.m_PageContext = pageContext;
objects.m_JspWriter = out;
caller.doTest(objects);
%>
1.1 jakarta-turbine-tdk/src/tdk/cactus/web.xml
Index: web.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>ServletRedirector</servlet-name>
<servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servlet-class>
</servlet>
<servlet>
<servlet-name>JspRedirector</servlet-name>
<jsp-file>/test/redirector.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>test</servlet-name>
<servlet-class>org.apache.turbine.Turbine</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>@APP_PROPERTIES</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ServletRedirector</servlet-name>
<url-pattern>/ServletRedirector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>JspRedirector</servlet-name>
<url-pattern>/JspRedirector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/soos/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/test/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
1.1 jakarta-turbine-tdk/src/tdk/cactus/tomcat4/server.xml
Index: server.xml
===================================================================
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
<Engine name="Standalone" defaultHost="localhost" debug="0">
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="localhost" debug="0" appBase="@out.tomcat40.full.dir@/webapps">
</Host>
</Engine>
</Service>
</Server>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]