Re: Call action from JSP

2002-09-05 Thread Kris Schneider

Without Struts (sometimes even with it), I'd use either of the following
in a JSP:



or


  
  ...


For servlet code, I'd probably go with
RequestDispatcher.forward(ServletRequest request, ServletResponse
response), using ServletRequest.getRequestDispatcher(String path) to get
the dispatcher.

Joe Barefoot wrote:
> 
> Thank you, I had forgotten about that tag...
> 
> b.t.w., the non-Struts way of forwarding (and retaining the request) is:
> 
> JspFactory.getPageContext().forward( URL );
> 
> peace,
> Joe
> 
> > -Original Message-
> > From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 05, 2002 1:24 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Call action from JSP
> >
> >
> > How about:
> >
> >
> > 
> >   
> >
> > --
> > Martin Cooper
> >
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, September 05, 2002 10:19 AM
> > > 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]>

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Call action from JSP

2002-09-05 Thread Ted Husted

This is fine. Just leave out both the name and input attributes, since 
neither apply when there is not an ActionForm.

-Ted.

Piper, James D CECOM SEC EPS wrote:

> I am new to struts and I don't know if this is of any use or if it is even
> right, but when I wanted to call an Action when the user clicked a link I
> used something like (no forms involved):
> 
> Build Database: Button
> 
> and in my struts-config.xml had something like:
> 
>path="/1-5-1_BuildDatabaseAction"
>  type="com.myapp.view.DBAdminClient"
>  name=""
>  input="/1-5_SAMainPage.jsp">
> 
> 
>  
> 
> I left name="" because I wasn't doing anything with a form, just responding
> to a user clicking on a link.  I welcome comments letting me know if this is
> the right way to be doing this or (rather more likely) that I am clueless
> and that there is some other struts mechanism I should be using to handle
> getting access to the action mappings when no forms are involved.
> 
> Thanks,
> 
> - Jim
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 1:40 PM
> 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"
> 
>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]>
> 
> 


-- 
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:
<http://husted.com/struts/book.html>


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




RE: Call action from JSP

2002-09-05 Thread Joe Barefoot

Thank you, I had forgotten about that tag...

b.t.w., the non-Struts way of forwarding (and retaining the request) is:

JspFactory.getPageContext().forward( URL );



peace,
Joe

> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 1:24 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Call action from JSP
> 
> 
> How about:
> 
>
> 
>   
> 
> --
> Martin Cooper
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 05, 2002 10:19 AM
> > 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]>




RE: Call action from JSP

2002-09-05 Thread Martin Cooper

How about:

   

  

--
Martin Cooper


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 10:19 AM
> 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:   
> 
> For additional commands, e-mail: 
> 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Call action from JSP

2002-09-05 Thread Joe Barefoot

Not that I know of.  You can put the request parameters you would like to pass on in 
the query string of the URL you give to response.sendRedirect though. 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 10:59 AM
> To: Struts Users Mailing List
> Subject: RE: Call action from JSP
> 
> 
> 
> 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"  
>   
>
>"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"
> >
> >
> >> "'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:
> >
> &

RE: Call action from JSP

2002-09-05 Thread Tim T. Young


I see nothing wrong with what you are doing.  You don't even need the name
="" in the xml.   You might want to look at  in case you need to
do anything more with maintaining session, etc.

Tim



|+->
||  "Piper, James D CECOM SEC  |
||  EPS"   |
||  <[EMAIL PROTECTED]|
||  .army.mil> |
|| |
||  09/05/2002 01:12 PM|
||  Please respond to "Struts  |
||  Users Mailing List"|
|| |
|+->
  
>---|
  |
   |
  |
   |
  |
   |
  |
   |
  |
   |
  |To: Struts Users Mailing List <[EMAIL PROTECTED]>  
   |
  |cc: 
   |
  |
   |
  |
   |
  |        
           |
  |   Subject: RE: Call action from JSP
   |
  
>---|



Caterpillar: Confidential Green  Retain Until: 10/05/2002
 Retention Category:  G90 -
 Information and Reports





I am new to struts and I don't know if this is of any use or if it is even
right, but when I wanted to call an Action when the user clicked a link I
used something like (no forms involved):

Build Database: Button

and in my struts-config.xml had something like:

 


 

I left name="" because I wasn't doing anything with a form, just responding
to a user clicking on a link.  I welcome comments letting me know if this
is
the right way to be doing this or (rather more likely) that I am clueless
and that there is some other struts mechanism I should be using to handle
getting access to the action mappings when no forms are involved.

Thanks,

- Jim



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 1:40 PM
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"

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




RE: Call action from JSP

2002-09-05 Thread Piper, James D CECOM SEC EPS


I am new to struts and I don't know if this is of any use or if it is even
right, but when I wanted to call an Action when the user clicked a link I
used something like (no forms involved):

Build Database: Button

and in my struts-config.xml had something like:

 


 

I left name="" because I wasn't doing anything with a form, just responding
to a user clicking on a link.  I welcome comments letting me know if this is
the right way to be doing this or (rather more likely) that I am clueless
and that there is some other struts mechanism I should be using to handle
getting access to the action mappings when no forms are involved.

Thanks,

- Jim



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 1:40 PM
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"

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




RE: Call action from JSP

2002-09-05 Thread Tim T. Young


This was sorta mentioned before, but...why not have and index.do instead of
an index.jsp?   Does index.jsp show something to the user or does it just
do some logic and then call the server?
If it does the latter, make it a .do

Tim



   
   
[EMAIL PROTECTED]  
   
om 
   
   
   
09/05/2002 
   
12:58 PM   
   
PleaseTo: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
respond tocc:  
   
"Struts Users  
   
Mailing List"  
   
   
   
     Subject:     RE: Call action from JSP 
   
   
   



Caterpillar: Confidential Green  Retain Until: 10/05/2002
 Retention Category:  G90 -
 Information and Reports





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"

  
  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"
>
>
>"'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:
>
> I

RE: Call action from JSP

2002-09-05 Thread jwang13


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"   


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




RE: Call action from JSP

2002-09-05 Thread Joe Barefoot

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




RE: Call action from JSP

2002-09-05 Thread Galbreath, Mark

You don't need to do it this way - you map the JSP to an Action class in
struts-config.xml and Struts will automatically send the data to the class
when the request URL changes.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 1:40 PM
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"

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




RE: Call action from JSP

2002-09-05 Thread jwang13


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"

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




RE: Call action from JSP

2002-09-05 Thread Galbreath, Mark

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:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: