The JSP is an index.jsp and condition has to be check there.

If I use response.sendRedirect(URL) in the JSP scriplet, it seems that a
new request is created during redirect. Is there a simple way to keep the
previous request rather than create a new one?



                                                                                       
                                                
                      "Joe Barefoot"                                                   
                                                
                      <Joe.Barefoot@moti       To:       "Struts Users Mailing List" 
<[EMAIL PROTECTED]>                  
                      va.com>                  cc:                                     
                                                
                                               Subject:  RE: Call action from JSP      
                                                
                      09/05/2002 12:42                                                 
                                                
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      "Struts Users                                                    
                                                
                      Mailing List"                                                    
                                                
                                                                                       
                                                
                                                                                       
                                                



hmmm...why not check your condition and perform this logic in an action
before you even forward to the JSP in the first place?

b.t.w., you can always issue a response.sendRedirect( URL ) in the JSP
scriplet, and give it the URL-mapping for the action you wish to redirect
to.  I don't think that doing this is a great idea, however. :)


peace,
Joe

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 10:40 AM
> To: Struts Users Mailing List
> Subject: RE: Call action from JSP
>
>
>
> I don't use form because I don't need to submit any data. The
> action will
> perform some logic against query string in request and data
> in session, and
> forward wither to a success page or a failure page.
>
> I could put this logic directly in JSP rather than in an action, but I
> don't want so many Java code in JSP.
>
>
>
>
>
>
>                       "Galbreath, Mark"
>
>
>                       <Galbreath@tessco.       To:
> "'Struts Users Mailing List'"
> <[EMAIL PROTECTED]>
>                       com>                     cc:
>
>
>                                                Subject:  RE:
> Call action from JSP
>
>                       09/05/2002 12:27
>
>
>                       PM
>
>
>                       Please respond to
>
>
>                       "Struts Users
>
>
>                       Mailing List"
>
>
>
>
>
>
>
>
>
>
>
> Why would you want to call an Action class directly from a
> JSP (outside a
> form:action block)?
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 1:19 PM
> To: [EMAIL PROTECTED]
> Subject: Call action from JSP
>
>
> Could someone help me on this code:
>
> In *.jsp:
>
> <%
>       if (condition satisfied) {
>             // how to fill this line to call an action, say invoke.do?
>       }
> %>
>
> Thanks.
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>


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







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

Reply via email to