Re: Reaching Action class from Href Link

2001-08-31 Thread CityBoyForLove
Hi,

U can use the link some like this.

click here <
/html:link>

to replace the html form.

enjoy
bala


Reaching Action class from Href Link

2001-08-03 Thread John M. Corro

I've recently begun working with Struts and am looking to create a scenario
where a user can click on a link and trigger some event in an Action class
(ie the clicking of a link would be the same as clicking a form's submit
button).  My understanding is that within Struts forms submit by the post
method by default so I don't know if the only way to reach an Action class
is by an actual form.  Any one have any insight?







RE: Reaching Action class from Href Link

2001-08-03 Thread Fletcher, Ken

I haven't played around with paramID, paramName and paramProperty in the tag
yet (still experimenting).  However, I have been able to get the bean to
show up on the forwarded JSP by putting it in the HttpSession (from the
action class) and then have the JSP access the properties in regular
fashion:



Does anyone else have a more elegant solution to this?

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


In my JSP, I've got:


My link goes here



In my struts-config.xml file, I've got:

...


...






What I'm finding is that my EditProduct action isn't being called at all.
I'm wanting EditProduct in this case to prepopulate the form bean with data
so it will display for editing on the next JSP.  Because of this problem, no
data is being written into the form bean, so my form comes up blank when I
want it to be pre-filled with data.

Any help is greatly appreciated!

--Greg


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I'm using Tomcat.don't know if it'll work using something else.  Maybe
if you show some of your code I can help.

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


It's not working for me, for some reason.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 11:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


 does work, as long as you have
the .do in there (did for me, anyway).

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Reaching Action class from Href Link


Thanks to John and Ken for the assistance.

Point of clarification other interested newbies, using a form's 'action'
value as the link's 'href' value will not work - the reason mine wasn't
working.  For instance,



may work, where as

~~~ or 

will not.




- Original Message -
From: "John Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 11:22 AM
Subject: RE: Reaching Action class from Href Link


> Using the struts html:form tag will set the method to POST by default.
This
> won't prevent you from using the link as you describe though.  The service
> methods of an HttpServlet doPost() and doGet() will accomplish essentially
> the same goal (often doGet() will just call doPost() ).  In the case of
the
> struts ActionServlet, both of these methods call process().  So you can
use
> a query string to pass your parameters (or extra path info if you wish).
>
> So, that was a little long-winded way of saying that your link can look
> like:
> LINK
> TEXT
>
> Hope this helps!!
>
> --John
>
>
>
>
>
> -Original Message-
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Reaching Action class from Href Link
>
>
> I've recently begun working with Struts and am looking to create a
scenario
> where a user can click on a link and trigger some event in an Action class
> (ie the clicking of a link would be the same as clicking a form's submit
> button).  My understanding is that within Struts forms submit by the post
> method by default so I don't know if the only way to reach an Action class
> is by an actual form.  Any one have any insight?
>
>
>



RE: Reaching Action class from Href Link

2001-08-03 Thread Fletcher, Ken

I tried unsuccessfully to do that.  Maybe I missed something - do you still
have to add the bean to the HttpSession?

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:41 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link





In addition, If you set the variables from your bean into an ActionForm you
won't even have to use the  neither.

