You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by jax <ja...@gmail.com> on 2006/08/02 01:52:59 UTC

Another JSP Login problem

Hi Everyone,

I have trawled through this site (and others via google) and I can't the
answer I'm looking for so am posting this question here.

1) I have a jsp page called setup.jsp. This checks for a cookie called
'username'. If it can't find it, then it redirects to login.jsp.

2) login.jsp takes a username and password and submits to setup.jsp.  Before
the 'submit' occurs, a bit of javascript adds 'username' to the cookie with
the value of what is entered by the user.  Once submitted, setup.jsp will
redirect to home.jsp (which requires that there is a username cookie
present).

I have setup a HTTP Request Defaults and a HTTP Cookie Manager.  
My HTTP Request  does a POST and has Redirect Automatically checked on and
Follow Redirects checked on also.

After Running the Thread Group, The Sampler Result contains:
Thread Name: Thread Group 1-1
Sample Start: Tue Aug 01 16:42:32 PDT 2006
Load time: 16
HTTP response code: 200
HTTP response message: OK

HTTP response headers:
HTTP/1.1 200 OK
Date: Tue, 01 Aug 2006 23:42:32 GMT
Server: WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284 with
CR209251
Content-Length: 4009
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie:
JSESSIONID=EPmoLXWNcAHeeSaVzRf4zOwTOtQ3EOq8o81Xjwg5m7wTZqS6DD5L!-1729165304;
path=/

And the Request contains
POST http://localhost:7001/RAVEmanage/rm_login.jsp

POST data:
j_username=jleslie&j_password=summer1

[no cookies]

Request Headers:

AND I am redirected to the login.jsp page.  

Can someone please tell me what I am doing wrong?

Thanks in advance,

Jax.

-- 
View this message in context: http://www.nabble.com/Another-JSP-Login-problem-tf2036939.html#a5605313
Sent from the JMeter - User forum at Nabble.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 Beanshell Listener

Posted by sebb <se...@gmail.com>.
No need to use BeanShell for this.

See: http://issues.apache.org/bugzilla/show_bug.cgi?id=40149

On 04/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
>
> I Have been able to use the Beanshell sampler to output the value of a
> variable to the command prompt using the print command. Can anyone tell me
> how to log the same data to a log file and which command do we need to use
> in this case.
>
> Regards
> Tarun
>
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Thursday, August 03, 2006 11:39 PM
> To: JMeter Users List
> Subject: Re: How to use Beanshell Listener
>
> http://jakarta.apache.org/jmeter/usermanual/get-started.html
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Sampler
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Assertion
>
> On 03/08/06, Chris Hansen <tc...@xmission.com> wrote:
> > Hey sebb, you just answered a question that I hadn't asked (yet) since I'm
> a bit
> > overloaded - I couldn't get beanshell running either and didn't realize
> that I
> > needed to put the beanshell.jar into the lib directory.
> >
> > I'm sure I would have found mention of that in the documentation; I just
> hadn't
> > got that far.
> >
> > Thanks!
> >
> > chris
> >
> > sebb wrote:
> > > Download the beanshell jar and put it in the lib directory.
> > >
> > > Read the BeanShell documentation and
> > >
> > >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Listener
> > >
> > >
> > > and the JavaDoc for sampleEvent and sampleResult.
> > >
> > > The rest is up to you - I've never needed to use it; I just added for
> > > completeness and because someone asked for it.
> > >
> > > What are you trying to do?
> > >
> > > On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> > >> Hi sebb,
> > >>
> > >> Could you please tell me how to use the BeanShell listener.
> > >>
> > >> Regards
> > >> Tarun
> > >>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> 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
> > >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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 Beanshell Listener

Posted by sebb <se...@gmail.com>.
This won't execute anything, as there is no call to makefile().

Remove the class and method wrappers, and just include the code.

S.
On 04/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> Hi,
>
> I did write the following script in the Beanshell sampler but then its still
> giving an exception
>
>
> import java.io.*
>
>  public class SniffTest
> {
>         public void makefile()
>          {
>
>                 try{
>                             String outfile = "C:\\output1.txt";
>                             BufferedWriter out = new BufferedWriter(new
> FileWriter(outfile));
>                             out.write("${sitemap}");
>                             out.close();
>                             print("${sitemap}")
>                                           }
>
>
>         catch(Exception e){
>
>         }
>
> }
> }
>
> Not too sure as this is running properly as a java file.
>
> Regards
> Tarun
>
> -----Original Message-----
> From: prakash abraham [mailto:prakashma@gmail.com]
> Sent: Friday, August 04, 2006 11:50 AM
> To: JMeter Users List
> Subject: Re: How to use Beanshell Listener
>
> we can access all the java packages in beanshell script,
> just import the java.io.* and create a file and log your data to it as you
> do with normal java pgms.
>
>
> On 8/4/06, Tarun Khurana <ta...@induslogic.com> wrote:
> >
> >
> > I Have been able to use the Beanshell sampler to output the value of a
> > variable to the command prompt using the print command. Can anyone tell me
> > how to log the same data to a log file and which command do we need to use
> > in this case.
> >
> > Regards
> > Tarun
> >
> >
> > -----Original Message-----
> > From: sebb [mailto:sebbaz@gmail.com]
> > Sent: Thursday, August 03, 2006 11:39 PM
> > To: JMeter Users List
> > Subject: Re: How to use Beanshell Listener
> >
> > http://jakarta.apache.org/jmeter/usermanual/get-started.html
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> > ll_Sampler
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> > ll_Assertion
> >
> > On 03/08/06, Chris Hansen <tc...@xmission.com> wrote:
> > > Hey sebb, you just answered a question that I hadn't asked (yet) since
> > I'm
> > a bit
> > > overloaded - I couldn't get beanshell running either and didn't realize
> > that I
> > > needed to put the beanshell.jar into the lib directory.
> > >
> > > I'm sure I would have found mention of that in the documentation; I just
> > hadn't
> > > got that far.
> > >
> > > Thanks!
> > >
> > > chris
> > >
> > > sebb wrote:
> > > > Download the beanshell jar and put it in the lib directory.
> > > >
> > > > Read the BeanShell documentation and
> > > >
> > > >
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> > ll_Listener
> > > >
> > > >
> > > > and the JavaDoc for sampleEvent and sampleResult.
> > > >
> > > > The rest is up to you - I've never needed to use it; I just added for
> > > > completeness and because someone asked for it.
> > > >
> > > > What are you trying to do?
> > > >
> > > > On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> > > >> Hi sebb,
> > > >>
> > > >> Could you please tell me how to use the BeanShell listener.
> > > >>
> > > >> Regards
> > > >> Tarun
> > > >>
> > > >>
> > > >>
> > > >> ---------------------------------------------------------------------
> > > >> 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
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>

---------------------------------------------------------------------
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 Beanshell Listener

Posted by Tarun Khurana <ta...@induslogic.com>.
Hi, 

I did write the following script in the Beanshell sampler but then its still
giving an exception


import java.io.*

 public class SniffTest
{
	public void makefile()
	 {

	    	try{
		            String outfile = "C:\\output1.txt";
		            BufferedWriter out = new BufferedWriter(new
FileWriter(outfile));
		            out.write("${sitemap}");
		            out.close();    	
		            print("${sitemap}")	
	                                  }
 

   	catch(Exception e){
    		
    	}
    
}
}

Not too sure as this is running properly as a java file.

Regards
Tarun

-----Original Message-----
From: prakash abraham [mailto:prakashma@gmail.com] 
Sent: Friday, August 04, 2006 11:50 AM
To: JMeter Users List
Subject: Re: How to use Beanshell Listener

we can access all the java packages in beanshell script,
just import the java.io.* and create a file and log your data to it as you
do with normal java pgms.


