Re: [Wicket-user] Possible session issue in my app?

2006-07-15 Thread Eelco Hillenius
Where do you store which user is currently selected? In the
wicket-examples project, there are several examples of how you could
do this, e.g. the library example. And maybe wicket-auth-roles might
give you some ideas too.

Do you maybe use a static reference to your user? A singleton that
stores user data? Typically you wouldn't have to worry about thread
safety with Wicket.


Eelco


On 7/15/06, Steve Moitozo [EMAIL PROTECTED] wrote:
 Thanks Igor. I was storing some data in the Application object but have
 now moved everything to the Session object. However, I am still
 experiencing the same behavior.

  From what I understand it's OK to store data in pages because they are
 placed in the user's session. Is this correct?

 Here is some more detail:

 ENVIRONMENT:
 SuSE Linux 10
 Java/compiler/1.5.0_07
 Wicket/1.2RC3
 Wicket Extensions/1.2RC3
 Jetty/5.1.11RC0


 MY Application CLASS:

 public class PwdMgrWebApplication extends WebApplication
 {
/**
 * The logger
 */
private Log logger = LogFactory.getLog(PwdMgrWebApplication.class);


// docs from super
public void init() {

   // put an authorization strategy in place
   SimplePageAuthorizationStrategy authzStrategy = new
 SimplePageAuthorizationStrategy(PwdMgrAuthenticatedWebPage.class,
 PageLogin.class)
  {
 protected boolean isAuthorized()
 {
// Authorize access based on user authentication in the session
return (((PwdMgrWebSession)Session.get()).isAuthenticated());
 }
  };

  getSecuritySettings().setAuthorizationStrategy(authzStrategy);

}


/**
 * @see wicket.protocol.http.WebApplication#getSessionFactory()
 */
public ISessionFactory getSessionFactory(){
return new ISessionFactory()
{
public Session newSession()
{
return new 
 PwdMgrWebSession(PwdMgrWebApplication.this);
}
};
}


// docs from super
public Class getHomePage(){
   return PageHome.class;
}

 }



 -S2
 --
 Steve Moitozo II


 Igor Vaynberg wrote:
  are you storing data in the Application object?
 
  you should be storing it in the Session object
 
  -Igor
 
 
  On 7/14/06, *Steve Moitozo*  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  I have whipped up a shiny new Wicket application and I just noticed
  something that is a bit of a show stopper for me.
 
  If I login as BOB and a friend logs in as LARRY and I click on a link my
  application thinks I'm LARRY! Have I stored user data in the wrong
  place? Any ideas?
 
  -S2
  --
  Steve Moitozo II
 
 
  
  -
  Using Tomcat but need to do more? Need to support web services,
  security?
  Get stuff done quickly with pre-integrated technology to make your
  job easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  
 
 
  -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job 
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 
 
  
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated 

Re: [Wicket-user] Possible session issue in my app?

2006-07-15 Thread Steve Moitozo
I get the same behavior using two different computers or two different 
browsers on the same computer.

I've used both Firefox and Safari.

-S2
-- 
Steve Moitozo II


Julian Klappenbach wrote:
 Curious:
 
 Are you attempting to log into the application using the same computer
 for both users?  What browser are you using?
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Steve
 Moitozo
 Sent: Friday, July 14, 2006 1:49 PM
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] Possible session issue in my app?
 
 I have whipped up a shiny new Wicket application and I just noticed
 something that is a bit of a show stopper for me.
 
 If I login as BOB and a friend logs in as LARRY and I click on a link my
 application thinks I'm LARRY! Have I stored user data in the wrong
 place? Any ideas?
 
 -S2
 --
 Steve Moitozo II
 
 
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Possible session issue in my app?

2006-07-15 Thread Eelco Hillenius
Yeah, like I said, you probably actually work on the same data with
different sessions. Likely, you use a static reference or a singleton
somewhere for the currently logged on user.

Eelco


