When faced with similar problems. I forward to a quick and dirty jsp page to print out everything in the request. This sometimes can provide the piece of magic inspiration thats solves the problem.
Don't know if it will help but here it is:


------------Begin request.jsp ------------------------------

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<bean:page id="req" property="request"/>

The contents of the request: <BR/>

<bean:write name="req"/>

<table>
<tr>
<td>AuthType</td><td><bean:write name="req" property="authType"/></td>
</tr><tr>
<td>ContextPath</td><td><bean:write name="req" property="contextPath"/></td>
</tr><tr>
<td valign=top>Header</td><td>
<table>
<logic:iterate id="name" name="req" property="headerNames">
<tr><td><bean:write name="name"/></td><td><%= ((HttpServletRequest)req).getHeader((String)name) %></td></tr>
</logic:iterate>
</table>
</td>
</tr><tr>
<td>Method</td><td><bean:write name="req" property="method"/></td>
</tr><tr>
<td>PathInfo</td><td><bean:write name="req" property="pathInfo"/></td>
</tr><tr>
<td>PathTranslated</td><td><bean:write name="req" property="pathTranslated"/></td>
</tr><tr>
<td>QueryString</td><td><bean:write name="req" property="queryString"/></td>
</tr><tr>
<td>RemoteUser</td><td><bean:write name="req" property="remoteUser"/></td>
</tr><tr>
<td>RequestedSessionId</td><td><bean:write name="req" property="requestedSessionId"/></td>
</tr><tr>
<td>RequestURI</td><td><bean:write name="req" property="requestURI"/></td>
</tr><tr>
<td>RequestURL</td><td><bean:write name="req" property="requestURL"/></td>
</tr>
<tr>
<td>ServletPath</td><td><bean:write name="req" property="servletPath"/></td>
</tr>
<tr>
<td valign="top">Attributes</td><td>
<table>
<logic:iterate id="name" name="req" property="attributeNames">
<tr><td><bean:write name="name"/></td><td><%= req.getAttribute((String)name) %></td></tr>
</logic:iterate>
</table>
</td>
</tr>
<tr>
<td vlaign="top">Parameters</td><td>
<table>
<logic:iterate id="name" name="req" property="parameterNames">
<tr><td><bean:write name="name"/></td><td><%= req.getParameter((String)name) %></td></tr>
</logic:iterate>
</table>
</td>
</tr>



</table>


------------End request.jsp ---------------------------------

Gareth.

Ps. it was designed for tiles so it doesn't have <html> or <body> tags.


Jindal, Ashwini wrote:


Max,

That is what the problem is I dont see the "test" in the request when it reaches the jsp. Now where and why does it lose is question?

...AJ

-----Original Message-----
From: Max Cooper [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 2:02 PM
To: Struts Users Mailing List
Subject: Re: Loosing Objects in the Request.


Are you certain that the request is getting to the JSP with the test in it?


-Max

----- Original Message -----
From: "Jindal, Ashwini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 11:43 AM
Subject: Loosing Objects in the Request.


Hi All,


I am trying to set some attributes in the request object

request.setAttribute("test", "TEST");

before invoking the forward:

mapping.findForward(Constants.SUCCESS_KEY);

When I look up in the jsp:


<logic:present name="test" scope="request"> FOUND! </logic:present>


The implementation is in:


       public ActionForward execute(ActionMapping mapping, ActionForm form,
              HttpServletRequest request, HttpServletResponse response)
throws Exception


I do not find the object "test".


Any explanation???

..AJ


--------------------------------------------------------------------- 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]






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



Reply via email to