On 8/4/06, Tarun Khurana <ta...@induslogic.com> wrote:
>
>
> I Have been able to use the Beanshell sampler to output the value of a
> variable to the command prompt using the print command. Can anyone tell me
> how to log the same data to a log file and which command do we need to use
> in this case.
>
> Regards
> Tarun
>
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Thursday, August 03, 2006 11:39 PM
> To: JMeter Users List
> Subject: Re: How to use Beanshell Listener
>
> http://jakarta.apache.org/jmeter/usermanual/get-started.html
>
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Sampler
>
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Assertion
>
> On 03/08/06, Chris Hansen <tc...@xmission.com> wrote:
> > Hey sebb, you just answered a question that I hadn't asked (yet) since
> I'm
> a bit
> > overloaded - I couldn't get beanshell running either and didn't realize
> that I
> > needed to put the beanshell.jar into the lib directory.
> >
> > I'm sure I would have found mention of that in the documentation; I just
> hadn't
> > got that far.
> >
> > Thanks!
> >
> > chris
> >
> > sebb wrote:
> > > Download the beanshell jar and put it in the lib directory.
> > >
> > > Read the BeanShell documentation and
> > >
> > >
>
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Listener
> > >
> > >
> > > and the JavaDoc for sampleEvent and sampleResult.
> > >
> > > The rest is up to you - I've never needed to use it; I just added for
> > > completeness and because someone asked for it.
> > >
> > > What are you trying to do?
> > >
> > > On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> > >> Hi sebb,
> > >>
> > >> Could you please tell me how to use the BeanShell listener.
> > >>
> > >> Regards
> > >> Tarun
> > >>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> 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
> > >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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 Beanshell Listener

Posted by prakash abraham <pr...@gmail.com>.
we can access all the java packages in beanshell script,
just import the java.io.* and create a file and log your data to it as you
do with normal java pgms.


On 8/4/06, Tarun Khurana <ta...@induslogic.com> wrote:
>
>
> I Have been able to use the Beanshell sampler to output the value of a
> variable to the command prompt using the print command. Can anyone tell me
> how to log the same data to a log file and which command do we need to use
> in this case.
>
> Regards
> Tarun
>
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Thursday, August 03, 2006 11:39 PM
> To: JMeter Users List
> Subject: Re: How to use Beanshell Listener
>
> http://jakarta.apache.org/jmeter/usermanual/get-started.html
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Sampler
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Assertion
>
> On 03/08/06, Chris Hansen <tc...@xmission.com> wrote:
> > Hey sebb, you just answered a question that I hadn't asked (yet) since
> I'm
> a bit
> > overloaded - I couldn't get beanshell running either and didn't realize
> that I
> > needed to put the beanshell.jar into the lib directory.
> >
> > I'm sure I would have found mention of that in the documentation; I just
> hadn't
> > got that far.
> >
> > Thanks!
> >
> > chris
> >
> > sebb wrote:
> > > Download the beanshell jar and put it in the lib directory.
> > >
> > > Read the BeanShell documentation and
> > >
> > >
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
> ll_Listener
> > >
> > >
> > > and the JavaDoc for sampleEvent and sampleResult.
> > >
> > > The rest is up to you - I've never needed to use it; I just added for
> > > completeness and because someone asked for it.
> > >
> > > What are you trying to do?
> > >
> > > On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> > >> Hi sebb,
> > >>
> > >> Could you please tell me how to use the BeanShell listener.
> > >>
> > >> Regards
> > >> Tarun
> > >>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> 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
> > >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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 Beanshell Listener

Posted by Tarun Khurana <ta...@induslogic.com>.
I Have been able to use the Beanshell sampler to output the value of a
variable to the command prompt using the print command. Can anyone tell me
how to log the same data to a log file and which command do we need to use
in this case.

Regards
Tarun


-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Thursday, August 03, 2006 11:39 PM
To: JMeter Users List
Subject: Re: How to use Beanshell Listener

http://jakarta.apache.org/jmeter/usermanual/get-started.html
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
ll_Sampler
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
ll_Assertion