On 7/15/06, Steve Moitozo [EMAIL PROTECTED] wrote:
 I get the same behavior using two different computers or two different
 browsers on the same computer.

 I've used both Firefox and Safari.

 -S2
 --
 Steve Moitozo II


 Julian Klappenbach wrote:
  Curious:
 
  Are you attempting to log into the application using the same computer
  for both users?  What browser are you using?
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Steve
  Moitozo
  Sent: Friday, July 14, 2006 1:49 PM
  To: wicket-user@lists.sourceforge.net
  Subject: [Wicket-user] Possible session issue in my app?
 
  I have whipped up a shiny new Wicket application and I just noticed
  something that is a bit of a show stopper for me.
 
  If I login as BOB and a friend logs in as LARRY and I click on a link my
  application thinks I'm LARRY! Have I stored user data in the wrong
  place? Any ideas?
 
  -S2
  --
  Steve Moitozo II
 
 
 
  -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job 
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Possible session issue in my app?

2006-07-15 Thread Steve Moitozo
Thanks! With your help I have solved my issue.

With your clues and some digging I discovered that I was using a 
singleton service. The service stored the user's identity in the class 
rather than keeping it in method scope. I moved everything to method 
scope and this solved my issues.

Thanks again.

-S2
-- 
Steve Moitozo II


Eelco Hillenius wrote:
 Yeah, like I said, you probably actually work on the same data with
 different sessions. Likely, you use a static reference or a singleton
 somewhere for the currently logged on user.
 
 Eelco
 
 
 On 7/15/06, Steve Moitozo [EMAIL PROTECTED] wrote:
 I get the same behavior using two different computers or two different
 browsers on the same computer.

 I've used both Firefox and Safari.

 -S2
 --
 Steve Moitozo II


 Julian Klappenbach wrote:
 Curious:

 Are you attempting to log into the application using the same computer
 for both users?  What browser are you using?

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Steve
 Moitozo
 Sent: Friday, July 14, 2006 1:49 PM
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] Possible session issue in my app?

 I have whipped up a shiny new Wicket application and I just noticed
 something that is a bit of a show stopper for me.

 If I login as BOB and a friend logs in as LARRY and I click on a link my
 application thinks I'm LARRY! Have I stored user data in the wrong
 place? Any ideas?

 -S2
 --
 Steve Moitozo II



 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job 
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Possible session issue in my app?

2006-07-14 Thread Steve Moitozo
I have whipped up a shiny new Wicket application and I just noticed
something that is a bit of a show stopper for me.

If I login as BOB and a friend logs in as LARRY and I click on a link my
application thinks I'm LARRY! Have I stored user data in the wrong
place? Any ideas?

-S2
-- 
Steve Moitozo II


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Possible session issue in my app?

2006-07-14 Thread Igor Vaynberg
are you storing data in the Application object?you should be storing it in the Session object-IgorOn 7/14/06, Steve Moitozo 
[EMAIL PROTECTED] wrote:I have whipped up a shiny new Wicket application and I just noticed
something that is a bit of a show stopper for me.If I login as BOB and a friend logs in as LARRY and I click on a link myapplication thinks I'm LARRY! Have I stored user data in the wrongplace? Any ideas?
-S2--Steve Moitozo II-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Possible session issue in my app?

2006-07-14 Thread Steve Moitozo
Thanks Igor. I was storing some data in the Application object but have 
now moved everything to the Session object. However, I am still 
experiencing the same behavior.

 From what I understand it's OK to store data in pages because they are 
placed in the user's session. Is this correct?

Here is some more detail:

ENVIRONMENT:
SuSE Linux 10
Java/compiler/1.5.0_07
Wicket/1.2RC3
Wicket Extensions/1.2RC3
Jetty/5.1.11RC0


MY Application CLASS:

public class PwdMgrWebApplication extends WebApplication
{
/**
 * The logger
 */
private Log logger = LogFactory.getLog(PwdMgrWebApplication.class);


// docs from super
public void init() {

   // put an authorization strategy in place
   SimplePageAuthorizationStrategy authzStrategy = new 
SimplePageAuthorizationStrategy(PwdMgrAuthenticatedWebPage.class, 
PageLogin.class)
  {
 protected boolean isAuthorized()
 {
// Authorize access based on user authentication in the session
return (((PwdMgrWebSession)Session.get()).isAuthenticated());
 }
  };

  getSecuritySettings().setAuthorizationStrategy(authzStrategy);

}


/**
 * @see wicket.protocol.http.WebApplication#getSessionFactory()
 */
public ISessionFactory getSessionFactory(){
return new ISessionFactory()
{
public Session newSession()
{
return new 
PwdMgrWebSession(PwdMgrWebApplication.this);
}
};
}


// docs from super
public Class getHomePage(){
   return PageHome.class;
}

}



