RE: Can only redirect when forward path only has directories

2003-12-02 Thread Eric Bessette
I'm using Tomcat 4.1.2.  I looked through the server.xml file and couldn't
find anything that would do this.

I'm not familiar enough with struts to know what processes the ActionForward
that is returned from an Action.  Thanks for you input.

Thanks,
Eric

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 7:57 PM
To: Struts Users Mailing List
Subject: RE: Can only redirect when forward path only has directories


You might want to check your web server configuration to see if the
directory index knows to show the index.jsp as the index page or to do
something else, such as redirect to an error page or a particular page.
What is your web server?

Regards,
David

-Original Message-
From: Bessette [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 10:30 PM
To: [EMAIL PROTECTED]
Subject: Can only redirect when forward path only has directories


After days of trying to figure out why my actions wouldn't forward, only
redirect, I finally narrowed down the problem.

If I use a forward path of "/dir1/dir2" the action will always redirect, no
matter what the redirect value of the forward is.  However, if I use
"/dir1/dir2/index.jsp" then the action will redirect or forward correctly
depending on the value.

This seems like a bug to me.  Is there any reason why this should happen?
It doesn't really matter to me, since the action uri is displayed in the
address bar, but it seems very odd.

Thanks,
Eric


-
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: Can't store object in request from an action

2003-11-17 Thread Eric Bessette
Thanks for the info.  It is redirecting to the jsp url, however the redirect
attribute is false.

Thanks,
Eric

-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 15, 2003 6:44 AM
To: Struts Users Mailing List
Subject: Re: Can't store object in request from an action


If the request arrives at the JSP from the input attribute on the action
mapping due to a validation error (from calling validate() on the
ActionForm), the action is not part of the processing loop. Struts calls
validate() and then forwards the request directly to the input JSP if a
validation error is encountered.

If there is no validation error occurring, it may be that you have the
redirect attribute of the forward set to true, which results in the action
processing the request and sending a redirect to the JSP, and then the
browser requests the JSP directly, which will be a new request (and thus
anything you put in the request in the action won't be visible to the JSP).
If the URL in the browser window shows the JSP's URL (instead of the Action
URL) at this point, that is what is happening.

-Max

- Original Message -
From: "Bessette" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 10:31 PM
Subject: RE: Can't store object in request from an action


> I know that's not the issue, because I also print out all of the request
> keys and their objects.
>
> The main purpose behind this is getting the ActionErrors and
ActionMessages
> to work properly.  I use saveErrors and saveMessages, but the
>  tag doesn't display anything.
>
> If anyone has any insights, they'd be very appreciated.
>
> Thanks,
> Eric
>
> -Original Message-
> From: Richard Yee [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 14, 2003 9:21 PM
> To: Struts Users Mailing List
> Subject: Re: Can't store object in request from an action
>
>
> Try this instead:
>
> ...
> <%= request.getAttribute( "testing" ) %>
> ...
>
> -Richard
>
>
> At 07:38 PM 11/14/2003, you wrote:
> >I'm trying to set an attribute in the request scope from an action.
> >However, when I do the following:
> >
> >...
> >public ActionForward execute(
> > ActionMapping mapping,
> > ActionForm form,
> > HttpServletRequest request,
> > HttpServletResponse response)
> > throws Exception {
> >
> > request.setAttribute( "testing", "This is a test" );
> > return mapping.getInputForward();
> >}
> >...
> >
> >and in my jsp page, I do:
> >
> >...
> ><%= pageContext.findAttribute( "testing" ) %>
> >...
> >
> >
> >I always get null.  Is the request sent to the execute statement the same
> >one used for the forward?  Could this be because I want to forward to the
> >input jsp?  Please, please help me out.  I've been spinning my wheels for
a
> >few days now trying to figure this out.
> >
> >Thanks,
> >Eric
> >
> >
> >-
> >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]