jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulo R C Siqueira <gangrel...@yahoo.com.br>
Subject Re: problem getting test results
Date Mon, 03 Apr 2006 20:13:31 GMT
Hi,

Getting back to this problem, I've been trying some things here and just found out that if
I comment the "theRequest.setURL" call, the test works. But in this case, I can't specify
the  page that I want to test... 

Also, I found this error message that can be somewhat related to the problem, but I'm sure
really sure of it...

Apr 3, 2006 5:03:44 PM org.apache.commons.httpclient.HttpMethodBase processRedirectResponse
INFO: Redirect requested but followRedirects is disabled

Am I missing something here?

Thanks!

Paulo R C Siqueira <gangrelbr1@yahoo.com.br> escreveu: The source is the same for the
ServletRedirector and for the ServletRedirectorSecure, except that for the ServletRedirectorSecure
I uncomment the two commentted lines in the beginHome mehod.

public class Test extends ServletTestCase {
  public Test( String name ) {
    super( name );
  }
  public void beginHome( WebRequest theRequest ) {
    theRequest.setURL( "localhost", "/teste","/Home.do", null, null );
// theRequest.setRedirectorName( "ServletRedirectorSecure" );
// theRequest.setAuthentication(new FormAuthentication("test","123"));
  }
  public void testHome() {
    assertTrue( "Forcing assertion failure", false );
  }
}

The web.xml too is the same for both the ServletRedirector and the ServletRedirectorSecure,
except that I remove the lines for declarative security when using the ServletRedirector:



        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                            http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  
    action
    org.apache.struts.action.ActionServlet
    
      
config

      
/WEB-INF/struts-config.xml

    
     
      
debug

      
2

    
    
      
detail

      
2

    
    2
  
  
    action
    *.do
  
  
  
   
     Unprotected Resources
     /Logout.do
     /images/*
  
    
    
      
        All Pages
        /*
    
    
      test
    
  

    FORM
    
        /Login.do
        /LoginError.do
    
  
  
    test
  


There is nothing specific to Cactus in the deployment descriptor. I use the following Ant
target to add the Cactus configuration to the web.xml file:


  
    
    
    
        mapping="/ServletRedirectorSecure"/>
  
  
  


Thank You :)

Kazuhito SUGURI  escreveu: Hi Paulo,

In article <20060303140846.38678.qmail@web52104.mail.yahoo.com>,
Fri, 3 Mar 2006 11:08:46 -0300 (ART),
Paulo R C Siqueira  wrote: 
gangrelbr1> It is frustrating... but with ServletRedirector instead of
gangrelbr1> ServletRedirectorSecure it works.
gangrelbr1> This means I will need to run my tests with testing authentication?
gangrelbr1> Or is there something that could be done to solve this problem?

I'm not understanding why authentication makes the problem.
Could you please post following items for further analysis?
- source codes of the test case and web.xml that are using ServletRedirectorSecure
- source codes of the test case and web.xml that are using ServletRedirector

Regards,
----
Kazuhito SUGURI

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
  
---------------------------------
 Yahoo! Search
 DĂȘ uma espiadinha e saiba tudo sobre o Big Brother Brasil.


_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho
agora!
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message