tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <>
Subject Usage of ContainerServlet
Date Thu, 01 Nov 2007 14:21:37 GMT

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");


	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		PrintWriter pw = resp.getWriter();

wrapper returns null

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


<NO> OOXML - Say NO To Microsoft Office broken standard

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message