On 03/08/06, Chris Hansen <tc...@xmission.com> wrote:
> Hey sebb, you just answered a question that I hadn't asked (yet) since I'm
a bit
> overloaded - I couldn't get beanshell running either and didn't realize
that I
> needed to put the beanshell.jar into the lib directory.
>
> I'm sure I would have found mention of that in the documentation; I just
hadn't
> got that far.
>
> Thanks!
>
> chris
>
> sebb wrote:
> > Download the beanshell jar and put it in the lib directory.
> >
> > Read the BeanShell documentation and
> >
> >
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
ll_Listener
> >
> >
> > and the JavaDoc for sampleEvent and sampleResult.
> >
> > The rest is up to you - I've never needed to use it; I just added for
> > completeness and because someone asked for it.
> >
> > What are you trying to do?
> >
> > On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> >> Hi sebb,
> >>
> >> Could you please tell me how to use the BeanShell listener.
> >>
> >> Regards
> >> Tarun
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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 Beanshell Listener

Posted by sebb <se...@gmail.com>.
http://jakarta.apache.org/jmeter/usermanual/get-started.html
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Sampler
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Assertion

On 03/08/06, Chris Hansen <tc...@xmission.com> wrote:
> Hey sebb, you just answered a question that I hadn't asked (yet) since I'm a bit
> overloaded - I couldn't get beanshell running either and didn't realize that I
> needed to put the beanshell.jar into the lib directory.
>
> I'm sure I would have found mention of that in the documentation; I just hadn't
> got that far.
>
> Thanks!
>
> chris
>
> sebb wrote:
> > Download the beanshell jar and put it in the lib directory.
> >
> > Read the BeanShell documentation and
> >
> > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Listener
> >
> >
> > and the JavaDoc for sampleEvent and sampleResult.
> >
> > The rest is up to you - I've never needed to use it; I just added for
> > completeness and because someone asked for it.
> >
> > What are you trying to do?
> >
> > On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> >> Hi sebb,
> >>
> >> Could you please tell me how to use the BeanShell listener.
> >>
> >> Regards
> >> Tarun
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
>
> ---------------------------------------------------------------------
> 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 Beanshell Listener

Posted by Chris Hansen <tc...@xmission.com>.
Hey sebb, you just answered a question that I hadn't asked (yet) since I'm a bit
overloaded - I couldn't get beanshell running either and didn't realize that I
needed to put the beanshell.jar into the lib directory.

I'm sure I would have found mention of that in the documentation; I just hadn't
got that far.

Thanks!

chris

sebb wrote:
> Download the beanshell jar and put it in the lib directory.
> 
> Read the BeanShell documentation and
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Listener
> 
> 
> and the JavaDoc for sampleEvent and sampleResult.
> 
> The rest is up to you - I've never needed to use it; I just added for
> completeness and because someone asked for it.
> 
> What are you trying to do?
> 
> On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
>> Hi sebb,
>>
>> Could you please tell me how to use the BeanShell listener.
>>
>> Regards
>> Tarun
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 

---------------------------------------------------------------------
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 Beanshell Listener

Posted by Tarun Khurana <ta...@induslogic.com>.
I basically want to output the value of a variable to a file at runtime
itself. Can you suggest me another method to do the same. 

Regards
Tarun


-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Thursday, August 03, 2006 7:12 PM
To: JMeter Users List
Subject: Re: How to use Beanshell Listener

Download the beanshell jar and put it in the lib directory.

Read the BeanShell documentation and

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

and the JavaDoc for sampleEvent and sampleResult.

The rest is up to you - I've never needed to use it; I just added for
completeness and because someone asked for it.

What are you trying to do?

On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> Hi sebb,
>
> Could you please tell me how to use the BeanShell listener.
>
> Regards
> Tarun
>
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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 Beanshell Listener

Posted by sebb <se...@gmail.com>.
Download the beanshell jar and put it in the lib directory.

Read the BeanShell documentation and

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

and the JavaDoc for sampleEvent and sampleResult.

The rest is up to you - I've never needed to use it; I just added for
completeness and because someone asked for it.

What are you trying to do?

On 03/08/06, Tarun Khurana <ta...@induslogic.com> wrote:
> Hi sebb,
>
> Could you please tell me how to use the BeanShell listener.
>
> Regards
> Tarun
>
>
>
> ---------------------------------------------------------------------
> 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


How to use Beanshell Listener

Posted by Tarun Khurana <ta...@induslogic.com>.
Hi sebb, 