-S2
-- 
Steve Moitozo II


Igor Vaynberg wrote:
 are you storing data in the Application object?
 
 you should be storing it in the Session object
 
 -Igor
 
 
 On 7/14/06, *Steve Moitozo*  [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:
 
 I have whipped up a shiny new Wicket application and I just noticed
 something that is a bit of a show stopper for me.
 
 If I login as BOB and a friend logs in as LARRY and I click on a link my
 application thinks I'm LARRY! Have I stored user data in the wrong
 place? Any ideas?
 
 -S2
 --
 Steve Moitozo II
 
 
 -
 Using Tomcat but need to do more? Need to support web services,
 security?
 Get stuff done quickly with pre-integrated technology to make your
 job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Possible session issue in my app?

2006-07-14 Thread Julian Klappenbach
Curious:

Are you attempting to log into the application using the same computer
for both users?  What browser are you using?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Moitozo
Sent: Friday, July 14, 2006 1:49 PM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Possible session issue in my app?

I have whipped up a shiny new Wicket application and I just noticed
something that is a bit of a show stopper for me.

If I login as BOB and a friend logs in as LARRY and I click on a link my
application thinks I'm LARRY! Have I stored user data in the wrong
place? Any ideas?

-S2
--
Steve Moitozo II



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Possible session issue in my app?

2006-07-14 Thread Igor Vaynberg
storing things in page is fine because page instances are stored in session. this exact problem is why i hated tapestry because there the page objects are pooled and if you are not careful you share user information. in wicket the only point this can happen is the application object because it is a singleton.
i really dont see how you are doing this in wicket, ive built multiple applications and never hit this situation so i am very curious.-IgorOn 7/14/06, 
Steve Moitozo [EMAIL PROTECTED] wrote:
Thanks Igor. I was storing some data in the Application object but havenow moved everything to the Session object. However, I am stillexperiencing the same behavior. From what I understand it's OK to store data in pages because they are
placed in the user's session. Is this correct?Here is some more detail:ENVIRONMENT:SuSE Linux 10Java/compiler/1.5.0_07Wicket/1.2RC3Wicket Extensions/1.2RC3Jetty/5.1.11RC0
MY Application CLASS:public class PwdMgrWebApplication extends WebApplication{/** * The logger */private Log logger = LogFactory.getLog(PwdMgrWebApplication.class);// docs from super
public void init() { // put an authorization strategy in place SimplePageAuthorizationStrategy authzStrategy = newSimplePageAuthorizationStrategy(PwdMgrAuthenticatedWebPage.class,PageLogin.class
){ protected boolean isAuthorized() {// Authorize access based on user authentication in the sessionreturn (((PwdMgrWebSession)Session.get()).isAuthenticated());
 }};getSecuritySettings().setAuthorizationStrategy(authzStrategy);}/** * @see wicket.protocol.http.WebApplication#getSessionFactory
() */public ISessionFactory getSessionFactory(){return new ISessionFactory(){public Session newSession(){
return new PwdMgrWebSession(PwdMgrWebApplication.this);}};}// docs from superpublic Class getHomePage(){
 return PageHome.class;}}-S2--Steve Moitozo IIIgor Vaynberg wrote: are you storing data in the Application object? you should be storing it in the Session object
 -Igor On 7/14/06, *Steve Moitozo*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 I have whipped up a shiny new Wicket application and I just noticed something that is a bit of a show stopper for me. If I login as BOB and a friend logs in as LARRY and I click on a link my
 application thinks I'm LARRY! Have I stored user data in the wrong place? Any ideas? -S2 -- Steve Moitozo II -
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user 
 - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user-
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user