• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Adding new application in tomcat

 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am trying to add a new application(context). What I havedone so far is 1. Create an new Directory structure identicalto Tomcat's examples/WEB-INF/classes and compiledmy Servlet code into this directory. 2. Am now attempting to modify the Servler.xml file toadd the new context. Mainly by cutting and pasting fromthe examples Context tag but changing references from examples toApp1. Bring up Tomcat - comes up ok but gives the followingerror log containing: 2001-10-17 09:44:59 WebappLoader[/App1]: Deploying class repositories to work directory C:\Program Files\Apache Tomcat 4.0\work\localhost\App1
2001-10-17 09:44:59 WebappLoader[/App1]: Reloading checks are enabled for this Context
2001-10-17 09:44:59 StandardManager[/App1]: Seeding random number generator class java.security.SecureRandom
2001-10-17 09:44:59 StandardManager[/App1]: Seeding of random number generator has been completed
2001-10-17 09:44:59 ContextConfig[/App1]: Configured an authenticator for method FORM
2001-10-17 09:44:59 StandardContext[/App1]: Error configuring application listener of class listeners.ContextListener
java.lang.ClassNotFoundException: listeners.ContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1264)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1113)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3168)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3385)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218) 2001-10-17 09:44:59 StandardContext[/App1]: Error configuring application listener of class listeners.SessionListener
java.lang.ClassNotFoundException: listeners.SessionListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1264)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1113)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3168)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3385)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218) 2001-10-17 09:44:59 StandardContext[/App1]: Skipped installing application listeners due to previous error(s)
2001-10-17 09:44:59 StandardContext[/App1]: Context startup failed due to previous errors Has anyone seen this before, or know what I've done wrong
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
U dont need to add anything to the server.xml file.just restart the server.
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do not edit the server.xml file. Just restart the Server.
Wish there was something that will automatically detect the addition of new context and we don't have to restart the Server.
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how can i add a new context without making an entry in the server.xml
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SIMPLY PUT UR WEBAPP DIRECTORY or .war under webapps directory of tomcat.Restart the server. The name of the .war file / directory name is the context.
[ May 23, 2002: Message edited by: Pradeep Manjeshwar ]
 
Message for you sir! I think it is a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic