jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Raible" <m...@raibledesigns.com>
Subject Setting up request correctly
Date Wed, 11 Dec 2002 21:12:05 GMT
I have a servlet named LoginServlet that is mapped to the path /auth.
When I test this servlet, do I have to do anything additional to get
this path requested and set the request port, scheme and all that
correctly?  I'm getting a NullPointerException when trying to retrieve
these values.  At least I think I am, maybe some debugging would help -
just wanted to do a quick check.

Here's my test methods:

    public void beingExecute(WebRequest wRequest) {
        wRequest.addParameter("j_username", "tomcat");
        wRequest.addParameter("j_password", "tomcat");
     * Test logging in as user a user
     * @throws Exception
    public void testExecute() throws Exception {
         servlet.execute(request, response);
         // verify user object placed into session
assertTrue(request.getSession().getAttribute(Constants.USER_KEY) !=



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message