You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Renz Daluz <re...@yahoo.com> on 2005/10/26 01:08:15 UTC

how to use org.apache.struts.action.TOKEN in JMeter

Hello,

Is there a way to use struts TOKEN in JMeter? I'm
trying to do an UPDATE and SAVE web test but since I
can't pass a valid TOKEN to the above request, my
action class is just invalidating my request and not
doing the UPDATE or SAVE.

If not, is there a work-around for this (instead of
removing the token validation in every action class).

Thanks in advance,

/Renz


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter

Posted by sebb <se...@gmail.com>.
Might be possible to create a specific Struts Processor in due course.

Please file a Bugzilla enhancement if you would like this.

If you use JMeter proxy to record a sample session, that could be
saved and attached to the request as an example. [Remember to splat
any private details first].

S.
On 26/10/05, Renz Daluz <re...@yahoo.com> wrote:
> Hi Sebb,
>
> Thanks for the help.
>
> I think the Regex Extractor Post Processor will do the
> trick. I look onto this now.
>
>
> Regards,
> /Renz
>
> --- sebb <se...@gmail.com> wrote:
>
> > Perhaps the HTML Link Parser will do what you want?
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser
> >
> > If not, I think you will need to use the Regex
> > Extractor Post
> > Processor to extract the TOKEN and add it to the
> > next request.
> >
> > S.
> > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > wrote:
> > > Hi Sebb,
> > >
> > > Nope, struts TOKEN is not a Cookie, but it is a
> > hidden
> > > input parameters of a html form which is
> > dynamically
> > > added by struts. It is dynamically generated using
> > > timestamp. This way, it will minimized the request
> > to
> > > be sent more than once. e.g (if you send an add
> > > request, then click the refresh button, which will
> > > basically send another add request of the same
> > data
> > > and will create a duplicate record)
> > >
> > >
> > > So whenever you send a form, a dynamic TOKEN is
> > always
> > > part of the request. Then in one of your save or
> > > update servlet (action servlet in Struts), you can
> > > validate this token. If it is valid, continue the
> > > process, otherwise you can either save this token
> > or
> > > redirect to other page with message error.
> > >
> > >
> > > Hope I explained it clear.
> > >
> > > Thanks,
> > > /Renz
> > >
> > > --- sebb <se...@gmail.com> wrote:
> > >
> > > > Never used Struts - is the TOKEN a Cookie, or
> > does
> > > > Struts use URL
> > > > rewriting, or what?
> > > >
> > > > S.
> > > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > > wrote:
> > > > > Hello,
> > > > >
> > > > > Is there a way to use struts TOKEN in JMeter?
> > I'm
> > > > > trying to do an UPDATE and SAVE web test but
> > since
> > > > I
> > > > > can't pass a valid TOKEN to the above request,
> > my
> > > > > action class is just invalidating my request
> > and
> > > > not
> > > > > doing the UPDATE or SAVE.
> > > > >
> > > > > If not, is there a work-around for this
> > (instead
> > > > of
> > > > > removing the token validation in every action
> > > > class).
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > > /Renz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > > > > http://mail.yahoo.com
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > jmeter-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > > jmeter-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Yahoo! FareChase: Search multiple travel sites in
> > one click.
> > > http://farechase.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter (new problem- solved)

Posted by Renz Daluz <re...@yahoo.com>.
Thanks guys, 

It worked.


- Sebb: I think I'm ok with this solution and no need
to log this to bugzilla.



Regards,
/Renz

--- sebb <se...@gmail.com> wrote:

> The RE would be better as:
> 
>
name="org\.apache\.struts\.taglib\.html\.TOKEN".*?value="(.*?)"
> 
> Otherwise the .* could grab too much data. Remember
> * is greedy - it
> matches as much as possible.
> 
> S.
> On 26/10/05, Noam Paz <no...@db.com> wrote:
> >
> >
> >
> >
> >
> > Renz,
> > you can do something like
> >
> > (Embedded image moved to file: pic23811.jpg)
> >
> > In the regulat expression write
> >
>
name=\"org.apache.struts.taglib.html.TOKEN\".*value=\"(.*)\"
> >
> > Best regards
> >
> > Noam Paz
> >
> >
> >
> >
> >
> >              Renz Daluz <re...@yahoo.com>
> >
> >              26.10.2005 06:37                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                    To
> >                                                   
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                       JMeter Users
> List <jm...@jakarta.apache.org>
> >                                                   
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                    cc
> >                                                   
>                                                     
>                                                     
>                                         Please
> respond to
> >                                                   
>                                                     
>                                                     
>                       "JMeter Users List"
> <jm...@jakarta.apache.org>                    
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                          Subject
> >                                                   
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                       Re: how to use
> org.apache.struts.action.TOKEN in JMeter (new
> problem)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hello,
> >
> > This is now what I'm planning to do.
> >
> > I have two http request. The first request (edit)
> will
> > bring up an edit page and inside that, an hidden
> field
> > with dynamic value is generated.
> >
> > The second request is the save page. Now, in this
> > request I want to get the hidden field from first
> > request(edit) and pass it as a parameter in the
> second
> > request (save). How can I do this with Regex
> extrator?
> >
> > Or how can I do this senario? Is there a sample
> for
> > this?
> >
> > Thanks,
> > /Laurence
> >
> > --- Renz Daluz <re...@yahoo.com> wrote:
> >
> > > Hi Sebb,
> > >
> > > Thanks for the help.
> > >
> > > I think the Regex Extractor Post Processor will
> do
> > > the
> > > trick. I look onto this now.
> > >
> > >
> > > Regards,
> > > /Renz
> > >
> > > --- sebb <se...@gmail.com> wrote:
> > >
> > > > Perhaps the HTML Link Parser will do what you
> > > want?
> > > >
> > > >
> > >
> >
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser
> > > >
> > > > If not, I think you will need to use the Regex
> > > > Extractor Post
> > > > Processor to extract the TOKEN and add it to
> the
> > > > next request.
> > > >
> > > > S.
> > > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > > wrote:
> > > > > Hi Sebb,
> > > > >
> > > > > Nope, struts TOKEN is not a Cookie, but it
> is a
> > > > hidden
> > > > > input parameters of a html form which is
> > > > dynamically
> > > > > added by struts. It is dynamically generated
> > > using
> > > > > timestamp. This way, it will minimized the
> > > request
> > > > to
> > > > > be sent more than once. e.g (if you send an
> add
> > > > > request, then click the refresh button,
> which
> > > will
> 
=== message truncated ===



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter (new problem)

Posted by sebb <se...@gmail.com>.
The RE would be better as:

name="org\.apache\.struts\.taglib\.html\.TOKEN".*?value="(.*?)"

Otherwise the .* could grab too much data. Remember * is greedy - it
matches as much as possible.

S.
On 26/10/05, Noam Paz <no...@db.com> wrote:
>
>
>
>
>
> Renz,
> you can do something like
>
> (Embedded image moved to file: pic23811.jpg)
>
> In the regulat expression write
> name=\"org.apache.struts.taglib.html.TOKEN\".*value=\"(.*)\"
>
> Best regards
>
> Noam Paz
>
>
>
>
>
>              Renz Daluz <re...@yahoo.com>
>
>              26.10.2005 06:37                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To
>                                                                                                                                                                                                                                                                                                                                                                                                                        JMeter Users List <jm...@jakarta.apache.org>
>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            cc
>                                                                                                                                                                                                      Please respond to
>                                                                                                                                                                                    "JMeter Users List" <jm...@jakarta.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Subject
>                                                                                                                                                                                                                                                                                                                                                                                                                        Re: how to use org.apache.struts.action.TOKEN in JMeter (new problem)
>
>
>
>
>
>
>
>
>
>
>
> Hello,
>
> This is now what I'm planning to do.
>
> I have two http request. The first request (edit) will
> bring up an edit page and inside that, an hidden field
> with dynamic value is generated.
>
> The second request is the save page. Now, in this
> request I want to get the hidden field from first
> request(edit) and pass it as a parameter in the second
> request (save). How can I do this with Regex extrator?
>
> Or how can I do this senario? Is there a sample for
> this?
>
> Thanks,
> /Laurence
>
> --- Renz Daluz <re...@yahoo.com> wrote:
>
> > Hi Sebb,
> >
> > Thanks for the help.
> >
> > I think the Regex Extractor Post Processor will do
> > the
> > trick. I look onto this now.
> >
> >
> > Regards,
> > /Renz
> >
> > --- sebb <se...@gmail.com> wrote:
> >
> > > Perhaps the HTML Link Parser will do what you
> > want?
> > >
> > >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser
> > >
> > > If not, I think you will need to use the Regex
> > > Extractor Post
> > > Processor to extract the TOKEN and add it to the
> > > next request.
> > >
> > > S.
> > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > wrote:
> > > > Hi Sebb,
> > > >
> > > > Nope, struts TOKEN is not a Cookie, but it is a
> > > hidden
> > > > input parameters of a html form which is
> > > dynamically
> > > > added by struts. It is dynamically generated
> > using
> > > > timestamp. This way, it will minimized the
> > request
> > > to
> > > > be sent more than once. e.g (if you send an add
> > > > request, then click the refresh button, which
> > will
> > > > basically send another add request of the same
> > > data
> > > > and will create a duplicate record)
> > > >
> > > >
> > > > So whenever you send a form, a dynamic TOKEN is
> > > always
> > > > part of the request. Then in one of your save or
> > > > update servlet (action servlet in Struts), you
> > can
> > > > validate this token. If it is valid, continue
> > the
> > > > process, otherwise you can either save this
> > token
> > > or
> > > > redirect to other page with message error.
> > > >
> > > >
> > > > Hope I explained it clear.
> > > >
> > > > Thanks,
> > > > /Renz
> > > >
> > > > --- sebb <se...@gmail.com> wrote:
> > > >
> > > > > Never used Struts - is the TOKEN a Cookie, or
> > > does
> > > > > Struts use URL
> > > > > rewriting, or what?
> > > > >
> > > > > S.
> > > > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > > > wrote:
> > > > > > Hello,
> > > > > >
> > > > > > Is there a way to use struts TOKEN in
> > JMeter?
> > > I'm
> > > > > > trying to do an UPDATE and SAVE web test but
> > > since
> > > > > I
> > > > > > can't pass a valid TOKEN to the above
> > request,
> > > my
> > > > > > action class is just invalidating my request
> > > and
> > > > > not
> > > > > > doing the UPDATE or SAVE.
> > > > > >
> > > > > > If not, is there a work-around for this
> > > (instead
> > > > > of
> > > > > > removing the token validation in every
> > action
> > > > > class).
> > > > > >
> > > > > > Thanks in advance,
> > > > > >
> > > > > > /Renz
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > __________________________________
> > > > > > Yahoo! Mail - PC Magazine Editors' Choice
> > 2005
> > > > > > http://mail.yahoo.com
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > > > > jmeter-user-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > > jmeter-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Yahoo! FareChase: Search multiple travel sites
> > in
> > > one click.
> > > > http://farechase.yahoo.com
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>
> --
>
> Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter (new problem)

Posted by Noam Paz <no...@db.com>.




Renz,
you can do something like

(Embedded image moved to file: pic23811.jpg)

In the regulat expression write
name=\"org.apache.struts.taglib.html.TOKEN\".*value=\"(.*)\"

Best regards

Noam Paz




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             Renz Daluz <re...@yahoo.com>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             26.10.2005 06:37                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To 
                                                                                                                                                                                                                                                                                                                                                                                                                       JMeter Users List <jm...@jakarta.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           cc 
                                                                                                                                                                                                     Please respond to                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                   "JMeter Users List" <jm...@jakarta.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Subject 
                                                                                                                                                                                                                                                                                                                                                                                                                       Re: how to use org.apache.struts.action.TOKEN in JMeter (new problem)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              





Hello,

This is now what I'm planning to do.

I have two http request. The first request (edit) will
bring up an edit page and inside that, an hidden field
with dynamic value is generated.

The second request is the save page. Now, in this
request I want to get the hidden field from first
request(edit) and pass it as a parameter in the second
request (save). How can I do this with Regex extrator?

Or how can I do this senario? Is there a sample for
this?

Thanks,
/Laurence

--- Renz Daluz <re...@yahoo.com> wrote:

> Hi Sebb,
>
> Thanks for the help.
>
> I think the Regex Extractor Post Processor will do
> the
> trick. I look onto this now.
>
>
> Regards,
> /Renz
>
> --- sebb <se...@gmail.com> wrote:
>
> > Perhaps the HTML Link Parser will do what you
> want?
> >
> >
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser
> >
> > If not, I think you will need to use the Regex
> > Extractor Post
> > Processor to extract the TOKEN and add it to the
> > next request.
> >
> > S.
> > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > wrote:
> > > Hi Sebb,
> > >
> > > Nope, struts TOKEN is not a Cookie, but it is a
> > hidden
> > > input parameters of a html form which is
> > dynamically
> > > added by struts. It is dynamically generated
> using
> > > timestamp. This way, it will minimized the
> request
> > to
> > > be sent more than once. e.g (if you send an add
> > > request, then click the refresh button, which
> will
> > > basically send another add request of the same
> > data
> > > and will create a duplicate record)
> > >
> > >
> > > So whenever you send a form, a dynamic TOKEN is
> > always
> > > part of the request. Then in one of your save or
> > > update servlet (action servlet in Struts), you
> can
> > > validate this token. If it is valid, continue
> the
> > > process, otherwise you can either save this
> token
> > or
> > > redirect to other page with message error.
> > >
> > >
> > > Hope I explained it clear.
> > >
> > > Thanks,
> > > /Renz
> > >
> > > --- sebb <se...@gmail.com> wrote:
> > >
> > > > Never used Struts - is the TOKEN a Cookie, or
> > does
> > > > Struts use URL
> > > > rewriting, or what?
> > > >
> > > > S.
> > > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > > wrote:
> > > > > Hello,
> > > > >
> > > > > Is there a way to use struts TOKEN in
> JMeter?
> > I'm
> > > > > trying to do an UPDATE and SAVE web test but
> > since
> > > > I
> > > > > can't pass a valid TOKEN to the above
> request,
> > my
> > > > > action class is just invalidating my request
> > and
> > > > not
> > > > > doing the UPDATE or SAVE.
> > > > >
> > > > > If not, is there a work-around for this
> > (instead
> > > > of
> > > > > removing the token validation in every
> action
> > > > class).
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > > /Renz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Yahoo! Mail - PC Magazine Editors' Choice
> 2005
> > > > > http://mail.yahoo.com
> > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > jmeter-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > > jmeter-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Yahoo! FareChase: Search multiple travel sites
> in
> > one click.
> > > http://farechase.yahoo.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
>
>





__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org




--

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Re: how to use org.apache.struts.action.TOKEN in JMeter (new problem)

Posted by Renz Daluz <re...@yahoo.com>.
 
Hello,

This is now what I'm planning to do.

I have two http request. The first request (edit) will
bring up an edit page and inside that, an hidden field
with dynamic value is generated. 

The second request is the save page. Now, in this
request I want to get the hidden field from first
request(edit) and pass it as a parameter in the second
request (save). How can I do this with Regex extrator?

Or how can I do this senario? Is there a sample for
this?

Thanks,
/Laurence

--- Renz Daluz <re...@yahoo.com> wrote:

> Hi Sebb,
> 
> Thanks for the help.
> 
> I think the Regex Extractor Post Processor will do
> the
> trick. I look onto this now.
> 
> 
> Regards,
> /Renz
> 
> --- sebb <se...@gmail.com> wrote:
> 
> > Perhaps the HTML Link Parser will do what you
> want?
> > 
> >
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser
> > 
> > If not, I think you will need to use the Regex
> > Extractor Post
> > Processor to extract the TOKEN and add it to the
> > next request.
> > 
> > S.
> > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > wrote:
> > > Hi Sebb,
> > >
> > > Nope, struts TOKEN is not a Cookie, but it is a
> > hidden
> > > input parameters of a html form which is
> > dynamically
> > > added by struts. It is dynamically generated
> using
> > > timestamp. This way, it will minimized the
> request
> > to
> > > be sent more than once. e.g (if you send an add
> > > request, then click the refresh button, which
> will
> > > basically send another add request of the same
> > data
> > > and will create a duplicate record)
> > >
> > >
> > > So whenever you send a form, a dynamic TOKEN is
> > always
> > > part of the request. Then in one of your save or
> > > update servlet (action servlet in Struts), you
> can
> > > validate this token. If it is valid, continue
> the
> > > process, otherwise you can either save this
> token
> > or
> > > redirect to other page with message error.
> > >
> > >
> > > Hope I explained it clear.
> > >
> > > Thanks,
> > > /Renz
> > >
> > > --- sebb <se...@gmail.com> wrote:
> > >
> > > > Never used Struts - is the TOKEN a Cookie, or
> > does
> > > > Struts use URL
> > > > rewriting, or what?
> > > >
> > > > S.
> > > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > > wrote:
> > > > > Hello,
> > > > >
> > > > > Is there a way to use struts TOKEN in
> JMeter?
> > I'm
> > > > > trying to do an UPDATE and SAVE web test but
> > since
> > > > I
> > > > > can't pass a valid TOKEN to the above
> request,
> > my
> > > > > action class is just invalidating my request
> > and
> > > > not
> > > > > doing the UPDATE or SAVE.
> > > > >
> > > > > If not, is there a work-around for this
> > (instead
> > > > of
> > > > > removing the token validation in every
> action
> > > > class).
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > > /Renz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Yahoo! Mail - PC Magazine Editors' Choice
> 2005
> > > > > http://mail.yahoo.com
> > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > jmeter-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > > jmeter-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Yahoo! FareChase: Search multiple travel sites
> in
> > one click.
> > > http://farechase.yahoo.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > >
> > >
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> 	
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter

Posted by Renz Daluz <re...@yahoo.com>.
Hi Sebb,

Thanks for the help.

I think the Regex Extractor Post Processor will do the
trick. I look onto this now.


Regards,
/Renz

--- sebb <se...@gmail.com> wrote:

> Perhaps the HTML Link Parser will do what you want?
> 
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser
> 
> If not, I think you will need to use the Regex
> Extractor Post
> Processor to extract the TOKEN and add it to the
> next request.
> 
> S.
> On 26/10/05, Renz Daluz <re...@yahoo.com>
> wrote:
> > Hi Sebb,
> >
> > Nope, struts TOKEN is not a Cookie, but it is a
> hidden
> > input parameters of a html form which is
> dynamically
> > added by struts. It is dynamically generated using
> > timestamp. This way, it will minimized the request
> to
> > be sent more than once. e.g (if you send an add
> > request, then click the refresh button, which will
> > basically send another add request of the same
> data
> > and will create a duplicate record)
> >
> >
> > So whenever you send a form, a dynamic TOKEN is
> always
> > part of the request. Then in one of your save or
> > update servlet (action servlet in Struts), you can
> > validate this token. If it is valid, continue the
> > process, otherwise you can either save this token
> or
> > redirect to other page with message error.
> >
> >
> > Hope I explained it clear.
> >
> > Thanks,
> > /Renz
> >
> > --- sebb <se...@gmail.com> wrote:
> >
> > > Never used Struts - is the TOKEN a Cookie, or
> does
> > > Struts use URL
> > > rewriting, or what?
> > >
> > > S.
> > > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > > wrote:
> > > > Hello,
> > > >
> > > > Is there a way to use struts TOKEN in JMeter?
> I'm
> > > > trying to do an UPDATE and SAVE web test but
> since
> > > I
> > > > can't pass a valid TOKEN to the above request,
> my
> > > > action class is just invalidating my request
> and
> > > not
> > > > doing the UPDATE or SAVE.
> > > >
> > > > If not, is there a work-around for this
> (instead
> > > of
> > > > removing the token validation in every action
> > > class).
> > > >
> > > > Thanks in advance,
> > > >
> > > > /Renz
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > > > http://mail.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
> > __________________________________
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter

Posted by sebb <se...@gmail.com>.
Perhaps the HTML Link Parser will do what you want?

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_Link_Parser

If not, I think you will need to use the Regex Extractor Post
Processor to extract the TOKEN and add it to the next request.

S.
On 26/10/05, Renz Daluz <re...@yahoo.com> wrote:
> Hi Sebb,
>
> Nope, struts TOKEN is not a Cookie, but it is a hidden
> input parameters of a html form which is dynamically
> added by struts. It is dynamically generated using
> timestamp. This way, it will minimized the request to
> be sent more than once. e.g (if you send an add
> request, then click the refresh button, which will
> basically send another add request of the same data
> and will create a duplicate record)
>
>
> So whenever you send a form, a dynamic TOKEN is always
> part of the request. Then in one of your save or
> update servlet (action servlet in Struts), you can
> validate this token. If it is valid, continue the
> process, otherwise you can either save this token or
> redirect to other page with message error.
>
>
> Hope I explained it clear.
>
> Thanks,
> /Renz
>
> --- sebb <se...@gmail.com> wrote:
>
> > Never used Struts - is the TOKEN a Cookie, or does
> > Struts use URL
> > rewriting, or what?
> >
> > S.
> > On 26/10/05, Renz Daluz <re...@yahoo.com>
> > wrote:
> > > Hello,
> > >
> > > Is there a way to use struts TOKEN in JMeter? I'm
> > > trying to do an UPDATE and SAVE web test but since
> > I
> > > can't pass a valid TOKEN to the above request, my
> > > action class is just invalidating my request and
> > not
> > > doing the UPDATE or SAVE.
> > >
> > > If not, is there a work-around for this (instead
> > of
> > > removing the token validation in every action
> > class).
> > >
> > > Thanks in advance,
> > >
> > > /Renz
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > > http://mail.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter

Posted by Renz Daluz <re...@yahoo.com>.
Hi Sebb,

Nope, struts TOKEN is not a Cookie, but it is a hidden
input parameters of a html form which is dynamically
added by struts. It is dynamically generated using
timestamp. This way, it will minimized the request to
be sent more than once. e.g (if you send an add
request, then click the refresh button, which will
basically send another add request of the same data
and will create a duplicate record)


So whenever you send a form, a dynamic TOKEN is always
part of the request. Then in one of your save or
update servlet (action servlet in Struts), you can
validate this token. If it is valid, continue the
process, otherwise you can either save this token or
redirect to other page with message error. 


Hope I explained it clear. 

Thanks,
/Renz

--- sebb <se...@gmail.com> wrote:

> Never used Struts - is the TOKEN a Cookie, or does
> Struts use URL
> rewriting, or what?
> 
> S.
> On 26/10/05, Renz Daluz <re...@yahoo.com>
> wrote:
> > Hello,
> >
> > Is there a way to use struts TOKEN in JMeter? I'm
> > trying to do an UPDATE and SAVE web test but since
> I
> > can't pass a valid TOKEN to the above request, my
> > action class is just invalidating my request and
> not
> > doing the UPDATE or SAVE.
> >
> > If not, is there a work-around for this (instead
> of
> > removing the token validation in every action
> class).
> >
> > Thanks in advance,
> >
> > /Renz
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: how to use org.apache.struts.action.TOKEN in JMeter

Posted by sebb <se...@gmail.com>.
Never used Struts - is the TOKEN a Cookie, or does Struts use URL
rewriting, or what?

S.
On 26/10/05, Renz Daluz <re...@yahoo.com> wrote:
> Hello,
>
> Is there a way to use struts TOKEN in JMeter? I'm
> trying to do an UPDATE and SAVE web test but since I
> can't pass a valid TOKEN to the above request, my
> action class is just invalidating my request and not
> doing the UPDATE or SAVE.
>
> If not, is there a work-around for this (instead of
> removing the token validation in every action class).
>
> Thanks in advance,
>
> /Renz
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org