deploying and undeploying web apps at run time
hi, I want to deploy and undeploy web applications at run time. Aim is that once the tomcat is up we should be able to deploy and undeploy web apps programatically. Is there a way this can be achieved or if i can look up some docs/respurce somewhere. thanks abhijat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deploying and undeploying web applications programatically
Hi, I am using tomcat version 4.1.27. I start up my tomact by setting all the system properties and class path and then making a call org.apache.catalina.startup.Bootstrap.main(start). After this has been done then at run time i want to deploy and undelpoy applications. How can i do that? I was reading the Manager application and it seems like a web based application for the same purpose. How can i embed the deploying and undelploying of applications in my code ? thanks abhijat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deploying and undeploying web applications at run time
Hi, I am using tomcat version 4.1.27. I start up my tomact by setting all the system properties and class path and then making a call org.apache.catalina.startup.Bootstrap.main(start). After this has been done then at run time i want to deploy and undelpoy applications. How can i do that? I was reading the Manager application and it seems like a web based application for the same purpose. How can i embed the deploying and undelploying of applications in my code ? thanks abhijat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
configuring MIME type
Hi, We are using Tomcat as a Web Server as well as a Servlet Engine and what we need to do is to configure the MIME type for Web Server which in our case is Tomcat. We want to configure Tomcat so that all files with the .jnlp file extension are set to the application/x-java-jnlp-file MIME type. Tomcat must return application/x-java-jnlp-file MIME type for JNLP files in order for the Java Web Start software to be invoked. How can i do this? I believe that i would have to modify some configuration file for this. thanks abhijat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Checking if Tomcat is up
Is it pssible to check intemittently through my java application if my Tomcat server is up ? What can i check for to see if my Tomcat server is up. The scenaruio is that if something happens to Tomcat where my it hangs up i should ring my application down, for that i have to check intermittently if my Tomcat is up. What is it that i can check to see if Tomcat is up ? thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checking if Tomcat is up
I have background threads running which keep checking if Tomcat is up or not. Lets say Tomcat hangs up or something then these background threads call to shutdown the application and tomcat clean up all the processes. This is to Monitor if my application is working properly. thanks abhijat -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 10:57 AM To: 'Tomcat Users List' Subject: RE: Checking if Tomcat is up Myabe I'm missing something, but if Tomcat is down how can your application run to be checking that Tomcat is up? Your application needs Tomcat to execute. John -Original Message- From: Abhijat Thakur [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 1:55 PM To: [EMAIL PROTECTED] Subject: Checking if Tomcat is up Is it pssible to check intemittently through my java application if my Tomcat server is up ? What can i check for to see if my Tomcat server is up. The scenaruio is that if something happens to Tomcat where my it hangs up i should ring my application down, for that i have to check intermittently if my Tomcat is up. What is it that i can check to see if Tomcat is up ? thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Non-ssl connector to port 80
On Linux if you have to bind to any port below 1024 then it needs to be done as root. I am guessing that you are starting up Tomcat as a non root user on Linux. That is why you cant bind to port 80 and can bind to port 8080. Hope this helps. -Original Message- From: Stephen Ting [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 6:23 PM To: [EMAIL PROTECTED] Subject: Non-ssl connector to port 80 I am running tomcat 4.1.8 on redhat 8 and having this problems when i try to bind the non-ssl connector to port 80, whereas if i bind to port 8080 i don't have this problems. Can anybody please help, i am linux novice so don't really knows the work around. Thanks Cheers Stephen Catalina.start: LifecycleException: null.open: java.net.BindException: Permission denied:80 LifecycleException: null.open: java.net.BindException: Permission denied:80 at org.apache.catalina.connector.http.HttpConnector.initialize(Unknown Source) at org.apache.catalina.core.StandardService.initialize(Unknown Source) at org.apache.catalina.core.StandardServer.initialize(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) - Root Cause - java.net.BindException: Permission denied:80 at org.apache.catalina.connector.http.HttpConnector.open(Unknown Source) at org.apache.catalina.connector.http.HttpConnector.initialize(Unknown Source) at org.apache.catalina.core.StandardService.initialize(Unknown Source) at org.apache.catalina.core.StandardServer.initialize(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
embedding tomcat SSL in java application
Hi, I am trying to embed a Tomcat inside our java application. I am able to start up tomcat on port 8080. However when i am trying to start up Tomcat with SSL on port 8443 i am unable to do so. I dont get any error on standard output being generated by tomcat.However when i go to the browser and type https://localhost:8443 nothing happens and it just tries to open the page. The code snippet is given. Here embedded is an instance of Embedded Class. Connector connector =embedded.createConnector(null, 8080, false); embedded.addConnector(connector); SSLServerSocketFactory sslSocket = new SSLServerSocketFactory(); sslSocket.setAlgorithm(RSA); sslSocket.setKeystoreFile(C:/src/bdna/conf/.keystore); Connector sslConnector = embedded.createConnector(null, 8443, true); sslConnector.setScheme(https); sslConnector.setSecure(true); sslConnector.setFactory(sslSocket); embedded.addConnector(sslConnector); what am i missing ? thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SSL enabling through Java Application
I have been able to embed tomcat in my java application and startup tomcat on port 8080. I am trying to create a Connector for HTTPS but every time i do that i get. java.lang.ClassNotFoundException: Can't find any SSL implementation at org.apache.coyote.http11.Http11Protocol.checkSocketFactory(Http11Protocol.java:454) at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:133) at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1002) at org.apache.catalina.startup.Embedded.start(Embedded.java:999) at com.bdna.pl.testing.EmbeddedTomcat.startTomcat(EmbeddedTomcat.java:92) at com.bdna.pl.testing.EmbeddedTomcat.main(EmbeddedTomcat.java:166) LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1004) at org.apache.catalina.startup.Embedded.start(Embedded.java:999) at com.bdna.pl.testing.EmbeddedTomcat.startTomcat(EmbeddedTomcat.java:92) at com.bdna.pl.testing.EmbeddedTomcat.main(EmbeddedTomcat.java:166) The code snippet that i use to create a connector. Here embedded is instance of Embedded class. // Assemble and install a default HTTP connector Connector connector = embedded.createConnector(null, 8080, false); embedded.addConnector(connector); //This code fails Connector sslConnector = embedded.createConnector(null, 8443, true); embedded.addConnector(sslConnector); thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Embedding Tomcat in Java
I am trying to start up tomcat through my java application at run time. The test class(EmbeddedTomcat.java) is as follows. The line marked with red color throws exception. The exception is: java.lang.ExceptionInInitializerError: java.lang.NullPointerException at org.apache.catalina.startup.ContextConfig.createTldDigester(ContextConfig.java:481) at org.apache.catalina.startup.ContextConfig.clinit(ContextConfig.java:183) at org.apache.catalina.startup.Embedded.createContext(Embedded.java:594) at com.bdna.pl.testing.EmbeddedTomcat.startTomcat(EmbeddedTomcat.java:59) at com.bdna.pl.testing.EmbeddedTomcat.main(EmbeddedTomcat.java:142) Contents of EmbeddedTomcat.java import java.net.URL; import org.apache.catalina.Connector; import org.apache.catalina.Context; import org.apache.catalina.Deployer; import org.apache.catalina.Engine; import org.apache.catalina.Host; import org.apache.catalina.logger.SystemOutLogger; import org.apache.catalina.startup.Embedded; import org.apache.catalina.Container; public class EmbeddedTomcat { private String path = null; private Embedded embedded = null; private org.apache.catalina.Host host = null; public EmbeddedTomcat() { } /** * Basic Accessor setting the value of the context path * * @param path - the path */ public void setPath(String path) { this.path = path; } /** * Basic Accessor returning the value of the context path * * @return - the context path */ public String getPath() { return path; } /** * This method Starts the Tomcat server. */ public void startTomcat() throws Exception { Engine engine = null; // Set the home directory System.setProperty(catalina.home, getPath()); // Create an embedded server embedded = new Embedded(); // print all log statments to standard error embedded.setDebug(0); embedded.setLogger(new SystemOutLogger()); // Create an engine engine = embedded.createEngine(); engine.setDefaultHost(localhost); // Create a default virtual host host = embedded.createHost(localhost, getPath() + /webapps); engine.addChild(host); // Create the ROOT context Context context = embedded.createContext(, getPath() + /webapps/ROOT); host.addChild(context); // Install the assembled container hierarchy embedded.addEngine(engine); // Assemble and install a default HTTP connector Connector connector = embedded.createConnector(null, 8080, false); embedded.addConnector(connector); // Start the embedded server embedded.start(); } /** * This method Stops the Tomcat server. */ public void stopTomcat() throws Exception { // Stop the embedded server embedded.stop(); } public static void main(String args[]) { try { EmbeddedTomcat tomcat = new EmbeddedTomcat(); tomcat.setPath(C:\\tomcat\\jakarta-tomcat-4.1.12); tomcat.startTomcat(); } catch( Exception e ) { e.printStackTrace(); } } } what am i doing wrong? thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
starting tomcat from java code
Hi, Is there a way that tomcat can be started up and shutdown from java code rather than running startup.sh and shutdown.sh scripts? thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NoSuchMethodError
Hi, When i am trying to access a servlet through tomcat it gives me a java.lang.NoSuchMethodError. From the stack trace at LoginServlet.java:238(which is my servlet) all i am doing is that i have a handle to HttpSession object and i call the setAttribute method to bind an object with the session. Why do i get this error? thanks abhijat java.lang.NoSuchMethodError at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1262) at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191) at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191) at com.bdna.pl.servlet.LoginServlet.doPostMethod(LoginServlet.java:238) at com.bdna.pl.servlet.LoginServlet.service(LoginServlet.java:116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] winmail.dat-- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NoSuchMethodError
When i am trying to access a servlet through tomcat it gives me a java.lang.NoSuchMethodError. From the stack trace at LoginServlet.java:238(which is my servlet) all i am doing is that i have a handle to HttpSession object and i call the setAttribute method to bind an object with the session. Why do i get this error? thanks abhijat java.lang.NoSuchMethodError at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1262) at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191) at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191) at com.bdna.pl.servlet.LoginServlet.doPostMethod(LoginServlet.java:238) at com.bdna.pl.servlet.LoginServlet.service(LoginServlet.java:116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
setting syetem property while starting up tomcat
hi, I have integrated a SOAP server with tomcat and i am not able to deploy some soap services because a system property has not been set. I need to set up a system property while starting up tomcat using -D option. Where can i do that ? thanks abhijat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
exception when accessing web application
after loading a web application when i go to access the web application through the URL i get this error. My jar files are under PathToWebApp/WEB-INF/lib. What am i doing wrong? javax.servlet.ServletException: java.lang.NoClassDefFoundError at electric.server.http.ServletServer.init(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:658) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
error while deploying web application
I am trying to intergrate a third party SOAP server with Tomcat and when it try to deploy the SOAP Server as web application i get an error where tomcat is unable to load servlet.jar. when i start tomcat this is the message that i get. [INFO] Registry - -Loading registry information [INFO] Registry - -Creating new Registry instance [INFO] Registry - -Creating MBeanServer [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.12 WebappClassLoader: validateJarFile(C:\glue2.3.1\electric\webapps\glue\WEB-INF\li b\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080 [INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009 [INFO] JkMain - -Jk running ID=0 time=10/171 config=C:\tomcat\jakarta-tomcat-4. 1.12\conf\jk2.properties I looked at Servlet specifications and it seems like it is some error related to ClassLoader. what am i doing wrong? thanks abhijat winmail.dat-- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
unknown source error
We intergrated a third party SOAP server with Tomcat. All it involved was adding an entry in the web.xml file for SOAP servers servlet.The SOAP server does publlish the service but when i invoke the service from the client it does call the service but any code executed corresponding to the third party software in the web service throws a ClassCastException and there are Unknown Source messages. It gives Unknown source for any classes corresponding to the third party software. Is it a class loading problem? what am i doing wrong? thanks abhijat java.lang.ClassCastException: org.apache.coyote.tomcat4.CoyoteRequestFacade at com.bdna.pl.testing.TestingRemoteService.getIBMStockSymbol(Unknown So urce) at java.lang.reflect.Method.invoke(Native Method) at electric.util.reflect.Invocation.execute(Unknown Source) at electric.util.reflect.Invocation.invoke(Unknown Source) at electric.service.object.ObjectService.invoke(Unknown Source) at electric.net.soap.SOAPMessage.invoke(Unknown Source) at electric.net.soap.SOAPMessage.invoke(Unknown Source) at electric.net.soap.http.SOAPHTTPHandler.service(Unknown Source) at electric.server.http.ServletServer.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline StandardPipelineValveContext.invokeNextStandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: unknown source error
Hi Martin, I have the third party libraries in the docBase/WEB-INF/lib of my web application. I believe that is the place from where tomcat will look for any jar files. Is there any other place where the third party libraries should be? thanks abhijat -Original Message- From: Martin Redington [mailto:m.redington;ucl.ac.uk] Sent: Thursday, November 14, 2002 6:03 PM To: Tomcat Users List Subject: Re: unknown source error Hi Abhijat, I think the Unknown source messages are because you don't have the source for the third-party libraries, and the line numbers can't be determined from the class files. A ClassCastException usually occurs because you are trying to cast an object to an incompatible class (e.g. because the target class is not a parent class to the object's class). Hope this helps ... cheers, Martin On Friday, November 15, 2002, at 01:55 AM, Abhijat Thakur wrote: We intergrated a third party SOAP server with Tomcat. All it involved was adding an entry in the web.xml file for SOAP servers servlet.The SOAP server does publlish the service but when i invoke the service from the client it does call the service but any code executed corresponding to the third party software in the web service throws a ClassCastException and there are Unknown Source messages. It gives Unknown source for any classes corresponding to the third party software. Is it a class loading problem? what am i doing wrong? thanks abhijat java.lang.ClassCastException: org.apache.coyote.tomcat4.CoyoteRequestFacade at com.bdna.pl.testing.TestingRemoteService.getIBMStockSymbol(Unknown So urce) at java.lang.reflect.Method.invoke(Native Method) at electric.util.reflect.Invocation.execute(Unknown Source) at electric.util.reflect.Invocation.invoke(Unknown Source) at electric.service.object.ObjectService.invoke(Unknown Source) at electric.net.soap.SOAPMessage.invoke(Unknown Source) at electric.net.soap.SOAPMessage.invoke(Unknown Source) at electric.net.soap.http.SOAPHTTPHandler.service(Unknown Source) at electric.server.http.ServletServer.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.java:260) at org.apache.catalina.core.StandardPipeline StandardPipelineValveContext.invokeNextStandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23 96) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4 05) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process Connection(Http11Protocol.java:380
error while deploying web application
I am trying to intergrate a third party SOAP server with Tomcat and when it try to deploy the web application i get an error where tomcat is unable to load servlet.jar. when i start tomcat this is the message that i get. [INFO] Registry - -Loading registry information [INFO] Registry - -Creating new Registry instance [INFO] Registry - -Creating MBeanServer [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.12 WebappClassLoader: validateJarFile(C:\glue2.3.1\electric\webapps\glue\WEB-INF\li b\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080 [INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009 [INFO] JkMain - -Jk running ID=0 time=10/171 config=C:\tomcat\jakarta-tomcat-4. 1.12\conf\jk2.properties I looked at Servlet specifications and it seems like it is some error related to ClassLoader. what am i doing wrong? thanks abhijat -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Configuring web application at run time
Hi, Is it possible that we can deploy a web application at run time from from code by using some java classes provided by Tomcat. If that is not possible then the way i am specifying the path to my web application is by adding Context entry in the $CATALINA_HOME/conf/server.xml configuration file. In the context entry i have to specify the docBase attribute. Can i set this attribute relative to an environment variable for my application something like docBase = $BDNA_HOME+/web. thanks abhijat -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
classpath for web applications
I am new to tomcat and i added my web application to Tomcat by adding Context path=/bdna debug=0 privileged=true docBase=/usr/web/ /Context in server.xml file. My classpath environment variable is set up which has all the classes. However when i try to invoke a servlet by typing the URL it gives me a classNotFoundException. However the class exists in the classpath. Tomcat expects all the class files to be under /usr/web/WEB-INF/classes which is the docBase for the bdna Context. Is there a way to make Tomcat look for class files in ClassPath rather than the docBase/WEB-INF/classes for context. Am i doing something wrong? thanks abhijat -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Multiple Tomcat Instances
Hi, I am using apache and Tomcat 3.2.1. I am trying to have two instances of tomcat running. I have different server.xml for each tomcat instance. server1.xml AJP on Port 8007 server2.xml AJP on port 8009 I have no problem starting tomcat using the two server.xml files. Every time i start tomcat with one of server.xml files i rename the mod_jk.conf-auto and then included the two static files in httpd.conf.I have context test in server1.xml and context myapp in server2.xml. When i do http://xxx.com/test or http://xxx.com/myapp i can see the index.html page for that context but when i try to run the servlet or the jsp for those context then it does work. How do i tell apache as to which context is to be serverd by which port or tomcat instance. I checked the archives and somebody was mentioning about adding new workers in worker.properties file to direct requests to the different tomcats/jvms.I think i am missing this or some other step but do not know how to do it? Please advise. Thanks a lot Abhijat Thakur bDNA Corporation
System.err.println
Hi, I have gone through the archives and have looked at the original responses and tried it but my System.err.println does not go to /logs/tomcat.log. I am using log4j for logging but at some place have to put System.err.println statements which i want should be printed to tomcat logs. I have made modifications to server.xml and it has Logger name=tc_log verbosityLevel = INFORMATION path=logs/tomcat.log / Logger name=servlet_log path=logs/servlet.log verbosityLevel = DEBUG / Logger name=JASPER_LOG path=logs/jasper.log verbosityLevel = INFORMATION / The three are files are made under logs but my System.err.println messages dont go there. Please advise. Thanks a lot. Abhijat Thakur bDNA Corporation
RE: Multiple Tomcat Instances
I am using two tomcats server1.xml AJP on Port 8007 server2.xml AJP on port 8009 I am using Http via Apache.Every time i start tomcat with one of server.xml files i rename the mod_jk.conf-auto and the included the two static files in httpd.conf. Even after doing this i can only go to the contexts served by server1.xml file and not by server2.xml. How do i tell apache as to which context is to be serverd by which port. I think i am missing this step but do not know how to do it? Thanks Abhijat Thakur -Original Message- From: Marjou Xavier [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 4:37 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple Tomcat Instances Hello, Each Tomcat can be interfaced with a HTTP client with 2 different ways (defined in server.xml) - either with regular HTTP (eg: on port 8080) - or/and indirectly via Apache (AJP protocol is used, eg port 8007) If you use HTTP via Apache, Apache will need mod_jk.conf and worker.properties to know how to dialogue with Tomcat If you use only one instance of Tomcat, then the default files (server.xml, mod_jk.conf-auto and worker.properties) work well. Now if you use 2 Tomcats, you can do: - in server1.xml - HTTP on port 8080) - AJP on port 8007) -in server2.xml - HTTP on port 8081) - AJP on port 8009) Each Tomcat will have its own socket for serving HTTP. It is not possible to share a socket (eg: 8080) between to Tomcats as you are trying to do. If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and worker.properties. (It is important to realize that the default ones are working only when there is the default configuration of Tomcat (ie: only one Tomcat)). I hope this help, Xavier Marjou
Multiple Tomcat Instances
Hi, I am trying to configure multiple(2) instances of tomcat with apache. For this i have to modify the server.xml file. Now i have made two server.xml files (server1.xml and server2.xml). For server1.xml file in the connectors i have HttpConnectionHandler listening on port 8080 and the Ajp12ConnectionHandler listening on port 8007. For server2.xml i have Ajp12ConnectionHandler listening on port 8009. For server2.xml i dont have an HttpConnectionHandler listening at 8080 since when i start server2.xml using startup.sh -f server2.xml it gives me exception since 8080 is already in use by server1.xml since i start server2.xml after server1.xml. server2.xml has a context by name of myapp defined in it. The first question is that when i have started server2.xml and server1.xml and do http://localhost:8080/myapp this does not work since server2.xml is not related to port 8080. so how can i access contexts defined withing server2.xml? How are server1.xml and server2.xml file mapped to listen on port 8080 if they are? My guess is that since every request goes through apache i dont even need HttpConnectionHandler for tomcat. what needs to be the difference between server1.xml and server2.xml? mod_jk.conf-auto is auto generated when i start tomcat. now since i have two server.xml files which are started with ./startup.sh -f ./../conf/server1.xml ./startup.sh -f ./../conf/server2.xml at the first command when we start tomcat with server1.xml mod_jk.conf-auto is generated which is overridden when we start tomcat again with server2.xml. So how do we handle this? Also according to documentation the changes that need to be made to mod_jk.conf-auto are so that apache knows what context is to be served by which port. Is that correct? #Mounting the first context. JkMount /xyz ajpv12://localhost:8007/xyz #Mounting the second context. JkMount /myapp ajpv12://localhost:8009/myapp Nothing is working as of now. Please advise. Thanks in advance. Abhijat Thakur bDNA Corporation
Multiple Instances of Tomcat
I am trying to configure multiple instances of tomcat under apache. I have server1.xml(port 8007) and server2.xml(port 8009) files and everytime i start tomcat with any of these files i rename the mod_jk.conf-auto file to mod_jk.conf1-auto and mod_jk.conf2-auto. I have then included mod_jk.conf1-auto and mod_jk.conf2-auto in apaches httpd.conf. After this everything should be working fine. I cannnot run servlets or jsp pages defined within the context of server2.xml. However all the contexts defined withing server1.xml work fine. Am i missing a step or something. In documentation they mention that in apache configuration we have to instruct the web server adapter on how to find the Tomcat process responsible for the context. They mention that these have to be added # Mounting the first context. JkMount /abc ajpv12://localhost:8007/abc # Mounting the second context. JkMount /xyz ajpv12://localhost:8009/xyz In which file i dont know? Please advise. Thanks Abhijat Thakur bDNA Corporation
Multiple Tomcat Instances
Hi, I need to run multiple instances of Tomcat on Apache. As mentioned in documentation i have the two server.xml files specifying two different ports. Tomcat starts fine with the two server.xml files. I might be wrong when it comes to changes in Apache configuration that need to be done when multiple instances of tomcat need to be run.In Apache changes need to be made to mod_jk.conf.auto (since this is included in apaches httpd.conf) so that we can tell mod_jk module which instance will handle which request. Now mod_jk.conf.auto is an auto generated file everytime tomcat starts up so if i make any changes they will be overridden. How can this be handled? Just to see if multiple instances of tomcat work i addded the contexts in the mod_jk.conf.auto. It still did not work. Are there any steps that are missing. Thanks Abhijat Thakur bDNA Corporation
Multiple Tomcat Instances
Hi, I need to run multiple instances of Tomcat on Apache. As mentioned in documentation i have the two server.xml files specifying two different ports. Tomcat starts fine with the two server.xml files. I might be wrong when it comes to changes in Apache configuration that need to be done when multiple instances of tomcat need to be run.In Apache changes need to be made to mod_jk.conf.auto (since this is included in apaches httpd.conf) so that we can tell mod_jk module which instance will handle which request. Now mod_jk.conf.auto is an auto generated file everytime tomcat starts up so if i make any changes they will be overridden. How can this be handled? Just to see if multiple instances of tomcat work i addded the contexts in the mod_jk.conf.auto. It still did not work. Are there any steps that are missing. Thanks Abhijat Thakur bDNA Corporation
Multiple Instances of Tomcat
Hi, I am trying to run multiple instances of Tomcat. The documentation tells me that i have to have two server.xml files and have to start Tomca with bin/startup.sh -f /conf/server1.xml and bin/startup.sh -f /conf/server2.xml. Depending on the tomcat instance to which a servlet in a particular application has to be directed the context for that application has to be defined in that particular server.xml file. Now when i start my tomcat and try and start my second instnace of tomcat i get an error. However the port on which i am starting the second tomcat instance is free. FATAL:java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405) at java.net.ServerSocket.init(ServerSocket.java:170) at java.net.ServerSocket.init(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerS ocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java :239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Any advice is highly appreciated. Abhijat Thakur
RE: Multiple Instances of Tomcat
Hi, i am actually using different ports. 8007(server1.xml) and 8009(server2.xml). but i still get the error message. thanks -Original Message- From: Jason Koeninger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 1:37 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Instances of Tomcat The http, ajp12, and/or ajp13 services can't bind to the same port on the same IP address. You need to modify server.xml to put things on different ports or different IP addresses. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Wed, 25 Jul 2001 13:46:29 -0700, Abhijat Thakur wrote: Hi, I am trying to run multiple instances of Tomcat. The documentation tells me that i have to have two server.xml files and have to start Tomca with bin/startup.sh -f /conf/server1.xml and bin/startup.sh -f /conf/server2.xml. Depending on the tomcat instance to which a servlet in a particular application has to be directed the context for that application has to be defined in that particular server.xml file. Now when i start my tomcat and try and start my second instnace of tomcat i get an error. However the port on which i am starting the second tomcat instance is free. FATAL:java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405) at java.net.ServerSocket.init(ServerSocket.java:170) at java.net.ServerSocket.init(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServer S ocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav a :239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Any advice is highly appreciated. Abhijat Thakur
RE: Multiple Instances of Tomcat
You were right the http connector was open in the second instance and was trying to access the same port as the one in the first instance. Now it works just fine. Thanks a lot. Appreciate all the help. Regards Abhijat Thakur -Original Message- From: Jason Koeninger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 1:43 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Multiple Instances of Tomcat Those sound like they would be used for ajp12 or 13 port numbers. Are you sure the http connector isn't still enabled on both server.xml files for port 8080? I'd be happy to glance at the two files if you like. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Wed, 25 Jul 2001 13:52:21 -0700, Abhijat Thakur wrote: Hi, i am actually using different ports. 8007(server1.xml) and 8009(server2.xml). but i still get the error message. thanks -Original Message- From: Jason Koeninger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 1:37 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Instances of Tomcat The http, ajp12, and/or ajp13 services can't bind to the same port on the same IP address. You need to modify server.xml to put things on different ports or different IP addresses. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Wed, 25 Jul 2001 13:46:29 -0700, Abhijat Thakur wrote: Hi, I am trying to run multiple instances of Tomcat. The documentation tells me that i have to have two server.xml files and have to start Tomca with bin/startup.sh -f /conf/server1.xml and bin/startup.sh -f /conf/server2.xml. Depending on the tomcat instance to which a servlet in a particular application has to be directed the context for that application has to be defined in that particular server.xml file. Now when i start my tomcat and try and start my second instnace of tomcat i get an error. However the port on which i am starting the second tomcat instance is free. FATAL:java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405) at java.net.ServerSocket.init(ServerSocket.java:170) at java.net.ServerSocket.init(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServe r S ocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.ja v a :239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188 ) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Any advice is highly appreciated. Abhijat Thakur
Multiple Instances of Tomcat
Hi, I have multiple instances of Tomcat running on my server and i have configured apache to work with tomcat. What i am not able to figure out is which tomcat file needs modification so that different contexts can be directed to different instances. In server.xml file for different instances i do mention the different contexts related with the different instances. According to Documentation i have to do something like this in (Apache-Tomcat Configuration with per Context JVM) # Mounting the first context. ApJServMount /xyz ajpv12://xyz.corp.com:8007/xyz # Mounting the second context. ApJServMount /abc ajpv12://abc.corp.com:8007/abc i am not sure which file needs this modification. At present which ever instance i load in the end all the requests get directed to that instance. Any help is highly appreciated. Thanks a lot Regards Abhijat Thakur
Tomcat SSL
Hi, If anybody can forward me to some documentation where i can get started on how to configure Tomcat with SSL. The site http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-ssl-howto.htm l does not work. Other than that on the Archives i could find specific questions related to Tomcat SSL problems but i have not reached that far. Thanks in advance Abhijat Thakur
Tomcat SSL
Hi, I followed all the installation instructions to configure Tomcat with SSL 1. put jsse.jar, jcert.jar and jnet.jar in tomcat_home\lib and in jre\lib\ext and also put it in my classpath. 2. modified java.security file to give providers name. 3. Genarated a SSL certificate(RSA) for Tomcat. 4. modified server.xml for SSL implementation i get this error even though jsse.jar is in my classpath. I dont know what to do next. i am kind of stuck. any help is highly appreciated. The error is 2001-06-04 04:09:54 - ContextManager: IOException reading request, ignored - jav ax.net.ssl.SSLException: Unrecognized SSL handshake. at com.sun.net.ssl.internal.ssl.InputRecord.read([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.ssl.AppInputStream.read([DashoPro-V1.2-12019 8]) at java.io.BufferedInputStream.fill(BufferedInputStream.java:186) at java.io.BufferedInputStream.read(BufferedInputStream.java:204) at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestA dapter.java:115) at org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServ letInputStream.java:106) at org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServle tInputStream.java:128) at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138 ) at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(Htt pRequestAdapter.java:129) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio n(HttpConnectionHandler.java:195) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java :498) at java.lang.Thread.run(Thread.java:484) Abhijat Thakur