• 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

Problem at starting Apache Tomcat 8.0.15 for first time

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I've downloaded Apache Tomcat 8.0.15 and trying to start my webserver, but could not able to do. Actually I've downloaded zip file from Apache foundation. In previous versions I could start Tomcat.exe by just double clicking it and could see the status of web server. But, while if now trying to do so, nothing opening but just command prompt is opens and close automatically within a second. I've also set path. Friends... please suggest me how to overcome this in detail....THANKS IN ADVANCE
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Krishnan, welcome to CodeRanch!

Have you tried starting it from the command line using the startup.bat file?
 
krishnan Ayyalasomayajula
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran...

Thanks for response..

I've just set path in command line up to startup.bat. If I'm not correct, please guide me how to do it...
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Jaikiran implied was: you should try starting it from the command line, because that gives you a chance to see any error messages (which now disappear too quickly to be seen).
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat sends (by default) certain output to stdout, including log messages targeting catalina.out.

In Windows, if a program attempts to write to stdout and there's no "DOS" window to write it to, the normal process would be to create and open one. However, that window will close when the program terminates.

In some cases, this will happen even though you launched Tomcat from a completely different (and "permanent") command-line window, owing to how things are spawned.

You can suppress this behavior. It's an option of the Windows function (I think it's on the START command).
 
krishnan Ayyalasomayajula
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Thanks For Your Responses...

When I entered command to start startup.bat I'm getting an error as follow...

"The CATALINA_HOME Environment variable is not defined correctly."

Actually, I've defined CATALINA_HOME in System variables (By navigated through MyComputer->properties->AdvanceVariables->SystemVariables->New->

Variable Name :CATALINA_HOME

Value : E:\Books\Java\apache-tomcat-8.0.15;

where tomcat-8.0.15 is my tomcat root directory

For Your convinience, I'm attaching screen shot of my error... please check it.
javaerror.jpg
[Thumbnail for javaerror.jpg]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the semicolon doing there? Remove that.
 
krishnan Ayyalasomayajula
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Dittmer,

Still getting error even after removing semicolon.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the command prompt, type:


What do you see?
 
krishnan Ayyalasomayajula
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Tim,

I've tried echo... and got the location of Tomcat roor directory. You can find it in screen shot...
CATALINA.JPG
[Thumbnail for CATALINA.JPG]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your snapshot shows JRE_HOME is not defined.Make sure you define the same in your environment variables.
 
krishnan Ayyalasomayajula
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Vijayanand,

I hope I've properly defined JRE_HOME. Please check the below screen shot
jre_home.jpg
[Thumbnail for jre_home.jpg]
 
VijayAnand Venkateswaran
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Krishna,

refer to the snapshot attached for your reference.Also when ever you execute startup.bat you should not see any error messages.Even though your snapshot shows the jre path, startup.bat is not able to find the
jre path, i the prevous snapshot,check if any where the environment variables are being overridden.
Tomcat.PNG
[Thumbnail for Tomcat.PNG]
Tomcat Snapshot
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So which URL are you trying to access, and what happens when you do that? Are there any entries in any of the log files afterwards?

By the way, in the future https://coderanch.com/how-to/java/PostTextNotScreenshots.
 
krishnan Ayyalasomayajula
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All..

I'm now happy to say that My Tomcat is running successfully....

I had to format my system and after installing OS, I've tried to installed Apache Tomcat. This time, no error came and everything was successfully completed.

I don't know why it's not happened previously

Anyhow, I'm really thankful to all of you for came front whenever I've asked doubts.


 
reply
    Bookmark Topic Watch Topic
  • New Topic