Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Usage of ContainerServlet

Subject: Usage of ContainerServlet

2007-11-01       - By Michael

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

  }

  @(protected)
  protected void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
   
    resp.setCharacterEncoding("UTF-8 (See http://UTF-8.ora-code.com)");
   
    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@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.