Hi,

I am kinda lost here.

My goal is to retrieve all session from the Context and purge idle sessions.

devel machine: TC 5.5.25, XP SP2, JRE 6.0.3
server machine: TC 5.5.23, HP-UX 11, JRE 5.0.7

I've taken a look in to the source manager app and noticed, it has to implement the ContainerServlet to get the Wrapper which supplies me with all necessary objects.

Well, I did the same. Wrapper remains null. I did a google and mailing list search and I've read that my Context has to be true either in my context.xml or in the server.xml Still no avail. To my understanding the server folder in tomcat has more rights due to the privileged flag.

Hence I have no idea how to manage that. I use lambda probe to monitor my tomcat and it is a simple war which does the same as the manager although it isn't in the server folder but hat the privileged flag set.

Can someone give me pointer how to cope with that, what I have missed here?

This is my basic code:

public class SessionServlet extends HttpServlet implements ContainerServlet {

        private Wrapper wrapper;
        
        public Wrapper getWrapper() {
                return wrapper;
        }

        public void setWrapper(Wrapper wrapper) {
                this.wrapper = wrapper;
                System.out.println("Wrapper set");

        }

        @Override
        protected void doGet(HttpServletRequest req, HttpServletResponse resp)
                        throws ServletException, IOException {
                
                resp.setCharacterEncoding("UTF-8");
                
                PrintWriter pw = resp.getWriter();
                
                pw.print("Liste:\n");
                //pw.print(wrapper.getInfo());
                pw.print(wrapper);
                pw.close();
                
        }


wrapper returns null

It seems like I have to manage the sessions in a HashMap with a SessionListener.

thx,

Mike
--
<NO> OOXML - Say NO To Microsoft Office broken standard
http://www.noooxml.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to