vmassol 02/02/17 10:44:24
Modified: src/framework/servlet23/org/apache/cactus/server
FilterTestCaller.java FilterTestRedirector.java
src/framework/share/org/apache/cactus AbstractTestCase.java
ServletURL.java WebResponse.java
src/framework/share/org/apache/cactus/client
AbstractHttpClient.java
AutoReadHttpURLConnection.java
HttpClientHelper.java
src/framework/share/org/apache/cactus/server
AbstractHttpServletRequestWrapper.java
AbstractPageContextWrapper.java
AbstractServletContextWrapper.java
AbstractTestCaller.java AbstractTestController.java
JspTestCaller.java JspTestRedirector.java
ServletTestCaller.java ServletTestRedirector.java
ServletUtil.java
src/framework/share/org/apache/cactus/util/log
LogAspect.java
Log:
corrections of some checkstyle-reported errors
Revision Changes Path
1.7 +2 -2
jakarta-cactus/src/framework/servlet23/org/apache/cactus/server/FilterTestCaller.java
Index: FilterTestCaller.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/servlet23/org/apache/cactus/server/FilterTestCaller.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FilterTestCaller.java 2 Feb 2002 17:54:36 -0000 1.6
+++ FilterTestCaller.java 17 Feb 2002 18:44:23 -0000 1.7
@@ -68,12 +68,12 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: FilterTestCaller.java,v 1.6 2002/02/02 17:54:36 vmassol Exp $
+ * @version $Id: FilterTestCaller.java,v 1.7 2002/02/17 18:44:23 vmassol Exp $
*/
public class FilterTestCaller extends AbstractTestCaller
{
/**
- * The logger
+ * The LOGGER
*/
protected static Log logger =
LogService.getInstance().getLog(FilterTestCaller.class.getName());
1.8 +2 -2
jakarta-cactus/src/framework/servlet23/org/apache/cactus/server/FilterTestRedirector.java
Index: FilterTestRedirector.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/servlet23/org/apache/cactus/server/FilterTestRedirector.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FilterTestRedirector.java 2 Feb 2002 17:54:36 -0000 1.7
+++ FilterTestRedirector.java 17 Feb 2002 18:44:23 -0000 1.8
@@ -71,7 +71,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: FilterTestRedirector.java,v 1.7 2002/02/02 17:54:36 vmassol Exp $
+ * @version $Id: FilterTestRedirector.java,v 1.8 2002/02/17 18:44:23 vmassol Exp $
* @see FilterTestCaller
*/
public class FilterTestRedirector implements Filter
@@ -87,7 +87,7 @@
}
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(FilterTestRedirector.class.getName());
1.24 +4 -4
jakarta-cactus/src/framework/share/org/apache/cactus/AbstractTestCase.java
Index: AbstractTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/AbstractTestCase.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- AbstractTestCase.java 16 Feb 2002 23:25:49 -0000 1.23
+++ AbstractTestCase.java 17 Feb 2002 18:44:23 -0000 1.24
@@ -78,7 +78,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AbstractTestCase.java,v 1.23 2002/02/16 23:25:49 vmassol Exp $
+ * @version $Id: AbstractTestCase.java,v 1.24 2002/02/17 18:44:23 vmassol Exp $
*/
public abstract class AbstractTestCase extends TestCase
{
@@ -112,7 +112,7 @@
private String currentTestMethod;
/**
- * The logger (only used on the client side).
+ * The LOGGER (only used on the client side).
*/
private Log logger;
@@ -128,7 +128,7 @@
}
/**
- * @return the logger used by the <code>TestCase</code> class and
+ * @return the LOGGER used by the <code>TestCase</code> class and
* subclasses to perform logging.
*/
protected final Log getLogger()
@@ -386,7 +386,7 @@
ClientConfigurationChecker.getInstance().checkHttpClient();
ClientConfigurationChecker.getInstance().checkLog4j();
- // We make sure we reinitialize the logger with the name of the
+ // We make sure we reinitialize the LOGGER with the name of the
// current class (that's why the logged instance is not static).
this.logger =
LogService.getInstance().getLog(this.getClass().getName());
1.14 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/ServletURL.java
Index: ServletURL.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/ServletURL.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ServletURL.java 2 Feb 2002 17:26:54 -0000 1.13
+++ ServletURL.java 17 Feb 2002 18:44:23 -0000 1.14
@@ -78,7 +78,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: ServletURL.java,v 1.13 2002/02/02 17:26:54 vmassol Exp $
+ * @version $Id: ServletURL.java,v 1.14 2002/02/17 18:44:23 vmassol Exp $
*/
public class ServletURL
{
@@ -148,7 +148,7 @@
private String queryString;
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(ServletURL.class.getName());
1.16 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/WebResponse.java
Index: WebResponse.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/WebResponse.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- WebResponse.java 16 Feb 2002 23:25:49 -0000 1.15
+++ WebResponse.java 17 Feb 2002 18:44:23 -0000 1.16
@@ -80,12 +80,12 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: WebResponse.java,v 1.15 2002/02/16 23:25:49 vmassol Exp $
+ * @version $Id: WebResponse.java,v 1.16 2002/02/17 18:44:23 vmassol Exp $
*/
public class WebResponse
{
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(WebResponse.class.getName());
1.18 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/client/AbstractHttpClient.java
Index: AbstractHttpClient.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/client/AbstractHttpClient.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- AbstractHttpClient.java 16 Feb 2002 23:25:49 -0000 1.17
+++ AbstractHttpClient.java 17 Feb 2002 18:44:23 -0000 1.18
@@ -77,12 +77,12 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Robertson</a>
*
- * @version $Id: AbstractHttpClient.java,v 1.17 2002/02/16 23:25:49 vmassol Exp $
+ * @version $Id: AbstractHttpClient.java,v 1.18 2002/02/17 18:44:23 vmassol Exp $
*/
public abstract class AbstractHttpClient
{
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(AbstractHttpClient.class.getName());
1.17 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/client/AutoReadHttpURLConnection.java
Index: AutoReadHttpURLConnection.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/client/AutoReadHttpURLConnection.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- AutoReadHttpURLConnection.java 16 Feb 2002 23:25:50 -0000 1.16
+++ AutoReadHttpURLConnection.java 17 Feb 2002 18:44:23 -0000 1.17
@@ -86,12 +86,12 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Bob Davison</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AutoReadHttpURLConnection.java,v 1.16 2002/02/16 23:25:50 vmassol
Exp $
+ * @version $Id: AutoReadHttpURLConnection.java,v 1.17 2002/02/17 18:44:23 vmassol
Exp $
*/
final class AutoReadHttpURLConnection extends HttpURLConnection
{
/**
- * The logger
+ * The LOGGER
*/
private static final Log LOGGER =
LogService.getInstance().
1.22 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/client/HttpClientHelper.java
Index: HttpClientHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/client/HttpClientHelper.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- HttpClientHelper.java 16 Feb 2002 23:25:50 -0000 1.21
+++ HttpClientHelper.java 17 Feb 2002 18:44:23 -0000 1.22
@@ -84,12 +84,12 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Robertson</a>
*
- * @version $Id: HttpClientHelper.java,v 1.21 2002/02/16 23:25:50 vmassol Exp $
+ * @version $Id: HttpClientHelper.java,v 1.22 2002/02/17 18:44:23 vmassol Exp $
*/
public class HttpClientHelper
{
/**
- * The logger
+ * The LOGGER
*/
private static final Log LOGGER =
LogService.getInstance().getLog(HttpClientHelper.class.getName());
1.8 +137 -17
jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractHttpServletRequestWrapper.java
Index: AbstractHttpServletRequestWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractHttpServletRequestWrapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractHttpServletRequestWrapper.java 16 Feb 2002 23:25:50 -0000 1.7
+++ AbstractHttpServletRequestWrapper.java 17 Feb 2002 18:44:23 -0000 1.8
@@ -66,6 +66,7 @@
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import javax.servlet.http.Cookie;
import org.apache.cactus.ServletURL;
import org.apache.cactus.util.log.Log;
@@ -77,9 +78,10 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AbstractHttpServletRequestWrapper.java,v 1.7 2002/02/16 23:25:50
vmassol Exp $
+ * @version $Id: AbstractHttpServletRequestWrapper.java,v 1.8 2002/02/17 18:44:23
vmassol Exp $
*/
-public abstract class AbstractHttpServletRequestWrapper implements
HttpServletRequest
+public abstract class AbstractHttpServletRequestWrapper
+ implements HttpServletRequest
{
/**
* The real HTTP request
@@ -92,7 +94,7 @@
protected ServletURL url;
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().
@@ -283,11 +285,13 @@
}
/**
+ * @param thePath the path to the resource
* @return a wrapped request dispatcher instead of the real one, so that
* forward() and include() calls will use the wrapped dispatcher
* passing it the *original* request [this is needed for some
* servlet engine like Tomcat 3.x which do not support the new
* mechanism introduced by Servlet 2.3 Filters].
+ * @see HttpServletRequest#getRequestDispatcher(String)
*/
public RequestDispatcher getRequestDispatcher(String thePath)
{
@@ -334,223 +338,339 @@
}
/**
- * Will concatenate 2 paths, dealing with ..
+ * Will concatenate 2 paths, normalising it. For example :
* ( /a/b/c + d = /a/b/d, /a/b/c + ../d = /a/d ). Code borrowed from
* Tomcat 3.2.2 !
*
- * @return null if error occurs
+ * @param theLookupPath the first part of the path
+ * @param thePath the part to add to the lookup path
+ * @return the concatenated thePath or null if an error occurs
*/
- private String catPath(String lookupPath, String path)
+ private String catPath(String theLookupPath, String thePath)
{
// Cut off the last slash and everything beyond
- int index = lookupPath.lastIndexOf("/");
- lookupPath = lookupPath.substring(0, index);
+ int index = theLookupPath.lastIndexOf("/");
+ theLookupPath = theLookupPath.substring(0, index);
- // Deal with .. by chopping dirs off the lookup path
- while (path.startsWith("../")) {
- if (lookupPath.length() > 0) {
- index = lookupPath.lastIndexOf("/");
- lookupPath = lookupPath.substring(0, index);
+ // Deal with .. by chopping dirs off the lookup thePath
+ while (thePath.startsWith("../")) {
+ if (theLookupPath.length() > 0) {
+ index = theLookupPath.lastIndexOf("/");
+ theLookupPath = theLookupPath.substring(0, index);
} else {
// More ..'s than dirs, return null
return null;
}
- index = path.indexOf("../") + 3;
- path = path.substring(index);
+ index = thePath.indexOf("../") + 3;
+ thePath = thePath.substring(index);
}
- return lookupPath + "/" + path;
+ return theLookupPath + "/" + thePath;
}
// Not modified methods --------------------------------------------------
+ /**
+ * @see HttpServletRequest#isRequestedSessionIdFromURL()
+ */
public boolean isRequestedSessionIdFromURL()
{
return this.request.isRequestedSessionIdFromURL();
}
+ /**
+ * @see HttpServletRequest#isRequestedSessionIdFromUrl()
+ */
public boolean isRequestedSessionIdFromUrl()
{
return this.request.isRequestedSessionIdFromURL();
}
+ /**
+ * @see HttpServletRequest#isUserInRole(String)
+ */
public boolean isUserInRole(String theRole)
{
return this.request.isUserInRole(theRole);
}
+ /**
+ * @see HttpServletRequest#isRequestedSessionIdValid()
+ */
public boolean isRequestedSessionIdValid()
{
return this.request.isRequestedSessionIdValid();
}
+ /**
+ * @see HttpServletRequest#isRequestedSessionIdFromCookie()
+ */
public boolean isRequestedSessionIdFromCookie()
{
return this.request.isRequestedSessionIdFromCookie();
}
+ /**
+ * @see HttpServletRequest#getLocales()
+ */
public Enumeration getLocales()
{
return this.request.getLocales();
}
+ /**
+ * @see HttpServletRequest#getHeader(String)
+ */
public String getHeader(String theName)
{
return this.request.getHeader(theName);
}
+ /**
+ * @see HttpServletRequest#getHeaders(String)
+ */
public Enumeration getHeaders(String theName)
{
return this.request.getHeaders(theName);
}
+ /**
+ * @see HttpServletRequest#getHeaderNames()
+ */
public Enumeration getHeaderNames()
{
return this.request.getHeaderNames();
}
+ /**
+ * @see HttpServletRequest#getScheme()
+ */
public String getScheme()
{
return this.request.getScheme();
}
+ /**
+ * @see HttpServletRequest#getAuthType()
+ */
public String getAuthType()
{
return this.request.getAuthType();
}
+ /**
+ * @see HttpServletRequest#getRealPath(String)
+ */
public String getRealPath(String thePath)
{
return this.request.getRealPath(thePath);
}
+ /**
+ * @see HttpServletRequest#getSession()
+ */
public HttpSession getSession()
{
return this.request.getSession();
}
+ /**
+ * @see HttpServletRequest#getSession(boolean)
+ */
public HttpSession getSession(boolean isCreate)
{
return this.request.getSession(isCreate);
}
+ /**
+ * @see HttpServletRequest#getRemoteHost()
+ */
public String getRemoteHost()
{
return this.request.getRemoteHost();
}
+ /**
+ * @see HttpServletRequest#getReader()
+ */
public BufferedReader getReader() throws IOException
{
return this.request.getReader();
}
+ /**
+ * @see HttpServletRequest#getContentLength()
+ */
public int getContentLength()
{
return this.request.getContentLength();
}
+ /**
+ * @see HttpServletRequest#getParameterValues(String)
+ */
public String[] getParameterValues(String theName)
{
return this.request.getParameterValues(theName);
}
+ /**
+ * @see HttpServletRequest#getContentType()
+ */
public String getContentType()
{
return this.request.getContentType();
}
+ /**
+ * @see HttpServletRequest#getLocale()
+ */
public Locale getLocale()
{
return this.request.getLocale();
}
+ /**
+ * @see HttpServletRequest#removeAttribute(String)
+ */
public void removeAttribute(String theName)
{
this.request.removeAttribute(theName);
}
+ /**
+ * @see HttpServletRequest#getParameter(String)
+ */
public String getParameter(String theName)
{
return this.request.getParameter(theName);
}
+ /**
+ * @see HttpServletRequest#getInputStream()
+ */
public ServletInputStream getInputStream() throws IOException
{
return this.request.getInputStream();
}
+ /**
+ * @see HttpServletRequest#getUserPrincipal()
+ */
public Principal getUserPrincipal()
{
return this.request.getUserPrincipal();
}
+ /**
+ * @see HttpServletRequest#isSecure()
+ */
public boolean isSecure()
{
return this.request.isSecure();
}
+ /**
+ * @see HttpServletRequest#getRemoteAddr()
+ */
public String getRemoteAddr()
{
return this.request.getRemoteAddr();
}
+ /**
+ * @see HttpServletRequest#getCharacterEncoding()
+ */
public String getCharacterEncoding()
{
return this.request.getCharacterEncoding();
}
+ /**
+ * @see HttpServletRequest#getParameterNames()
+ */
public Enumeration getParameterNames()
{
return this.request.getParameterNames();
}
+ /**
+ * @see HttpServletRequest#getMethod()
+ */
public String getMethod()
{
return this.request.getMethod();
}
+ /**
+ * @see HttpServletRequest#setAttribute(String, Object)
+ */
public void setAttribute(String theName, Object theAttribute)
{
this.request.setAttribute(theName, theAttribute);
}
+ /**
+ * @see HttpServletRequest#getAttribute(String)
+ */
public Object getAttribute(String theName)
{
return this.request.getAttribute(theName);
}
+ /**
+ * @see HttpServletRequest#getIntHeader(String)
+ */
public int getIntHeader(String theName)
{
return this.request.getIntHeader(theName);
}
+ /**
+ * @see HttpServletRequest#getDateHeader(String)
+ */
public long getDateHeader(String theName)
{
return this.request.getDateHeader(theName);
}
+ /**
+ * @see HttpServletRequest#getAttributeNames()
+ */
public Enumeration getAttributeNames()
{
return this.request.getAttributeNames();
}
+ /**
+ * @see HttpServletRequest#getRemoteUser()
+ */
public String getRemoteUser()
{
return this.request.getRemoteUser();
}
+ /**
+ * @see HttpServletRequest#getProtocol()
+ */
public String getProtocol()
{
return this.request.getProtocol();
}
+ /**
+ * @see HttpServletRequest#getRequestedSessionId()
+ */
public String getRequestedSessionId()
{
return this.request.getRequestedSessionId();
}
- public javax.servlet.http.Cookie[] getCookies()
+ /**
+ * @see HttpServletRequest#getCookies()
+ */
+ public Cookie[] getCookies()
{
return this.request.getCookies();
}
1.6 +67 -4
jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractPageContextWrapper.java
Index: AbstractPageContextWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractPageContextWrapper.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractPageContextWrapper.java 16 Feb 2002 23:25:50 -0000 1.5
+++ AbstractPageContextWrapper.java 17 Feb 2002 18:44:23 -0000 1.6
@@ -78,7 +78,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AbstractPageContextWrapper.java,v 1.5 2002/02/16 23:25:50 vmassol
Exp $
+ * @version $Id: AbstractPageContextWrapper.java,v 1.6 2002/02/17 18:44:23 vmassol
Exp $
*/
public abstract class AbstractPageContextWrapper extends PageContext
{
@@ -141,114 +141,177 @@
// Unmodified overridden methods -----------------------------------------
+ /**
+ * @see PageContext#findAttribute(String)
+ */
public Object findAttribute(String theName)
{
return this.originalPageContext.findAttribute(theName);
}
+ /**
+ * @see PageContext#forward(String)
+ */
public void forward(String theRelativeURLPath) throws ServletException,
IOException
{
this.originalPageContext.forward(theRelativeURLPath);
}
+ /**
+ * @see PageContext#getAttribute(String)
+ */
public Object getAttribute(String theName)
{
return this.originalPageContext.getAttribute(theName);
}
+ /**
+ * @see PageContext#getAttribute(String, int)
+ */
public Object getAttribute(String theName, int theScope)
{
return this.originalPageContext.getAttribute(theName, theScope);
}
+ /**
+ * @see PageContext#getAttributeNamesInScope(int)
+ */
public Enumeration getAttributeNamesInScope(int theScope)
{
return this.originalPageContext.getAttributeNamesInScope(theScope);
}
+ /**
+ * @see PageContext#getAttributesScope(String)
+ */
public int getAttributesScope(String theName)
{
return this.originalPageContext.getAttributesScope(theName);
}
+ /**
+ * @see PageContext#getException()
+ */
public Exception getException()
{
return this.originalPageContext.getException();
}
+ /**
+ * @see PageContext#getOut()
+ */
public JspWriter getOut()
{
return this.originalPageContext.getOut();
}
+ /**
+ * @see PageContext#getPage()
+ */
public Object getPage()
{
return this.originalPageContext.getPage();
}
+ /**
+ * @see PageContext#getResponse()
+ */
public ServletResponse getResponse()
{
return this.originalPageContext.getResponse();
}
+ /**
+ * @see PageContext#getSession()
+ */
public HttpSession getSession()
{
return this.originalPageContext.getSession();
}
+ /**
+ * @see PageContext#handlePageException(Exception)
+ */
public void handlePageException(Exception theException)
throws ServletException, IOException
{
this.originalPageContext.handlePageException(theException);
}
+ /**
+ * @see PageContext#include(String)
+ */
public void include(String theRelativeURLPath) throws ServletException,
IOException
{
this.originalPageContext.include(theRelativeURLPath);
}
+ /**
+ * @see PageContext#initialize(Servlet, ServletRequest, ServletResponse,
String, boolean, int, boolean)
+ */
public void initialize(Servlet theServlet, ServletRequest theRequest,
ServletResponse theResponse, String theErrorPageURL,
- boolean needsSession, int thebufferSize, boolean iSAutoFlush)
+ boolean isSessionNeeded, int theBufferSize, boolean isAutoFlush)
throws IOException, IllegalStateException, IllegalArgumentException
{
this.originalPageContext.initialize(theServlet, theRequest,
- theResponse, theErrorPageURL, needsSession, thebufferSize,
- iSAutoFlush);
+ theResponse, theErrorPageURL, isSessionNeeded, theBufferSize,
+ isAutoFlush);
}
+ /**
+ * @see PageContext#popBody()
+ */
public JspWriter popBody()
{
return this.originalPageContext.popBody();
}
+ /**
+ * @see PageContext#pushBody()
+ */
public BodyContent pushBody()
{
return this.originalPageContext.pushBody();
}
+ /**
+ * @see PageContext#release()
+ */
public void release()
{
this.originalPageContext.release();
}
+ /**
+ * @see PageContext#removeAttribute(String)
+ */
public void removeAttribute(String theName)
{
this.originalPageContext.removeAttribute(theName);
}
+ /**
+ * @see PageContext#removeAttribute(String, int)
+ */
public void removeAttribute(String theName, int theScope)
{
this.originalPageContext.removeAttribute(theName, theScope);
}
+ /**
+ * @see PageContext#setAttribute(String, Object)
+ */
public void setAttribute(String theName, Object theAttribute)
{
this.originalPageContext.setAttribute(theName, theAttribute);
}
+ /**
+ * @see PageContext#setAttribute(String, Object)
+ */
public void setAttribute(String theName, Object theAttribute,
int theScope)
{
1.8 +76 -2
jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractServletContextWrapper.java
Index: AbstractServletContextWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractServletContextWrapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractServletContextWrapper.java 16 Feb 2002 23:25:50 -0000 1.7
+++ AbstractServletContextWrapper.java 17 Feb 2002 18:44:23 -0000 1.8
@@ -78,7 +78,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AbstractServletContextWrapper.java,v 1.7 2002/02/16 23:25:50
vmassol Exp $
+ * @version $Id: AbstractServletContextWrapper.java,v 1.8 2002/02/17 18:44:23
vmassol Exp $
*/
public abstract class AbstractServletContextWrapper implements ServletContext
{
@@ -118,11 +118,17 @@
this.originalContext = theOriginalContext;
}
+ /**
+ * @see ServletContext#setAttribute(String, Object)
+ */
public void setAttribute(String theName, Object theAttribute)
{
this.originalContext.setAttribute(theName, theAttribute);
}
+ /**
+ * @see ServletContext#removeAttribute(String)
+ */
public void removeAttribute(String theName)
{
this.originalContext.removeAttribute(theName);
@@ -133,7 +139,12 @@
* log messages that can then later be retrieved and asserted by the
* test case writer. Note that the throwable is not saved.
*
+ * @param theMessage a <code>String</code> that describes the error or
+ * exception
+ * @param theCause the <code>Throwable</code> error or exception
+ *
* @see #getLogs()
+ * @see ServletContext#log(String, Throwable)
*/
public void log(String theMessage, Throwable theCause)
{
@@ -148,7 +159,11 @@
* log messages that can then later be retrieved and asserted by the
* test case writer. Note that the throwable is not saved.
*
+ * @param theMessage a <code>String</code> that describes the error or
+ * exception
+ *
* @see #getLogs()
+ * @see ServletContext#log(String)
*/
public void log(String theMessage)
{
@@ -163,7 +178,18 @@
* log messages that can then later be retrieved and asserted by the
* test case writer. Note that the throwable is not saved.
*
+ * @param theException the exception to log
+ * @param theMessage a <code>String</code> that describes the error or
+ * exception
+ *
* @see #getLogs()
+ * @see ServletContext#log(Exception, String)
+ *
+ * @deprecated As of Java Servlet API 2.1, use
+ * {@link #log(String message, Throwable throwable)} instead.
+ * This method was originally defined to write an exception's
+ * stack trace and an explanatory error message to the servlet
+ * log file.
*/
public void log(Exception theException, String theMessage)
{
@@ -173,38 +199,58 @@
this.originalContext.log(theException, theMessage);
}
+ /**
+ * @see ServletContext#getServlets()
+ */
public Enumeration getServlets()
{
return this.originalContext.getServlets();
}
+ /**
+ * @see ServletContext#getServletNames()
+ */
public Enumeration getServletNames()
{
return this.originalContext.getServletNames();
}
+ /**
+ * @see ServletContext#getServlet(String)
+ */
public Servlet getServlet(String theName) throws ServletException
{
return this.originalContext.getServlet(theName);
}
+ /**
+ * @see ServletContext#getServerInfo()
+ */
public String getServerInfo()
{
return this.originalContext.getServerInfo();
}
+ /**
+ * @see ServletContext#getResourceAsStream(String)
+ */
public InputStream getResourceAsStream(String thePath)
{
return this.originalContext.getResourceAsStream(thePath);
}
+ /**
+ * @see ServletContext#getResource(String)
+ */
public URL getResource(String thePath) throws MalformedURLException
{
return this.originalContext.getResource(thePath);
}
/**
+ * @param thePath a string specifying the pathname to the resource
* @return our request dispatcher wrapper
+ * @see ServletContext#getRequestDispatcher(String)
*/
public RequestDispatcher getRequestDispatcher(String thePath)
{
@@ -214,9 +260,10 @@
}
/**
+ * @param theName a string specifying the name of a servlet to wrap
* @return our request dispatcher wrapper or null if the servlet cannot
* be found.
- * @see javax.servlet.ServletContext.getNamedDispatcher(String)
+ * @see ServletContext#getNamedDispatcher(String)
*/
public RequestDispatcher getNamedDispatcher(String theName)
{
@@ -233,38 +280,59 @@
return wrappedDispatcher;
}
+ /**
+ * @see ServletContext#getRealPath(String)
+ */
public String getRealPath(String thePath)
{
return this.originalContext.getRealPath(thePath);
}
+ /**
+ * @see ServletContext#getMinorVersion()
+ */
public int getMinorVersion()
{
return this.originalContext.getMinorVersion();
}
+ /**
+ * @see ServletContext#getMimeType(String)
+ */
public String getMimeType(String theFilename)
{
return this.originalContext.getMimeType(theFilename);
}
+ /**
+ * @see ServletContext#getMajorVersion()
+ */
public int getMajorVersion()
{
return this.originalContext.getMajorVersion();
}
+ /**
+ * @see ServletContext#getInitParameterNames()
+ */
public Enumeration getInitParameterNames()
{
return this.originalContext.getInitParameterNames();
}
+ /**
+ * @see ServletContext#getInitParameter(String)
+ */
public String getInitParameter(String theName)
{
return this.originalContext.getInitParameter(theName);
}
/**
+ * @param theUripath a String specifying the context path of another web
+ * application in the container
* @return our servlet context wrapper
+ * @see ServletContext#getContext(String)
*/
public ServletContext getContext(String theUripath)
{
@@ -273,11 +341,17 @@
return context;
}
+ /**
+ * @see ServletContext#getAttributeNames()
+ */
public Enumeration getAttributeNames()
{
return this.originalContext.getAttributeNames();
}
+ /**
+ * @see ServletContext#getAttribute(String)
+ */
public Object getAttribute(String theName)
{
return this.originalContext.getAttribute(theName);
1.8 +23 -20
jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractTestCaller.java
Index: AbstractTestCaller.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractTestCaller.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractTestCaller.java 2 Feb 2002 17:26:55 -0000 1.7
+++ AbstractTestCaller.java 17 Feb 2002 18:44:23 -0000 1.8
@@ -1,4 +1,6 @@
/*
+ * ====================================================================
+ *
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
@@ -23,10 +25,10 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Cactus", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact [EMAIL PROTECTED]
+ * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
+ * Foundation" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
@@ -50,6 +52,7 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
package org.apache.cactus.server;
@@ -72,7 +75,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AbstractTestCaller.java,v 1.7 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: AbstractTestCaller.java,v 1.8 2002/02/17 18:44:23 vmassol Exp $
*/
public abstract class AbstractTestCaller
{
@@ -84,9 +87,9 @@
"ServletTestRedirector_TestResults";
/**
- * The logger
+ * The logger.
*/
- protected static Log logger =
+ private static final Log LOGGER =
LogService.getInstance().getLog(AbstractTestCaller.class.getName());
/**
@@ -146,13 +149,13 @@
}
- logger.debug("Test result : [" + result + "]");
+ LOGGER.debug("Test result : [" + result + "]");
// Set the test result.
this.webImplicitObjects.getServletContext().setAttribute(TEST_RESULTS,
result);
- logger.debug("Result saved in context scope");
+ LOGGER.debug("Result saved in context scope");
}
/**
@@ -174,7 +177,7 @@
(WebTestResult) (this.webImplicitObjects.getServletContext().
getAttribute(TEST_RESULTS));
- logger.debug("Test Result = [" + result + "]");
+ LOGGER.debug("Test Result = [" + result + "]");
// Write back the results as a serialized object to the outgoing stream.
try {
@@ -192,7 +195,7 @@
} catch (IOException e) {
String message = "Error writing WebTestResult instance to output " +
"stream";
- logger.error(message, e);
+ LOGGER.error(message, e);
throw new ServletException(message, e);
}
}
@@ -223,11 +226,11 @@
if (className == null) {
String message = "Missing class name parameter [" +
ServiceDefinition.CLASS_NAME_PARAM + "] in HTTP request.";
- logger.error(message);
+ LOGGER.error(message);
throw new ServletException(message);
}
- logger.debug("Class to call = " + className);
+ LOGGER.debug("Class to call = " + className);
return className;
}
@@ -246,11 +249,11 @@
if (methodName == null) {
String message = "Missing method name parameter [" +
ServiceDefinition.METHOD_NAME_PARAM + "] in HTTP request.";
- logger.error(message);
+ LOGGER.error(message);
throw new ServletException(message);
}
- logger.debug("Method to call = " + methodName);
+ LOGGER.debug("Method to call = " + methodName);
return methodName;
}
@@ -268,7 +271,7 @@
boolean isAutomaticSession = new Boolean(autoSession).booleanValue();
- logger.debug("Auto session is " + isAutomaticSession);
+ LOGGER.debug("Auto session is " + isAutomaticSession);
return isAutomaticSession;
}
@@ -282,7 +285,7 @@
String theTestCaseName) throws ServletException
{
// Print info on the classloader used to load this class
- if (logger.isDebugEnabled()) {
+ if (LOGGER.isDebugEnabled()) {
StringBuffer buffer = new StringBuffer("Classloaders = ");
ClassLoader classLoader = this.getClass().getClassLoader();
while (classLoader != null) {
@@ -292,7 +295,7 @@
buffer.append(", ");
}
}
- logger.debug(buffer.toString());
+ LOGGER.debug(buffer.toString());
}
// Get the class to call and build an instance of it.
@@ -306,7 +309,7 @@
} catch (Exception e) {
String message = "Error instantiating class [" + theClassName +
"(" + theTestCaseName + ")]";
- logger.error(message, e);
+ LOGGER.error(message, e);
throw new ServletException(message, e);
}
@@ -336,7 +339,7 @@
message += " your test classes reside in a specific webapp,\r\n";
message += "\t- Something else ... !";
- logger.error(message, e);
+ LOGGER.error(message, e);
throw new ServletException(message, e);
}
1.10 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractTestController.java
Index: AbstractTestController.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/AbstractTestController.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AbstractTestController.java 2 Feb 2002 17:26:55 -0000 1.9
+++ AbstractTestController.java 17 Feb 2002 18:44:23 -0000 1.10
@@ -69,12 +69,12 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: AbstractTestController.java,v 1.9 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: AbstractTestController.java,v 1.10 2002/02/17 18:44:23 vmassol Exp
$
*/
public abstract class AbstractTestController
{
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(AbstractTestController.class.getName());
1.15 +1 -7
jakarta-cactus/src/framework/share/org/apache/cactus/server/JspTestCaller.java
Index: JspTestCaller.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/JspTestCaller.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- JspTestCaller.java 2 Feb 2002 17:26:55 -0000 1.14
+++ JspTestCaller.java 17 Feb 2002 18:44:23 -0000 1.15
@@ -68,16 +68,10 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: JspTestCaller.java,v 1.14 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: JspTestCaller.java,v 1.15 2002/02/17 18:44:23 vmassol Exp $
*/
public class JspTestCaller extends ServletTestCaller
{
- /**
- * The logger
- */
- protected static Log logger =
- LogService.getInstance().getLog(JspTestCaller.class.getName());
-
/**
* @param theObjects the implicit objects coming from the redirector
*/
1.11 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/server/JspTestRedirector.java
Index: JspTestRedirector.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/JspTestRedirector.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- JspTestRedirector.java 2 Feb 2002 17:26:55 -0000 1.10
+++ JspTestRedirector.java 17 Feb 2002 18:44:23 -0000 1.11
@@ -65,7 +65,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: JspTestRedirector.java,v 1.10 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: JspTestRedirector.java,v 1.11 2002/02/17 18:44:23 vmassol Exp $
*/
public class JspTestRedirector
{
@@ -80,7 +80,7 @@
}
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(JspTestRedirector.class.getName());
1.17 +1 -7
jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletTestCaller.java
Index: ServletTestCaller.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletTestCaller.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ServletTestCaller.java 2 Feb 2002 17:26:55 -0000 1.16
+++ ServletTestCaller.java 17 Feb 2002 18:44:23 -0000 1.17
@@ -69,16 +69,10 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: ServletTestCaller.java,v 1.16 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: ServletTestCaller.java,v 1.17 2002/02/17 18:44:23 vmassol Exp $
*/
public class ServletTestCaller extends AbstractTestCaller
{
- /**
- * The logger
- */
- protected static Log logger =
- LogService.getInstance().getLog(ServletTestCaller.class.getName());
-
/**
* @param theObjects the implicit objects coming from the redirector
*/
1.14 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletTestRedirector.java
Index: ServletTestRedirector.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletTestRedirector.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ServletTestRedirector.java 2 Feb 2002 17:26:55 -0000 1.13
+++ ServletTestRedirector.java 17 Feb 2002 18:44:23 -0000 1.14
@@ -67,7 +67,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: ServletTestRedirector.java,v 1.13 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: ServletTestRedirector.java,v 1.14 2002/02/17 18:44:23 vmassol Exp $
* @see ServletTestCaller
*/
public class ServletTestRedirector extends HttpServlet
@@ -83,7 +83,7 @@
}
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(ServletTestRedirector.class.getName());
1.6 +2 -2
jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletUtil.java
Index: ServletUtil.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/ServletUtil.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ServletUtil.java 2 Feb 2002 17:26:55 -0000 1.5
+++ ServletUtil.java 17 Feb 2002 18:44:23 -0000 1.6
@@ -64,12 +64,12 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: ServletUtil.java,v 1.5 2002/02/02 17:26:55 vmassol Exp $
+ * @version $Id: ServletUtil.java,v 1.6 2002/02/17 18:44:23 vmassol Exp $
*/
public class ServletUtil
{
/**
- * The logger
+ * The LOGGER
*/
private static Log logger =
LogService.getInstance().getLog(ServletUtil.class.getName());
1.5 +5 -5
jakarta-cactus/src/framework/share/org/apache/cactus/util/log/LogAspect.java
Index: LogAspect.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/util/log/LogAspect.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LogAspect.java 13 Jan 2002 15:17:12 -0000 1.4
+++ LogAspect.java 17 Feb 2002 18:44:24 -0000 1.5
@@ -61,7 +61,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
*
- * @version $Id: LogAspect.java,v 1.4 2002/01/13 15:17:12 vmassol Exp $
+ * @version $Id: LogAspect.java,v 1.5 2002/02/17 18:44:24 vmassol Exp $
*/
public aspect LogAspect
{
@@ -100,7 +100,7 @@
!logObjectCalls() && publicMethodsWithParameterCalls() &&
publicStaticMethodsWithParameterCalls() &&
!publicMethodsWithReturnValueCalls()
{
- // Get the logger to perform logging
+// Get the LOGGER to perform logging
Log logger = LogService.getInstance().getLog(
thisJoinPoint.getSignature().getDeclaringType().getName());
@@ -129,7 +129,7 @@
// The class name that uses the method that has been called
final String targetName = thisJoinPoint.getTarget().getClass().getName();
- // Get the logger to perform logging
+// Get the LOGGER to perform logging
Log logger = LogService.getInstance().getLog(targetName);
if (logger.isDebugEnabled()) {
@@ -154,7 +154,7 @@
!logObjectCalls() && publicMethodsWithParameterCalls() &&
publicMethodsWithReturnValueCalls() &&
publicStaticMethodsWithParameterCalls()
{
- // Get the logger to perform logging
+// Get the LOGGER to perform logging
Log logger = LogService.getInstance().getLog(
thisJoinPoint.getSignature().getDeclaringType().getName());
@@ -193,7 +193,7 @@
// The class name that uses the method that has been called
final String targetName = thisJoinPoint.getTarget().getClass().getName();
- // Get the logger to perform logging
+// Get the LOGGER to perform logging
Log logger = LogService.getInstance().getLog(targetName);
if (logger.isDebugEnabled()) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>