Hi, I have posted this question in many different forum, but I still have not 
found an answer. Perhaps, I will in this list.  

I have a secured resource in Tomcat.
My resources are secured via FORM authentication (j_security_check).
The secured resources are requested from an external page like this:

<form method="post"  action="http://localhost:8080/testApp/secured/userHome.do" name="userHomeForm";>
<input type="hidden" name="mydata" value="MYDATA"/>  
  <input type="submit" value="Enter Here"/>  
</form>

This my login.jsp. I have a business requirement that needs to access the 
"mydata" request parameter from this page.

The values are always null when the requests are made
via a "post". However, this works when the request is made via a "get" I
cannot change my forms to "get" method that is just not possible.  If anyone 
has any
idea what we need to do, please please help us out. Thanks in advance!   This 
works in Tomcat 5.0. But not in the newer releases. And we need to move to a 
newer release.

(I did not paste my entire login.jsp. But I can added if requested) Thanks in 
advance.

<%  
    request.setCharacterEncoding("UTF-
   
    java.util.Enumeration paramNames = request.getParameterNames();  
      
    out.println("<p>My Param Names Enum:</p>");  
    while(paramNames.hasMoreElements()) {  
        out.println("<p>Param Name: " + paramNames.nextElement() + "</p>");  
    }  
   
    String consignmentId = request.getParameter( "mydata" );  
    out.println("<p>My Data:  " + consignmentId + "</p>");  
 %>  
   
 <form method="post" action='<%= response.encodeURL("j_security_check") %>' >  
   <table border="0" >  
     <tr>  
       <th >Username:</th>  
       <td ><input type="text" name="j_username"></td>  
     </tr>  







      

Reply via email to