Sorry if repost
I’m new to JSP. I’m following a tutorial from a book, but I’m facing a problem in one of the first steps of the example web app.
I’ve installed the Tomcat 6.0, and this is it’s full path:
C:\Program Files\Apache Software Foundation\Tomcat 6.0
The book says that to start Tomcat, I must cd into the Tomcat home directory and run bin/startup.sh, but since there is not any startup.sh file into bin folder, I do bin/tomcat6.exe.
I don’t know If that is right, but Tomcat seems to start correctly that way.
But here is the problem : I created a folder (named Beer-v1) with an HTML form inside (form.html), and I placed everything into the already existing folder webapps.
This is the full path of the html file:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Beer-v1\form.html
So I type in my browser: http://localhost:8080/Beer-v1/form.html , but the page “503 Service Temporarily Unavailable” is displayed, and not the form.html.
What am I doing wrong?.
Please help.
Thanks in advance.
The book says that to start Tomcat, I
must cd into the Tomcat home directory
and run bin/startup.sh, but since
there is not any startup.sh file into
bin folder, I do bin/tomcat6.exe.
If you don't have TOMCAT_HOME/bin/startup.bat which should be used for Windows instead of startup.sh for Unix/Linux, but have tomcat6.exe and tomcat6w.exe, then you've probably installed Tomcat through an installer.
What you need to do, is on the system tray, find the tomcat logo, right-click on it and start it.
Alternatively, run Services.msc (from windows Run) and start Apache Tomcat 6 service.
Related
so I've manually installed tomcat version 9.0.10 and the newest java JDK.
I've correctly added the manager-gui and admin-gui users. i have went into the server.xml files and found that all the ports were correct.. (connecting to default port 8080) I had to do []# unset CATALINA_HOME or else it wouldn't let me start tomcat so I did and it started but when I went to the browser and typed in the localhost:8080 it didn't show, it only says firefox could not establish connection with server localhost:8080 so I went into logs to see if there were any errors and sure enough there was an error like so: /usr/local/tomcat/apache-tomcat-9.0.10/bin/catalina.sh: line 464: /usr/bin/Java/jdk-10.0.2/bin/bin/java does not exist.. and its probably right why would there be /bin/bin/ like that in a directory.. so i went into the catalina.sh file copied what it had inside into a blank file in documents and went to line 464 (txt editor numbered the lines for me) and what i found was this line at 464: eval $_NOHUP "\"$_RUNJAVA" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS %CATALINA_OPTS\
but I have no idea what to do about it.. i think i might have a path problem or could be a port problem but I don't think so... I've installed apache and it works great in the browser with localhost.. could that affect the tomcat access maybe?
anyway, id really appreciate any help I can get.. I'm very new to this by the way. I'm sorry, I couldn't copy and paste from my virtual machine so I had to type it. im on centos 7.
I think you are looking for tomcat deployment page where you can manage your artifact. If that is correct
First thing you need to check is that whether your installation contains tomcat manager application.
You can verify this by looking in to this path ("apache-tomcat-9.0.10\webapps\manager") If this path is absent you may have to reinstall your tomcat.
Try downloading the zip from the below path and start the server.
If you are trying to deploy your custom application you may have to provide the context path for accessing you application. Also you can verify the deployment by looking in to the above path. For eg: if you are trying to deploy test.war then a folder named test will appear in the webapp folder.
Hope this helps.
Can anyone please explain the below problem.
I'm using tomcat 8 and when I'm trying to start startup.bat file, the command prompt is opening and closing immediately just like blinking. However in the past while I'm working with java programs it worked fine but recently I installed Xampp and there in it again tomcat is downloaded "C:\xampp\tomcat". The same problem comes here in this folder as well, when I try to run startup.bat file. But when I use "XAMPP control panel" to start the Tomcat its able to get start and I'm getting "localhost:8080" start page in the browser.
The connector port for both tomcats are 8080 and I tried with changing the port number in tomcat 8 but no use. There should not be 2 tomcat servers in a single system? If not, why? (I've not installed them, both are in C drive)
I want to work with java servlet programs now.So I need use of tomcat. I've set below environment user varibles:
JAVA_HOME to C:\Program Files\Java\jdk1.8.0_65;
path to C:\Program Files\Java\jdk1.8.0_65\bin;C:\apache-maven-3.3.9\bin
Please suggest the solutions.
Thanks in advance.
I think you should check the tomcat log to find some clues, it is in log folder of your tomcat installation folder. Maybe you have missed some startup variable in start.bat for your new installed things.
BTW, if you want to keep seeing what happened in startup, try to run startup.bat in a command line console, but not double click it through your mouse. It will continue on generating log output in that console.
In many materials about tomcat what I've looked I saw that authors uses exeternal batch script for start and stop tomcat.
I didn't see information about wrting this script. I think this script provided by tomcat.
I used exe file for installing my tomcat 7 on my windows 7. In tomcat directory I search startup.bat. This file is missed.
Can you help me?
It should be in the /bin directory. If you're missing this file possibly it means that you have installed Tomcat using Windows Installer. Try to download appropriate .zip archive, I believe that you will find startup script there.
I was puzzled by this - windows people need to script too!
However I think it is because tomcat gets installed as a service with a manager. If you want to start and stop it without using the manager you start and stop the service directly.
You can do this by typing (in an admin command prompt)
net start tomcat7
and
net stop tomcat7
Though it would be everywhere, still if you download the zip from their site, you can follow these instructions - http://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html
bin\startup.bat is for windows & .sh is for Unix.
Have you checked bin directory under Tomcat instalation dir? It should containt *.bat for start and stop server etc.
If you want to start Tomcat server by using startup.bat and you are unable to find it(that's because installer does not have it, you can only see it if you download and run .zip this will show startup.bat explicitly https://www.screencast.com/t/RMPCq5eJre3),
So to solve the issue just go to C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7\bin and double click Tomcat.exe, a command prompt like screen will appear this is the the same as clicking startup.bat script. Hope this helps
I am using tomcat5.0.28 windows installer , and it stopped in the middle of progress bar.
with the last message "using jvm: c:\java\j2sdk1.4.2_19\"
i wait for a long time, and it seems freeze, i have to kill the process.
I use process explorer to check the processes. i found a children process created by tomcat installer, i checked the property of this process, and found the command line is:
C:\TEMP\nse305.tmp\ns306.tmp "C:\Program Files\Apache Software Foundation\Tomcat5.0\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName "Apache Tomcat" --Description "Apache Tomcat 5.0 Server -http://jakarta.apache.org/tomcat/" --LogPath "C:\Program Files\Apache Software Foundation\Tomcat 5.0\logs" --Install "C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\tomcat5.exe" --Jvm "$2"'
i copied this long command line, and try to run it in cmd windows, it show some tomcat install service message, then it freeze, the process does not return at all.
i think that is the problem, this children process does not return , which blocked the tomcat installation.
i downloaded the tomcat5.0.28 sourcecode and go to tomcat5.nsi file.(the install script file), and found it is trying to run this :
nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName "Apache Tomcat" --Description "Apache Tomcat #VERSION# Server - http://jakarta.apache.org/tomcat/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat5.exe" --Jvm "$2"'
looks like the installer use nsExec, a library to run the command .
i found C:\TEMP\nse305.tmp\ns306.tmp, and in the same folder, there is also a nsExec.dll file.
i compared the ns306.tmp with nsExec.dll. there is a little difference between them, only several byte, and 99% is same, so i think this tmp file is actually a variant of nsExec.dll.
i guess the nsis engine created this temp folder and temp file, and use it to run the command line, i am not clear how NSIS engine and NsExec do their job, but i think they don't work well this time in my pc, maybe it's my pc's problem.
but why this process never return? can anybody give me any clue ?
(i also tried to run tomcat6.0 installer, it works well, no problem)
Not sure if this is related, but I vaguely remember having issues with Tomcat when I installed it on a path which included empty spaces. ie. the space in between "Program" and "Files" in your Tomcat installation path in C:\Program Files... may be the cause for the issues.
I might be completely off the track though. Let us know if this helps though.
I agree with tim_wonil that the issue is probably a bad path somewhere.
As far as nsExec goes, .dll files are normally NSIS plugins and the nsExec plugin makes a copy of itself and patches that copy so it will run as a program and not a dll. You can find the nsExec source # NSIS SCM
While trying to deploy my spring app on tomcat 6 I get an error saying
java.util.logging.errormanager:4
java.io.filenotfoundexception: c:\program files\apache software foundation\tomcat 6.0\logs\catalina.2010.02.16.log <Access is denied>
at java.io.fileoutputstream.openappend <native method>
at java.io.fileoutputstream.<init><unknown source>
at java.io.filewriter.<init><unknown source>
at apache.juli.filehandler.open<filehandler.java:259>
at apache.juli.filehandler.open<filehandler.java:59>
at apache.juli.filehandler.open<filehandler.java:50>
at sun.reflect.nativeconstructoraccessorImpl.newInstance0<native method>
at sun.reflect.delegatingconstructoraccessorImpl.newInstance<unknown source>
at sun.reflect.constructor.newInstance<unknown source>
at java.lang.class.newinstance0<unknown source>
at org.apache.juli.classloaderlogmanager.readconfiguration<classloaderlogmanager.java:418>
.....
.....
at java.util.logging.logmanager$2.run<unknown source>
.....
.....
Is this because Tomcat hasn't been installed properly? Or do I need some permissions to use Tomcat? Or are some important tomcat files missing? Or something else?
I solved it by running netBeans (or whichever IDE you are using to run the application) as an administrator. That gives you access permissions.
Check if the following file exists:
c:\program files\apache software foundation\tomcat 6.0\logs\catalina.2010.02.16.log
Your exception says <Access is denied>, so maybe the file is open in another application or you are missing permissions?
right click on log folder and in security give yourself proper WRITE permission and make sure folders are not in read only mode.
Looks like you're working on a machine that has some security policies in place that restrict you from installing software yourself. This is very common in most organizations nowadays.
Do the following:
Uninstall tomcat.
Find a folder where you can read/write into (eg. D:\neetu)
Install tomcat in the above folder.
Run tomcat.
It should work now.
After installing Apache Tomcat you must give the OS user who will be running the Tomcat server write/update rights to the directories: temp, logs, work.
Tomcat has no access rights to the c:\program files\ folders. There are ways to get around this, but the easiest way will be to install Tomcat in another directory, e.g in your user area (C:\Users).
Solution: I right click on eclipse and gave it administrative rights
The simple solution is that you need to run Tomcat with Administrator Permission. And this access denied will never occur.