Following are tools I'm using:
      to build
             Cactus-1.7
             Tomcat-5.0.2  the default servlet container in Netbeans
             Ant-1.6.2     the default builder in Netbeans (manually
cactify-ing the war)
             Sun j2sdk-1.5.0_03
             Windows XP service pack 2 up-to-date
             Netbeans 4.0
      to run tests
            run or debug using the IDE to start the Tomcat.
                  (I can only debug the testXXX methods.  The beginXXX and
endXX methods
                        do not 'show up' in the debugger.)
            Cactus-1.7 and JUnit 3.8.1 from the command prompt


I found that this code:

    public void beginProcessRequestNotReseeding(WebRequest request) {
        System.out.println("beginProcessRequestNotReseeding");
        request.addHeader("HTTP_SM_USER", strHttpUser);
        request.addHeader("Referer", strRefUrl);
        request.addHeader("Asdf", "qwerty");
        System.out.println(request.getHeader("HTTP_SM_USER"));
        System.out.println(request.getHeader("Referer"));
        System.out.println(request.getHeader("Asdf"));
        System.out.println(".....Completed client side begin.");
    }

will give these results, which indicates the 'distortion' is not done
during the addition to the request.

beginProcessRequestNotReseeding
usdldap
http://localhost/NavigationTest.html
qwerty


I have examined the source code for both the addHeader() and the
getHeader() methods.  I am at a loss for an explanation.



Regards,
Bill


Willie (Bill) Armstrong
Sun Certified Programmer for the Java 2 Platform 1.4
931.788.0493 -  office;  860.961.0998 - Cell
Email - [EMAIL PROTECTED]
IMs - warmstr2 on Sametime;
       -  mmbtoao on AIM;
       -  MysticBill on Yahoo Messenger


----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------




                                                                                
                                                      
                      Kazuhito SUGURI                                           
                                                      
                      <suguri.kazuhito         To:      
cactus-user@jakarta.apache.org                                                
                      @lab.ntt.co.jp>          cc:                              
                                                      
                                               Subject: Re: Problem with 
referer header.                                              
                      05/11/2005 08:57                                          
                                                      
                      PM                                                        
                                                      
                      Please respond                                            
                                                      
                      to "Cactus Users                                          
                                                      
                      List"                                                     
                                                      
                                                                                
                                                      




Hi Willie,

In article
<[EMAIL PROTECTED]>,
Wed, 11 May 2005 16:13:12 -0500,
Willie H Armstrong <[EMAIL PROTECTED]> wrote:
warmstr2> The code that now shows the error is
warmstr2>
warmstr2> /*
warmstr2>  * SampleServletTest.java
warmstr2>  *
warmstr2>  * Created on May 11, 2005, 2:50 PM
warmstr2>  */
warmstr2>
warmstr2> import org.apache.cactus.ServletTestCase;
warmstr2> import org.apache.cactus.WebRequest;
warmstr2>
warmstr2> public class SampleServletTest
warmstr2>         extends ServletTestCase {
warmstr2>     public SampleServletTest(String name) {
warmstr2>         super(name);
warmstr2>     }
warmstr2>
warmstr2>     public void beginReferer(WebRequest request) {
warmstr2>         request.addHeader("Referer", "/test.jsp");
warmstr2>     }
warmstr2>
warmstr2>     public void testReferer() {
warmstr2>         String strReferer = request.getHeader("Referer");
warmstr2>         assertEquals("/test.jsp", request.getHeader("Referer"));
warmstr2>     }
warmstr2> }

This test-case works fine for me....


In article
<[EMAIL PROTECTED]>,
Wed, 11 May 2005 14:40:50 -0500,
Willie H Armstrong <[EMAIL PROTECTED]> wrote:
warmstr2> I am running Tomcat 5.0.28 which is the default for the Netbeans
IDE which
warmstr2> I am using.  I develop the classes in the IDE, launch tomcat from
the IDE,
warmstr2> then run the test from a command prompt.

Followings are tools I'm using:
             Cactus-1.7
             Tomcat-5.0.28           as a servlet container.
             Ant-1.6.2 (using cactifywar and cactus Ant task)
             Sun j2sdk-1.4.2_07
             FedoraCore 2 (kernel 2.6.10-1.711_FC2)
             text editor :-)

Could you make the test works by changing tools you are using?

Regards,
----
Kazuhito SUGURI

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to