News
Features
Changes
Todo
Contributors

Downloads

Installation
Configuration
Using
Servlet Sample
FAQ

Architecture

Ant integration
Servlet Engines

API Reference

Support
Statistics


Configuration

Configuring J2EEUnit is very simple. You simply need to provide a file named j2eeunit.properties that you will put in your CLASSPATH (meaning you need to put the directory where this file is located in your CLASSPATH, not the file itself !).

Moreover, in order for J2EEUnit to work, you need to register a generic servlet (called the Redirector servlet) and/or a generic JSP (called the Redirector JSP) in your web.xml file if you are using a web application or in your specific Servlet engine configuration file if it does not support web applications (see the installation section for help on modifying your web.xml file).

Note You need the Redirector JSP only if you want to make unit tests that need to access JSP implicit objects (PageContext and JspWriter).

j2eeunit.properties

You need to se the following properties in your J2EEUnit configuration file (j2eeunit.properties) :

Property Name   j2eeunit.servletRedirectorURL  
Description   URL to which the Redirector Servlet is mapped to  
Example   http://localhost:8080/test/ServletRedirector  


Property Name   j2eeunit.jspRedirectorURL  
Description   URL to which the Redirector JSP is mapped to  
Example   http://localhost:8080/test/JspRedirector  

Sample j2eeunit.properties file :

# Configuration file for J2EEUnit.

# Each project using J2EEUnit need to have such a file put in the CLASSPATH
# (Meaning the directory containgin this file should be in the CLASSPATH, not
# the file itself of course ... :) )

# Defines the URLs that will be used by J2EEUnit 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".

j2eeunit.servletRedirectorURL = http://localhost:8080/test/ServletRedirector
j2eeunit.jspRedirectorURL = http://localhost:8080/test/JspRedirector



Copyright © 2000-2001 Vincent Massol. All Rights Reserved.