Following the Instruction on this page :
https://cwiki.apache.org/WICKET/servlet-container-authentication.html

I have the following code:
public abstract class BasePhonebookApplication extends WebApplication {
        String user;
        protected WebRequest newWebRequest(final HttpServletRequest
servletRequest) {
                final WebRequest webRequest = 
super.newWebRequest(servletRequest);
        
                 WiaSession session = (WiaSession) getSessionStore().lookup(
                                 webRequest );
                 GdsDAO dao = GdsDAO.getInstance();
                java.security.Principal pl =
(GdsUserImpl)servletRequest.getUserPrincipal();
                user = pl.getName();
                session.setUser(user);  // the session is null when this is 
call 
                return webRequest;
        } 

I need to access the User Variable for each person that Logs in -- Which I
do here, in the same class:
public org.apache.wicket.Session newSession(Request request, Response
response) {
                WiaSession Wsession =  new WiaSession(request);
                Wsession.setUser(user);
                return (org.apache.wicket.Session)Wsession;
        }

Question : will these work for multiple users using this application(or put
another way -- is BasePhonebookApplication   a singleton or (spring talk) a
prototype ?



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-servlet-container-authentication-with-Wicket-tp2272767p2272767.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to