• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hello World

 
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am still not able to run my first servlet here... Can anyone help me please.

1. I just downloaded Tomcat
and installed it at e:


2.While installation I gave port 9000. and now I start Tomcat by right-clicking an icon in the taskbar. when the service starts I see the page reading

"If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!"
at "http://localhost:9000/"

I have a static page in "myapp" directory (user-created) but I am not able to view it through... http://localhost:9000/myapp/test.html


What could be the problem? I am been messing around it from past many days. Please help.
[ April 04, 2006: Message edited by: Akhilesh Trivedi ]
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
myApp directory must reside inside Webapps directory.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ajith its working! !!
 
Akhilesh Trivedi
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Surprisingly... I am not able to run JSP Examples and Servlet-examples. When I click on the "JSP-examples" at my default page and go to

"http://localhost:9000/jsp-examples/"

it says... "The requested resource (/jsp-examples/) is not available."

I have tried to read the server "status" through "http://localhost:9000/manager/html/list" it shows "Running-false" for

/myApp,
/jsp-examples
and /servlets-examples
 
Ajith George
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure the folder jsp-examples is available in webapps directory.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By default it is in webapps only.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the listing of applications at admin console.



If I click start it says.... "FAIL - Application at context path /jsp-examples could not be started"
 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the messages in the tomcat console and the log files in tomcat/logs folder. You may see some error messages to identify the causes.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning all.
Thanks Bruce, just re-started my tomcat by going at command prompt and typing "tomcat5" with a list of messages... i finally have


Apr 5, 2006 9:48:34 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-9000
Apr 5, 2006 9:48:34 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 636 ms
Apr 5, 2006 9:48:34 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 5, 2006 9:48:34 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.16
Apr 5, 2006 9:48:34 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 5, 2006 9:48:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 5, 2006 9:48:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jsp-examples] startup failed due to previous errors
Apr 5, 2006 9:48:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 5, 2006 9:48:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/servlets-examples] startup failed due to previous errors
Apr 5, 2006 9:48:35 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-9000
Apr 5, 2006 9:48:35 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 5, 2006 9:48:35 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/41 config=null
Apr 5, 2006 9:48:35 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Apr 5, 2006 9:48:36 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1382 ms
and it waits.... hope this means the server startup is successful.

But http://localhost:9000/manager/html/list still shows false for the "jsp-examples" and "servlets-examples".....

The command prompt now has added some messages...


Apr 5, 2006 9:48:51 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 5, 2006 9:48:51 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/servlets-examples] startup failed due to previous errors
Apr 5, 2006 9:48:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 5, 2006 9:48:58 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jsp-examples] startup failed due to previous errors
.
.
.
:roll:
[ April 04, 2006: Message edited by: Akhilesh Trivedi ]
 
Akhilesh Trivedi
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally done with it...
Lessons learnt.

1. Don't put a semicolon ";" after the value of the CATALINA_HOME or JAVA_HOME environment variables.

2. Use Zipped version for Tomcat installation rather than Windows EXE coz the zip version has the startup-batch file and you can list out the details easily as like...

E:\Tomcat 5\bin>STARTUP
Using CATALINA_BASE: E:\Tomcat 5
Using CATALINA_HOME: E:\Tomcat 5
Using CATALINA_TMPDIR: E:\Tomcat 5\temp
Using JRE_HOME: E:\java

Checking out if things are running fine with "myapp" now. Thank you all buddies.

[ April 05, 2006: Message edited by: Akhilesh Trivedi ]
[ April 05, 2006: Message edited by: Akhilesh Trivedi ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Akhilesh,

Thank you for reporting back with your findings.
There is nothing wrong with using tomcat.exe.
The same messages that you saw on the console will go to the log files under tomcat/logs.

With a good text editor (such as TextPad) you can watch the logs as they are updated (real time).

In any case, this thread is more Tomcat specific than Servlet specific so I'm going to move it to the Apache Tomcat forum.

-Ben
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Curently we are using Unix solaris 6 and we are migrating code into Unix solaris 7. do we need to change in .Jar are or just configration\property file in IBM websphare\MQ needs to be change?
 
reply
    Bookmark Topic Watch Topic
  • New Topic