re: Loosing Objects in the Request.

2003-04-04 Thread Ted Husted
Is the logic taglib imported to the page?

There should also be a notPresent tag, to test that the taglib is working.

-T.

--
Ted Husted,
Struts in Action 


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


Re: Loosing Objects in the Request.

2003-04-04 Thread Gareth Andrew
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" %>


The contents of the request: 





AuthType

ContextPath

Header
   
   
   <%= 
((HttpServletRequest)req).getHeader((String)name) %>
   
   
   

Method

PathInfo

PathTranslated

QueryString

RemoteUser

RequestedSessionId

RequestURI

RequestURL


ServletPath


Attributes
  
   
   <%= req.getAttribute((String)name) %>
   
   
  


Parameters
  
   
   <%= req.getParameter((String)name) %>
   
   
  




End request.jsp -

Gareth.

Ps. it was designed for tiles so it doesn't have   or  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:

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


Re: Loosing Objects in the Request.

2003-04-03 Thread Max Cooper
AJ,

It seems like that should work, that is why I am asking about other
problems. The most obvious possible problem was that the request just never
gets to the JSP with the test in it, so I wanted to establish that you were
certain that it gets to the JSP and that the test is actually executing and
failing. So the next question is: are you certain that the code in the
Action is executing? Does the request really go to the Action that you think
it does, and is the code for the Action class the same code that has the
setAttribute("test", "TEST") in it? You certainly wouldn't be the first
person to accidentally be running the wrong Action, an Action class file
that was compiled before the setAttribute() call was added to the code, or
having the request end up at a different JSP or a version that was compiled
before the test was added. I would guess that most developers have spent
hours chasing crap like that around at some point in their careers; I know I
have! Since it really seems like your code should work as posted, I am
thinking that something else is going on.

If you change the JSP (add a "Hello from the JSP!" or something) and change
the Action (add a System.out.println("Hello from the Action!") ) do those
changes show up when you make the request? Is redirect set to true on the
forward? That would give you a new request with no "test" attribute in it.

I was thinking for a moment that  might require the attribute
to be something special (a JavaBean), but I just did a test identical to
yours [setAttribute("test", "TEST")] and the tag was able to detect the
presense of the attribute as expected. There doesn't seem to be anything
special due to having the attribute value be a String, or with the attribute
name "test". It should work, so something else must be going wrong in your
setup.

-Max


- Original Message -
From: "Jindal, Ashwini" <[EMAIL PROTECTED]>
To: "Max Cooper" <[EMAIL PROTECTED]>; "Struts Users Mailing List"
<[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 7:34 PM
Subject: RE: Loosing Objects in the Request.


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:



  FOUND!



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]



RE: Loosing Objects in the Request.

2003-04-03 Thread Jindal, Ashwini
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:



  FOUND!



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]



RE: Loosing Objects in the Request.

2003-04-03 Thread David Graham
None of those tags need .  See the user's guide for details:
http://jakarta.apache.org/struts/userGuide/index.html
David



From: "Pingili, Madhupal" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: Loosing Objects in the Request.
Date: Thu, 3 Apr 2003 16:40:06 -0500
Please correct me if I am wrong about this assumption:
All these Tags , , ,
  etc (not sure how many) need  Tag.
That means, if we want to use , we need a  Tag in
JSP even though
we have prepared that(Map/List/Set/String etc) in Action( like
request.setAttribute( ) )
that can be used with  tag.
Is it safe to assume like that? Is there any good document on using these
Tags?
Thanks
Reddy
> -Original Message-
> From:  Max Cooper [SMTP:[EMAIL PROTECTED]
> Sent:  Thursday, April 03, 2003 4: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:
>
>
> 
>   FOUND!
> 
>
>
> 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]


_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


RE: Loosing Objects in the Request.

2003-04-03 Thread Pingili, Madhupal
Please correct me if I am wrong about this assumption:
All these Tags , , ,
  etc (not sure how many) need  Tag.
That means, if we want to use , we need a  Tag in
JSP even though 
we have prepared that(Map/List/Set/String etc) in Action( like
request.setAttribute( ) ) 
that can be used with  tag.

Is it safe to assume like that? Is there any good document on using these
Tags?

Thanks
Reddy


> -Original Message-
> From: Max Cooper [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 4: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:
> 
> 
> 
>   FOUND!
> 
> 
> 
> 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]



Re: Loosing Objects in the Request.

2003-04-03 Thread Max Cooper
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:



  FOUND!



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]