I search a mean too.
The Embedded server ran
but the client didn't achieved
to send a message to my servlet.
I'm interrested if you find a better way.
Jerome
I previously send this message in the list:
--------------------------------------------------
I want to use the Jakarta catalina library
without the configuration files
(server.xml, WEB-INF/web.xml, ...).
The aim is to use (and hide)
a lighweight SOAP (on HTTP) connector
started from a java NON-WEB application.
SOAP message handling is made with a servlet
that extends the javax.xml.messaging.JAXMServlet class.
My ServletFilter class
which implements the javax.servlet.Filter interface
does not alter the ServletRequest
or ServletResponse parameters (empty method bodies).
A python client send a SOAP message to my HTTP connector
but my servlet doesn't get any message.
I have read the documentation,
but it is done for web developpers only.
What is wrong ?
Thanks for your help.
Jerome
------------------
configuration code
------------------
/**** variables previous settings
* servlet : String, the full name of my servlet class
*/
System.setProperty("catalina.home","/tmp");
System.setProperty("catalina.base","/tmp");
this.server = new Embedded();
this.server.addLifecycleListener(this);
Engine engine = this.server.createEngine();
engine.setDefaultHost("vtm");
Host host = this.server.createHost("vtm","");
Context context = this.server.createContext("","/tmp");
FilterDef fD = new FilterDef();
fD.setFilterName("*");
fD.setFilterClass("com.xerox.VTM.clf.ServletFilter");
context.addFilterDef(fD);
FilterMap map = new FilterMap();
map.setFilterName("*");
map.setServletName(servlet);
context.addFilterMap(map);
context.setReloadable(false);
context.setCookies(false);
context.getServletContext().setAttribute("GUIManager",this);
Wrapper w = context.createWrapper();
w.setServletClass(servlet);
w.setName("SOAPHandler");
w.setLoadOnStartup(-1);
w.setParent(context);
context.addChild(w);
host.addChild(context);
engine.addChild(host);
this.server.addEngine(engine);
try{
Connector connector;
connector =
this.server.createConnector(InetAddress.getLocalHost(),port,false);
connector.setScheme("http");
this.server.addConnector(connector);
try{
this.server.start();
}
catch(LifecycleException e){System.err.println(e);}
}
catch(UnknownHostException e){e.printStackTrace();}
-------------
client trace
------------
404 '/'
------------
server trace
------------
Apache Tomcat/4.0.3
WebappLoader[]: Deploying class repositories to work directory
/tmp/work/vtm/_
StandardManager[]: Seeding random number generator class
java.security.SecureRandom
StandardManager[]: Seeding of random number generator has been completed
ContextConfig[]: Missing default web.xml, using application web.xml only
ContextConfig[]: Missing application web.xml, using defaults only
ContextConfig[]: Added certificates -> request attribute Valve
HttpConnector Opening server socket on host IP address 13.202.220.88
HttpConnector[19769] Starting background thread
------------------------------------------------------------------
"WATKINS, Andy, FM" wrote:
>
> Im trying to setup an embedded tomcat that gets
> run from a main().
>
> Im using the Embedded.java class.
>
> I wont only a single servlet mapped, but the example
> main does not do this.
>
> Does anyone have a sample main configuring tomcat
> (programmatically via Embedded.java) to have a single
> servlet running?
>
> Andy
>
> ********************************************************************
> Visit our Internet site at http://www.rbsmarkets.com
>
> This e-mail is intended only for the addressee named above.
> As this e-mail may contain confidential or privileged information,
> if you are not the named addressee, you are not authorised to
> retain, read, copy or disseminate this message or any part of it.
> ********************************************************************
>
> --
> To unsubscribe: <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>