-Original Message-
From: Fletcher, Ken [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:32 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I haven't played around with paramID, paramName and paramProperty in the tag
yet (still experimenting).  However, I have been able to get the bean to
show up on the forwarded JSP by putting it in the HttpSession (from the
action class) and then have the JSP access the properties in regular
fashion:



Does anyone else have a more elegant solution to this?

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


In my JSP, I've got:


My link goes here



In my struts-config.xml file, I've got:

...


...






What I'm finding is that my EditProduct action isn't being called at all.
I'm wanting EditProduct in this case to prepopulate the form bean with data
so it will display for editing on the next JSP.  Because of this problem, no
data is being written into the form bean, so my form comes up blank when I
want it to be pre-filled with data.

Any help is greatly appreciated!

--Greg


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I'm using Tomcat.don't know if it'll work using something else.  Maybe
if you show some of your code I can help.

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


It's not working for me, for some reason.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 11:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


 does work, as long as you have
the .do in there (did for me, anyway).

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Reaching Action class from Href Link


Thanks to John and Ken for the assistance.

Point of clarification other interested newbies, using a form's 'action'
value as the link's 'href' value will not work - the reason mine wasn't
working.  For instance,



may work, where as

~~~ or 

will not.




- Original Message -
From: "John Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 11:22 AM
Subject: RE: Reaching Action class from Href Link


> Using the struts html:form tag will set the method to POST by default.
This
> won't prevent you from using the link as you describe though.  The service
> methods of an HttpServlet doPost() and doGet() will accomplish essentially
> the same goal (often doGet() will just call doPost() ).  In the case of
the
> struts ActionServlet, both of these methods call process().  So you can
use
> a query string to pass your parameters (or extra path info if you wish).
>
> So, that was a little long-winded way of saying that your link can look
> like:
> LINK
> TEXT
>
> Hope this helps!!
>
> --John
>
>
>
>
>
> -Original Message-
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Reaching Action class from Href Link
>
>
> I've recently begun working with Struts and am looking to create a
scenario
> where a user can click on a link and trigger some event in an Action class
> (ie the clicking of a link would be the same as clicking a form's submit
> button).  My understanding is that within Struts forms submit by the post
> method by default so I don't know if the only way to reach an Action class
> is by an actual form.  Any one have any insight?
>
>
>



Re: Reaching Action class from Href Link

2001-08-03 Thread Martin Cooper

Yes, that's correct. Using extension mapping with Struts, and ".do" in 
particular, is just a Struts convention. I suspect that most people are 
probably following that convention, but it is not a requirement. You are 
free to use a different extension, such as ".act" or ".cmd" or whatever, or 
to use path mapping, if you want.

As you point out, changing the mapping method or the extension after the 
project is in development may have repercussions, so it's a decision you 
really want to make up front, and stick with.

--
Martin Cooper


At 02:09 PM 8/3/01, John M. Corro wrote:
>Ken clarified my point - that in a form's 'action' you don't need to tack
>the '.do' extension to the end of the action mapping (ie
>action="SomeAction").  In a link's 'href' value you do need to tack on the
>'do' extension (ie the value changes to href="SomeAction.do").
>
>I believe this comes w/ a caveat as the '.do' extension can be changed.  By
>default the extension is '.do' in the web.xml file.  I haven't tried this,
>but I would imagine if you changed the extension in the web.xml file, you'd
>have to also reflect the change in your links.
>
>----- Original Message -
>From: "Greg Maletic" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, August 03, 2001 11:57 AM
>Subject: RE: Reaching Action class from Href Link
>
>
> > Now I'm really confused!  Your original problem was that you wanted to
>have
> > a link forward to an action.  Your clarification shows how to do it from a
> > form (" > href will not work.  That doesn't seem to solve your original problem,
>does
> > it?
> >
> > Please let me know what I'm missing here, because I'm having this problem
>as
> > well.
> >
> > Thanks!
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > rg]On Behalf Of John M. Corro
> > Sent: Friday, August 03, 2001 1:33 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Reaching Action class from Href Link
> >
> >
> > Thanks to John and Ken for the assistance.
> >
> > Point of clarification other interested newbies, using a form's 'action'
> > value as the link's 'href' value will not work - the reason mine wasn't
> > working.  For instance,
> >
> > 
> >
> > may work, where as
> >
> > ~~~ or href="SomeAction"~~~>
> >
> > will not.
> >
> >
> >
> >
> > - Original Message -
> > From: "John Schroeder" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, August 03, 2001 11:22 AM
> > Subject: RE: Reaching Action class from Href Link
> >
> >
> > > Using the struts html:form tag will set the method to POST by default.
> > This
> > > won't prevent you from using the link as you describe though.  The
>service
> > > methods of an HttpServlet doPost() and doGet() will accomplish
>essentially
> > > the same goal (often doGet() will just call doPost() ).  In the case of
> > the
> > > struts ActionServlet, both of these methods call process().  So you can
> > use
> > > a query string to pass your parameters (or extra path info if you wish).
> > >
> > > So, that was a little long-winded way of saying that your link can look
> > > like:
> > > href="/someContext/someAction.do?param1=foo¶m2=bar¶m3=baz">LINK
> > > TEXT
> > >
> > > Hope this helps!!
> > >
> > > --John
> > >
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: John M. Corro [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, August 03, 2001 1:07 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Reaching Action class from Href Link
> > >
> > >
> > > I've recently begun working with Struts and am looking to create a
> > scenario
> > > where a user can click on a link and trigger some event in an Action
>class
> > > (ie the clicking of a link would be the same as clicking a form's submit
> > > button).  My understanding is that within Struts forms submit by the
>post
> > > method by default so I don't know if the only way to reach an Action
>class
> > > is by an actual form.  Any one have any insight?
> > >
> > >
> > >
> >
> >
> >





RE: Reaching Action class from Href Link

2001-08-03 Thread Gus Delgado




In addition, If you set the variables from your bean into an ActionForm you
won't even have to use the  neither.

-Original Message-
From: Fletcher, Ken [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:32 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I haven't played around with paramID, paramName and paramProperty in the tag
yet (still experimenting).  However, I have been able to get the bean to
show up on the forwarded JSP by putting it in the HttpSession (from the
action class) and then have the JSP access the properties in regular
fashion:



Does anyone else have a more elegant solution to this?

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


In my JSP, I've got:


My link goes here



In my struts-config.xml file, I've got:

...


...






What I'm finding is that my EditProduct action isn't being called at all.
I'm wanting EditProduct in this case to prepopulate the form bean with data
so it will display for editing on the next JSP.  Because of this problem, no
data is being written into the form bean, so my form comes up blank when I
want it to be pre-filled with data.

Any help is greatly appreciated!

--Greg


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I'm using Tomcat.don't know if it'll work using something else.  Maybe
if you show some of your code I can help.

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


It's not working for me, for some reason.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 11:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


 does work, as long as you have
the .do in there (did for me, anyway).

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Reaching Action class from Href Link


Thanks to John and Ken for the assistance.

Point of clarification other interested newbies, using a form's 'action'
value as the link's 'href' value will not work - the reason mine wasn't
working.  For instance,



may work, where as

~~~ or 

will not.




- Original Message -
From: "John Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 11:22 AM
Subject: RE: Reaching Action class from Href Link


> Using the struts html:form tag will set the method to POST by default.
This
> won't prevent you from using the link as you describe though.  The service
> methods of an HttpServlet doPost() and doGet() will accomplish essentially
> the same goal (often doGet() will just call doPost() ).  In the case of
the
> struts ActionServlet, both of these methods call process().  So you can
use
> a query string to pass your parameters (or extra path info if you wish).
>
> So, that was a little long-winded way of saying that your link can look
> like:
> LINK
> TEXT
>
> Hope this helps!!
>
> --John
>
>
>
>
>
> -Original Message-
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Reaching Action class from Href Link
>
>
> I've recently begun working with Struts and am looking to create a
scenario
> where a user can click on a link and trigger some event in an Action class
> (ie the clicking of a link would be the same as clicking a form's submit
> button).  My understanding is that within Struts forms submit by the post
> method by default so I don't know if the only way to reach an Action class
> is by an actual form.  Any one have any insight?
>
>
>




Re: Reaching Action class from Href Link

2001-08-03 Thread Martin Cooper

If you use the Struts  tag, the value of the 'action' attribute 
is used to look up the corresponding action mapping, and Struts will append 
the ".do" if you are using extension mapping for your servlet.

If you use the Struts  tag with the 'href' attribute, then that 
value is taken literally. You have a bit more flexibility if you use the 
'forward' or 'page' attributes with this tag.

--
Martin Cooper


At 01:32 PM 8/3/01, John M. Corro wrote:
>Thanks to John and Ken for the assistance.
>
>Point of clarification other interested newbies, using a form's 'action'
>value as the link's 'href' value will not work - the reason mine wasn't
>working.  For instance,
>
>
>
>may work, where as
>
>~~~ or 
>
>will not.
>
>
>
>
>- Original Message -
>From: "John Schroeder" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, August 03, 2001 11:22 AM
>Subject: RE: Reaching Action class from Href Link
>
>
> > Using the struts html:form tag will set the method to POST by default.
>This
> > won't prevent you from using the link as you describe though.  The service
> > methods of an HttpServlet doPost() and doGet() will accomplish essentially
> > the same goal (often doGet() will just call doPost() ).  In the case of
>the
> > struts ActionServlet, both of these methods call process().  So you can
>use
> > a query string to pass your parameters (or extra path info if you wish).
> >
> > So, that was a little long-winded way of saying that your link can look
> > like:
> > LINK
> > TEXT
> >
> > Hope this helps!!
> >
> > --John
> >
> >
> >
> >
> >
> > -Original Message-
> > From: John M. Corro [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 03, 2001 1:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: Reaching Action class from Href Link
> >
> >
> > I've recently begun working with Struts and am looking to create a
>scenario
> > where a user can click on a link and trigger some event in an Action class
> > (ie the clicking of a link would be the same as clicking a form's submit
> > button).  My understanding is that within Struts forms submit by the post
> > method by default so I don't know if the only way to reach an Action class
> > is by an actual form.  Any one have any insight?
> >
> >
> >





RE: Reaching Action class from Href Link

2001-08-03 Thread Greg Maletic

Now I'm really confused!  Your original problem was that you wanted to have
a link forward to an action.  Your clarification shows how to do it from a
form ("mailto:[EMAIL PROTECTED]
rg]On Behalf Of John M. Corro
Sent: Friday, August 03, 2001 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Reaching Action class from Href Link


Thanks to John and Ken for the assistance.

Point of clarification other interested newbies, using a form's 'action'
value as the link's 'href' value will not work - the reason mine wasn't
working.  For instance,



may work, where as

~~~ or 

will not.




- Original Message -
From: "John Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 11:22 AM
Subject: RE: Reaching Action class from Href Link


> Using the struts html:form tag will set the method to POST by default.
This
> won't prevent you from using the link as you describe though.  The service
> methods of an HttpServlet doPost() and doGet() will accomplish essentially
> the same goal (often doGet() will just call doPost() ).  In the case of
the
> struts ActionServlet, both of these methods call process().  So you can
use
> a query string to pass your parameters (or extra path info if you wish).
>
> So, that was a little long-winded way of saying that your link can look
> like:
> LINK
> TEXT
>
> Hope this helps!!
>
> --John
>
>
>
>
>
> -Original Message-----
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Reaching Action class from Href Link
>
>
> I've recently begun working with Struts and am looking to create a
scenario
> where a user can click on a link and trigger some event in an Action class
> (ie the clicking of a link would be the same as clicking a form's submit
> button).  My understanding is that within Struts forms submit by the post
> method by default so I don't know if the only way to reach an Action class
> is by an actual form.  Any one have any insight?
>
>
>





RE: Reaching Action class from Href Link

2001-08-03 Thread Greg Maletic

I don't believe I can use this approach because my original JSP has many
links that all lead to the EditProduct action, but each link specifies a
different productId, corresponding to a different product.  I need to wait
until the user clicks on a specific product before I can populate the bean,
and I need to have my action called to do this, which is the source of the
problem.  My action isn't being called at all--it's just going directly to
the next JSP.

After finding out that it wasn't calling my action class, my next question
was:  how does the ActionServlet know what JSP to go to?  The answer is it's
using the "input" tag on the "editProduct" action mapping, and jumping
directly to that.  The Struts docs imply that "input" is only used when a
ActionForm.validate() method returns ActionErrors, but apparently it's not
true:  it's being jumped to in lieu of calling my action.

What have other people experienced when using the "input" tag?

Thanks.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 12:32 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I haven't played around with paramID, paramName and paramProperty in the tag
yet (still experimenting).  However, I have been able to get the bean to
show up on the forwarded JSP by putting it in the HttpSession (from the
action class) and then have the JSP access the properties in regular
fashion:



Does anyone else have a more elegant solution to this?

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


In my JSP, I've got:


My link goes here



In my struts-config.xml file, I've got:

...


...






What I'm finding is that my EditProduct action isn't being called at all.
I'm wanting EditProduct in this case to prepopulate the form bean with data
so it will display for editing on the next JSP.  Because of this problem, no
data is being written into the form bean, so my form comes up blank when I
want it to be pre-filled with data.

Any help is greatly appreciated!

--Greg


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


I'm using Tomcat.don't know if it'll work using something else.  Maybe
if you show some of your code I can help.

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


It's not working for me, for some reason.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 11:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


 does work, as long as you have
the .do in there (did for me, anyway).

-Original Message-----
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Reaching Action class from Href Link


Thanks to John and Ken for the assistance.

Point of clarification other interested newbies, using a form's 'action'
value as the link's 'href' value will not work - the reason mine wasn't
working.  For instance,



may work, where as

~~~ or 

will not.




- Original Message -
From: "John Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 11:22 AM
Subject: RE: Reaching Action class from Href Link


> Using the struts html:form tag will set the method to POST by default.
This
> won't prevent you from using the link as you describe though.  The service
> methods of an HttpServlet doPost() and doGet() will accomplish essentially
> the same goal (often doGet() will just call doPost() ).  In the case of
the
> struts ActionServlet, both of these methods call process().  So you can
use
> a query string to pass your parameters (or extra path info if you wish).
>
> So, that was a little long-winded way of saying that your link can look
> like:
> LINK
> TEXT
>
> Hope this helps!!
>
> --John
>
>
>
>
>
> -Original Message-
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Reaching Action class from Href Link
>
>
> I've recently begun working with Struts and am looking to create a
scenario
> where a user can click on a link and trigger some event in an Action class
> (ie the clicking of a link would be the same as clicking a form's submit
> button).  My understanding is that within Struts forms submit by the post
> method by default so I don't know if the only way to reach an Action class
> is by an actual form.  Any one have any insight?
>
>
>




RE: Reaching Action class from Href Link

2001-08-03 Thread Fletcher, Ken

I'm using Tomcat.don't know if it'll work using something else.  Maybe
if you show some of your code I can help.  

-Original Message-
From: Greg Maletic [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Reaching Action class from Href Link


It's not working for me, for some reason.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Fletcher, Ken
Sent: Friday, August 03, 2001 11:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Reaching Action class from Href Link


 does work, as long as you have
the .do in there (did for me, anyway).

-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Reaching Action class from Href Link


Thanks to John and Ken for the assistance.

Point of clarification other interested newbies, using a form's 'action'
value as the link's 'href' value will not work - the reason mine wasn't
working.  For instance,



may work, where as

~~~ or 

will not.




- Original Message -
From: "John Schroeder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 11:22 AM
Subject: RE: Reaching Action class from Href Link


> Using the struts html:form tag will set the method to POST by default.
This
> won't prevent you from using the link as you describe though.  The service
> methods of an HttpServlet doPost() and doGet() will accomplish essentially
> the same goal (often doGet() will just call doPost() ).  In the case of
the
> struts ActionServlet, both of these methods call process().  So you can
use
> a query string to pass your parameters (or extra path info if you wish).
>
> So, that was a little long-winded way of saying that your link can look
> like:
> LINK
> TEXT
>
> Hope this helps!!
>
> --John
>
>
>
>
>
> -Original Message-----
> From: John M. Corro [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: Reaching Action class from Href Link
>
>
> I've recently begun working with Struts and am looking to create a
scenario
> where a user can click on a link and trigger some event in an Action class
> (ie the clicking of a link would be the same as clicking a form's submit
> button).  My understanding is that within Struts forms submit by the post
> method by default so I don't know if the only way to reach an Action class
> is by an actual form.  Any one have any insight?
>
>
>