Could you please tell me how to use the BeanShell listener.

Regards
Tarun



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


Re: Another JSP Login problem

Posted by sebb <se...@gmail.com>.
On 02/08/06, jax <ja...@gmail.com> wrote:
>
> Hi Everyone,
>
> I have trawled through this site (and others via google) and I can't the
> answer I'm looking for so am posting this question here.
>
> 1) I have a jsp page called setup.jsp. This checks for a cookie called
> 'username'. If it can't find it, then it redirects to login.jsp.
>
> 2) login.jsp takes a username and password and submits to setup.jsp.  Before
> the 'submit' occurs, a bit of javascript adds 'username' to the cookie with
> the value of what is entered by the user.  Once submitted, setup.jsp will
> redirect to home.jsp (which requires that there is a username cookie
> present).
>
> I have setup a HTTP Request Defaults and a HTTP Cookie Manager.
> My HTTP Request  does a POST and has Redirect Automatically checked on and
> Follow Redirects checked on also.
>
> After Running the Thread Group, The Sampler Result contains:
> Thread Name: Thread Group 1-1
> Sample Start: Tue Aug 01 16:42:32 PDT 2006
> Load time: 16
> HTTP response code: 200
> HTTP response message: OK
>
> HTTP response headers:
> HTTP/1.1 200 OK
> Date: Tue, 01 Aug 2006 23:42:32 GMT
> Server: WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284 with
> CR209251
> Content-Length: 4009
> Content-Type: text/html;charset=ISO-8859-1
> Set-Cookie:
> JSESSIONID=EPmoLXWNcAHeeSaVzRf4zOwTOtQ3EOq8o81Xjwg5m7wTZqS6DD5L!-1729165304;
> path=/
>
> And the Request contains
> POST http://localhost:7001/RAVEmanage/rm_login.jsp
>
> POST data:
> j_username=jleslie&j_password=summer1
>
> [no cookies]
>
> Request Headers:
>
> AND I am redirected to the login.jsp page.
>
> Can someone please tell me what I am doing wrong?

Cookies are only sent back if:
+ There is a Cookie Manager in scope
+ The cookie matches the host and path

Are you sure that the host that set the cookie is the same as the one
that requires it?

Are you using JMeter 2.2?

[There were some substantial fixes to cookie handling in 2.2]

> Thanks in advance,
>
> Jax.
>
> --
> View this message in context: http://www.nabble.com/Another-JSP-Login-problem-tf2036939.html#a5605313
> Sent from the JMeter - User forum at Nabble.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: Another JSP Login problem

Posted by sebb <se...@gmail.com>.
On 03/08/06, Richard <rd...@siu.edu.ar> wrote:
> jax wrote:
>
> > 2) login.jsp takes a username and password and submits to setup.jsp.  Before
> > the 'submit' occurs, a bit of javascript adds 'username' to the cookie with
> > the value of what is entered by the user.  Once submitted, setup.jsp will
> > redirect to home.jsp (which requires that there is a username cookie
> > present).
> >
>
> Remember jmeter doesn't behave like a full browser... if you're adding
> 'username' to the cookie with javascript i think that wouldn't work on
> jmeter. That's why you're always at login.jsp, the cookie never contains
> 'username', or i think so :D...
>

True if it's javascript  - that runs in the browser, and JMeter will not run it.

However JSP pages run on the server, so they can do what they want;
JMeter does not care how the cookie is generated, so long as it is
sent back to JMeter with the correct path and expiry date etc.

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


Re: Another JSP Login problem

Posted by Richard <rd...@siu.edu.ar>.
jax wrote:

> 2) login.jsp takes a username and password and submits to setup.jsp.  Before
> the 'submit' occurs, a bit of javascript adds 'username' to the cookie with
> the value of what is entered by the user.  Once submitted, setup.jsp will
> redirect to home.jsp (which requires that there is a username cookie
> present).
> 

Remember jmeter doesn't behave like a full browser... if you're adding
'username' to the cookie with javascript i think that wouldn't work on
jmeter. That's why you're always at login.jsp, the cookie never contains
'username', or i think so :D...

Regards
Richard


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