You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marc Saegesser <ma...@apropos.com> on 2000/11/28 02:43:53 UTC

EmbededTomcat question

I'm beating my head against a wall with EmbededTomcat and I'm hoping someone
here can help me out.

Here's where I stand.  I've got an application that initializes the
EmbededTomcat class.  I can access a servlet using the HttpConnectionHandler
on port 8080.  My servlet gets instantiated, init() gets called, doGet()
gets called and everything seems OK until I get a NullPointerException in
SessionInterceptor.beforeBody() because the context manager has not been
initialized by calling SessionInterceptor.setContextManager().  What am I
missing?

Also, I'd like to use AjpConnectionHandler so that I can use IIS as my web
server.  I don't see anything in EmbededTomcat to create an
AjpConnectionHandler endpoint, only HttpConnectionHandlers.  I added a new
method, addAjpEndPoint(), to do this and it seems to work (of course I get
the same null pointer as above).  Is there anything wrong with this
approach?

BTW, shouldn't EmbededTomcat be named EmbeddedTomcat :-)



RE: EmbededTomcat question

Posted by Marc Saegesser <ma...@apropos.com>.
FWIW, I rearranged some code in EmbededTomcat to get the interceptors
intialized with the context manager, implemented EmbededTomcat.stop() and
added a new method to create an AJP12 connector.

I now have a working application that embeds the Tomcat servlet container
and handles requests forwarded from IIS via the redirector.

The code is still in proof of concept stage.  I'll post it when I think its
ready.  If anyone else is using EmbededTomcat and would like to discuss
these or other changes please contact me (preferably on one of the Tomcat
mailing lists).

Marc Saegesser

-----Original Message-----
From: Marc Saegesser [mailto:marc.saegesser@apropos.com]
Sent: Tuesday, November 28, 2000 8:27 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: EmbededTomcat question


No, I'm talking about Tomcat and embedding a servlet container inside my
application.  I'm only vaguely aware of what JBoss is and I'm certainly not
doing anything with it.

I realize that EmbededTomcat doesn't know anything about server.xml.  I
didn't mention anything about server.xml in my original post.  I don't want
to use server.xml.

My question was how can EmbededTomcat work without initializing the context
manager for the interceptors.  Either I'm missing the step where this
happens or I'm missing the steps to make setting the context manager
unimportant.

In any case, I have the source.  I can make it do anything I want.

-----Original Message-----
From: Dominique BATARD [mailto:dbatard@sf2r.fr]
Sent: Tuesday, November 28, 2000 3:49 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: EmbededTomcat question


You'r talking about JBoss ?

Forget it, EmbededTomcat doesn't care about server.xml.

Dom

----- Original Message -----
From: "Marc Saegesser" <ma...@apropos.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, November 28, 2000 2:43 AM
Subject: EmbededTomcat question


> I'm beating my head against a wall with EmbededTomcat and I'm hoping
someone
> here can help me out.
>
> Here's where I stand.  I've got an application that initializes the
> EmbededTomcat class.  I can access a servlet using the
HttpConnectionHandler
> on port 8080.  My servlet gets instantiated, init() gets called, doGet()
> gets called and everything seems OK until I get a NullPointerException in
> SessionInterceptor.beforeBody() because the context manager has not been
> initialized by calling SessionInterceptor.setContextManager().  What am I
> missing?
>
> Also, I'd like to use AjpConnectionHandler so that I can use IIS as my web
> server.  I don't see anything in EmbededTomcat to create an
> AjpConnectionHandler endpoint, only HttpConnectionHandlers.  I added a new
> method, addAjpEndPoint(), to do this and it seems to work (of course I get
> the same null pointer as above).  Is there anything wrong with this
> approach?
>
> BTW, shouldn't EmbededTomcat be named EmbeddedTomcat :-)
>
>
>


RE: EmbededTomcat question

Posted by Marc Saegesser <ma...@apropos.com>.
No, I'm talking about Tomcat and embedding a servlet container inside my
application.  I'm only vaguely aware of what JBoss is and I'm certainly not
doing anything with it.

I realize that EmbededTomcat doesn't know anything about server.xml.  I
didn't mention anything about server.xml in my original post.  I don't want
to use server.xml.

My question was how can EmbededTomcat work without initializing the context
manager for the interceptors.  Either I'm missing the step where this
happens or I'm missing the steps to make setting the context manager
unimportant.

In any case, I have the source.  I can make it do anything I want.

-----Original Message-----
From: Dominique BATARD [mailto:dbatard@sf2r.fr]
Sent: Tuesday, November 28, 2000 3:49 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: EmbededTomcat question


You'r talking about JBoss ?

Forget it, EmbededTomcat doesn't care about server.xml.

Dom

----- Original Message -----
From: "Marc Saegesser" <ma...@apropos.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, November 28, 2000 2:43 AM
Subject: EmbededTomcat question


> I'm beating my head against a wall with EmbededTomcat and I'm hoping
someone
> here can help me out.
>
> Here's where I stand.  I've got an application that initializes the
> EmbededTomcat class.  I can access a servlet using the
HttpConnectionHandler
> on port 8080.  My servlet gets instantiated, init() gets called, doGet()
> gets called and everything seems OK until I get a NullPointerException in
> SessionInterceptor.beforeBody() because the context manager has not been
> initialized by calling SessionInterceptor.setContextManager().  What am I
> missing?
>
> Also, I'd like to use AjpConnectionHandler so that I can use IIS as my web
> server.  I don't see anything in EmbededTomcat to create an
> AjpConnectionHandler endpoint, only HttpConnectionHandlers.  I added a new
> method, addAjpEndPoint(), to do this and it seems to work (of course I get
> the same null pointer as above).  Is there anything wrong with this
> approach?
>
> BTW, shouldn't EmbededTomcat be named EmbeddedTomcat :-)
>
>
>


Re: EmbededTomcat question

Posted by Dominique BATARD <db...@sf2r.fr>.
You'r talking about JBoss ?

Forget it, EmbededTomcat doesn't care about server.xml.

Dom

----- Original Message -----
From: "Marc Saegesser" <ma...@apropos.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, November 28, 2000 2:43 AM
Subject: EmbededTomcat question


> I'm beating my head against a wall with EmbededTomcat and I'm hoping
someone
> here can help me out.
>
> Here's where I stand.  I've got an application that initializes the
> EmbededTomcat class.  I can access a servlet using the
HttpConnectionHandler
> on port 8080.  My servlet gets instantiated, init() gets called, doGet()
> gets called and everything seems OK until I get a NullPointerException in
> SessionInterceptor.beforeBody() because the context manager has not been
> initialized by calling SessionInterceptor.setContextManager().  What am I
> missing?
>
> Also, I'd like to use AjpConnectionHandler so that I can use IIS as my web
> server.  I don't see anything in EmbededTomcat to create an
> AjpConnectionHandler endpoint, only HttpConnectionHandlers.  I added a new
> method, addAjpEndPoint(), to do this and it seems to work (of course I get
> the same null pointer as above).  Is there anything wrong with this
> approach?
>
> BTW, shouldn't EmbededTomcat be named EmbeddedTomcat :-)
>
>
>