Tomcat: startup.bat is missing - java

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

Related

tomcat starts but doesnt show up in browser when entering: localhost:8080 or ip:8080 Centos7 vm

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.

Tomcat startup batch issue

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.

Trouble starting tomcatv7 via Eclipse Kepler

I see that problems like mine have been posted before, some of which posts were answered. I've attempted the fixes, which indeed seem like they should have worked, but I'm still running into the same problem:
I'm trying to run a dynamic web project in Eclipse Kepler (Java EE) via apache tomcat 7.0.53 on my localhost. I've created tomcat as a server in Eclipse, and copied the config files from /tomcat/7.0.53/libexec/conf into /workspace/Servers/Tomcat v7.0 Server at localhost-config, and changed the permissions on the files so that they are all readable and writeable.
However, when I try to start the tomcat server in eclipse, I get this error:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.
In case it's helpful, it's all being run in mac osx 10.6.8, on a 64-bit machine.
Thanks in advance for your help.
I am facing this issue. I have fixed as following way,
Step 1: Delete server at local host(Server tab)
Step 2: Delete Servers folder in (navigator/project explorer)
Step 3: After add New->server->Apache->choose path
Step 4: start the server
After it will work......
How to solve:
1.Close Eclipse
2.Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0.53 Server at localhost-config
3.Start Eclipse
4.Expand the Servers project, click on the Tomcat 7 project and hit F5
5.Start Tomcat from Eclipse
Go to Server --> Apache Tomcat v7.0 --> Add
Select jre7 instead of Workbench default JRE
Click on Finish
Stop Server and then Start Server
This is a permissions problem (I had the same issue in ubuntu 14.04, eclipse luna, tomcat7). The executable files are not marked as "executable" when tomcat is donwloaded from eclipse.
Just go to your "[tomcat]/bin" directory in your file system and add execution permission (x) to all .sh files. Then go back to eclipse/servers tab, delete the tomcat7 entry an create again, finally start tomcat from eclipse.
This same problem happened to me before then i got solution for config load error:
it can be solved Right click on Project-> Build Path-> Configure Build Path->go Library tab-> Add External Jar-> browse (Apache TomCat Folder->lib->and add servlet-api.jar) add click ok. it run fine for me.
Unfortunately, this is not much of an answer. I finally never got this working with eclipse Kepler. However, when I installed linux mint on my computer, and used its software installer to install linux 3.8 (indigo), added all the EE updates (all the web/xml additions via help-->install new software-->indigo update site), installed tomcat 7.0, I finally got eclipse to play nice with tomcat (that is, I can run the webapp on tomcat from eclipse, without copy/pasting all the requisite files into tomcat, which is saving me a boatload of time).
I'm sure there is a better way to do this - if anyone has any thoughts about what may have gone wrong in my initial environment, please advise - I'm curious why it didn't work. Here were the specs:
MacOS 10.6.8
Eclipse 4.3.2
Tomcat 7.0.54
My apologies, Raju, for not responding sooner. Thanks for your post.
How to solve:
Close Eclipse
Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0 Server at localhost-config
Start Eclipse
Expand the Servers project, click on the Tomcat 7 project and hit F5
Start Tomcat from Eclipse
I found that this is a good old fashion directory naming convention problem. I'm running Linux Ubuntu and noticed that right under {your work space}/Servers there appeared a strange error type file when I opened it had all kinds of chunks of the crazy long directory name "Tomcat 7.0 Server... bla bla" So I deleted the Server, then made use of this little ditty cause my version also won't let me re-add the server again:
1. Close Eclipse
2. In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
3. Restart Eclipse
Then I re-added the server using a friendlier server name without any crazy spaces or chars: Tomcat7ServerAtLocalHost
The wella... it started with a brand new error for me to debug... which means I'm on the right track... BTW, the new error is: "Cannot publish to the server because it is missing its runtime environment."
So I'm off to debug that mess... Cheers!
This problem is mostly associated with file permissions. So the best way to solve the problem is to install a local copy of Tomcat on your development machine instead of putting Tomcat in a system directory such as /usr/share/tomcat7. This way all Tomcat conf files belong to the user and user group so that it can be run from Eclipse by the user. I normally place Tomcat at my local folder such as /home/abc/dev and it works perfectly with Eclipse development environment.
For me the only solution that works is this solution suggested here:
Could not load the Tomcat server configuration
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /var/log/tomcat7 log
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R a+rwx /usr/share/tomcat7/conf

Problem with Tomcat: 503 Service Temporarily Unavailable

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.

Install Tomcat 5.0.28 failed

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

Categories

Resources