Ranch Hand
Dec 21, 2017 Questions: I have problem with starting Apache Tomcat 6 from Netbeans IDE 7.4 (on 7.3 version I had the same troubles. Other people mentioned that this problem exist also in other versions, like 8.0 etc). What did I do: remove installed Tomcat 7 (without removing it, I had the same difficulties) add new server, downloaded.
posted 7 years agoI insalled netbeans 7.0 IDE along with that apache tomecat 7.0 server with glassfish server as well. I would like to know where installation generally puts the tomcat server so that i can paste some sample code under its webapp directory and and run some examples by manually starting tomcat server and seeing jsp pages in the browser without using netbeans IDE.
Please advise. Thanks in advance
Please advise. Thanks in advance
Marshal
posted 7 years agoQuestion too difficult for “beginning”: moving discussion.
Bartender
posted 7 years agoGo to Tools -> Servers and check if the Tomcat is listed (I think only GlassFish is installed by default, unless you've chosen to customize installation). If Tomcat is shown in the dialog, there should also be a field with its location.
The quieter you are, the more you are able to hear.
author
posted 7 years agoI'm not sure, but I think that Tomcat gets installed at c:/Program Files/Apache Software Foundation/Apache Tomcat 7.xx or something like that, it could be in Program Files (x86) if you are on a 64-bit system. (You never said which OS you are using...)
Ranch Hand
posted 7 years ago
Ranch Hand
posted 7 years agoI went to Tools and Server and see
catalina home:C:Program FilesApache Software FoundationApache Tomcat 7.0.27
catalina base:C:Documents and SettingsggApplication DataNetBeans7.2.1apache-tomcat-7.0.27.0_base
what is catalina base means.
How do I start the tomcat without starting the netbeans.
I just want to copy paste some sample projects directly under web-app directory to see the results. Where can I find web-app directory
I went to
C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin
I clicked startup.bat.
Nothing happened and servber also not started.
please advise
catalina home:C:Program FilesApache Software FoundationApache Tomcat 7.0.27
catalina base:C:Documents and SettingsggApplication DataNetBeans7.2.1apache-tomcat-7.0.27.0_base
what is catalina base means.
How do I start the tomcat without starting the netbeans.
I just want to copy paste some sample projects directly under web-app directory to see the results. Where can I find web-app directory
I went to
C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin
I clicked startup.bat.
Nothing happened and servber also not started.
please advise
Bartender
posted 7 years agosai rama krishna wrote:My OS is windows 7 with 32 bit.
And that information is not relevant for your question. If you installed Tomcat with NetBeans, doing what I suggested will show you the location where Tomcat is installed.
The quieter you are, the more you are able to hear.
author
posted 7 years agoCopy your webapp directory, or your war file to C:Program FilesApache Software FoundationApache Tomcat 7.0.27webapps
To start Tomcat, open a command prompt at C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin and run startup.bat
Oh, and Kemal, Sai was responding to my post (as to whi OS is being used), so there is no need to to correct Sai.
To start Tomcat, open a command prompt at C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin and run startup.bat
Oh, and Kemal, Sai was responding to my post (as to whi OS is being used), so there is no need to to correct Sai.
Bartender
posted 7 years agoOh, and Kemal, Sai was responding to my post (as to whi OS is being used), so there is no need to to correct Sai.
I didn't correct anyone, I just said that information is not relevant and I still think it isn't. No matter what OS is being used, NetBeans will show where the Tomcat is installed.
The quieter you are, the more you are able to hear.
Ranch Hand
posted 7 years ago![Apache Tomcat Server For Netbeans Apache Tomcat Server For Netbeans](http://doraprojects.net/blog/wp-content/uploads/2014/04/e4.jpg)
I see
catalina base:C:Documents and SettingsggApplication DataNetBeans7.2.1apache-tomcat-7.0.27.0_base
has webapps as below
C:Documents and SettingsggApplication DataNetBeans7.2.1apache-tomcat-7.0.27.0_basewebapps
I pasted
chapter04 folder with all the code
restarted the server and clicked url
http://localhost:8080/chapter04
I do not get the login page
I went to below location as well
C:Program FilesApache Software FoundationApache Tomcat 7.0.27webapps
I pasted
chapter04 folder with all the code
restarted the server and clicked url
http://localhost:8080/chapter04
I do not get the login page
seems I have different tomcat server which installed through netbeans installation but that has no relavent location like
C:Program FilesApache Software FoundationApache Tomcat 7.2.1webapps
I am not sure what is the issue. please advise
author
posted 7 years agosai rama krishna wrote:I pasted chapter04 folder with all the code
You don't copy the entire project, copy only the resulting WAR file or directory. After you build your project, the war file is in the chapter04/dist directory, and the war directory is at chapter04/build/web
It might help if you followed a basic hello world web app tutorial (one that uses only a text editor, not an IDE) which will tell you how to build a war file and deploy it.
Ranch Hand
posted 7 years agoI was trying to run following examples from link below
http://www.manning.com/deshmukh2/
'Simulator and Source Code'
It has about many directories/folders like chapter01, chapter02.....etc.
I am using eclipse with tomcat.
I pasted the folder(say chapter0) at tomcat webapp directory.
When I start tomcat and go to the url
http://localhost:8080/chapter07/filter
It is not working
C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin
clicked on startup.bat
nothing is happening
http://localhost:8080/
shows
You've opened a new tab
With tabs you can:
Use one Internet Explorer window to view all your webpages.
Open links in a background tab while viewing the page you're on.
Save and open multiple webpages at once by using favorites and home page tabs.
To get started:
Press the CTRL key while clicking links (or use the middle mouse button).
Click any tab with the middle mouse button to close it.
Press ALT+ENTER from the address bar or search box to open the result in a new tab.
i was able to start server from eclipse.
I pasted chapter04 war as well inside
C:Program FilesApache Software FoundationApache Tomcat 7.0.27webapps
when i go to
http://localhost:8080/
or
http://localhost:8080/ chapter04 gives
'HTTP Status 404 - /
please advise
http://www.manning.com/deshmukh2/
'Simulator and Source Code'
It has about many directories/folders like chapter01, chapter02.....etc.
I am using eclipse with tomcat.
I pasted the folder(say chapter0) at tomcat webapp directory.
When I start tomcat and go to the url
http://localhost:8080/chapter07/filter
It is not working
C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin
clicked on startup.bat
nothing is happening
http://localhost:8080/
shows
You've opened a new tab
With tabs you can:
Use one Internet Explorer window to view all your webpages.
Open links in a background tab while viewing the page you're on.
Save and open multiple webpages at once by using favorites and home page tabs.
To get started:
Press the CTRL key while clicking links (or use the middle mouse button).
Click any tab with the middle mouse button to close it.
Press ALT+ENTER from the address bar or search box to open the result in a new tab.
i was able to start server from eclipse.
I pasted chapter04 war as well inside
C:Program FilesApache Software FoundationApache Tomcat 7.0.27webapps
when i go to
http://localhost:8080/
or
http://localhost:8080/ chapter04 gives
'HTTP Status 404 - /
please advise
Ranch Hand
posted 7 years agoC:>cd C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin
C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin>startup.bat
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
C:Program FilesApache Software FoundationApache Tomcat 7.0.27bin>
Ranch Hand
posted 7 years agohttp://wso2.org/project/wsas/java/1.1/docs/setting-java-home.html
i followed above link to set the java_home
i followed above link to set the java_home
Ranch Hand
posted 7 years agoIt finally worked. thank you all.
So I do not have copy paste the war file. Just pasting chapter04 etc folder/directory should be fine.
It worked fine with
http://localhost:8080/ chapter04
when I pasted chapter04 folder/directory in webapp directory
So I do not have copy paste the war file. Just pasting chapter04 etc folder/directory should be fine.
It worked fine with
http://localhost:8080/ chapter04
when I pasted chapter04 folder/directory in webapp directory
Ranch Hand
posted 7 years agoIt worked fine with
http://localhost:8080/ chapter04
when I pasted chapter04 folder/directory in webapp directory
How can I run run this web application example in the eclipse. I mean how to import in the eclipse this project so that I can debug easily as eclipse application.
Please advise
http://localhost:8080/ chapter04
when I pasted chapter04 folder/directory in webapp directory
How can I run run this web application example in the eclipse. I mean how to import in the eclipse this project so that I can debug easily as eclipse application.
Please advise
Ranch Hand
posted 7 years agoFile | Import | General | Import existing project into Eclipse. In the import dialog
Here I see two radio button options
I selected first option
1. select root directory
Then eclipse is giving error like
No projects are found to import
Please advise on how to import no eclipse project folder into eclipse.
Here I see two radio button options
I selected first option
1. select root directory
Then eclipse is giving error like
No projects are found to import
Please advise on how to import no eclipse project folder into eclipse.
author
posted 7 years agoI'm confused, I thought your project was already in Eclipse. Or wait, you said you are running NetBeans. So are you saying that you want to move the NetBeans project to Eclipse?
Unfortunately, you can’t run Javas ervlet programs on any old computer. First, you have to install a special program called a servlet engine to turn your computer into a server that’s capable of running servlets. The best-known servlet engine is Apache Tomcat, which is available free from the Apache Software Foundation. Here, the early-release Tomcat version 8 was used.
Tomcat can also work as a basic web server. In actual production environments, Tomcat is usually used in combination with a specialized web server, such as Apache’s HTTP Server.
How to install and configure Tomcat
Installing Tomcat isn’t rocket science, but it’s not as easy as making toast, either. Here are the steps you can follow to set up Tomcat 8:
- Download the Tomcat Zip file from the Apache website.Although Apache also offers an executable setup file for installing Tomcat, download the Zip file instead.
- Extract the contents of the Zip file by right-clicking the file and choosing Extract All; then specify c: as the location to extract the files to.You probably don’t want to clutter your root directory with a bunch of files, but the Tomcat Zip file contains a single folder named apache-tomcat-8_0_0 (the version number may vary), so only this one folder is created. After all the files are extracted, give this folder a new name that’s a little easier to type.
- Create an environment variable named JAVA_HOME that points to the location of your Java Development Kit (JDK).To create an environment variable, open Control Panel, double-click the System icon, and then click Advanced System Settings→Environment Variables→New, and create a variable named JAVA_HOME. The value of this variable needs to be the complete path to your JDK installation folder, such as c:Program FilesJavajdk1.8.0.A common mistake is to set this variable to the bin directory or to the directory for the Java Runtime Environment (JRE), not the JDK. If Tomcat doesn’t start up later, double-check the JAVA_HOME directory.
- Copy the servlet-api.jar file to the jrelibext folder in your JDK root.If your JDK is installed in c:Program FilesJavajdk1.8.0, copy this file to c:Program FilesJavajdk1.8.0jrelibext. You find the servlet-api.jar file in c:tomcatlib, assuming that you extracted the Tomcat files to c:tomcat.If you skip this step or copy the servlet-api.jar file to the wrong place, you can’t compile your servlet programs. If you get compiler messages complaining that the javax.servlet package doesn’t exist, double-check this step to make sure you performed it right.
Starting and stopping Tomcat
After you install and configure Tomcat, you can start it by opening a command window, changing to the c:tomcatbin directory, and typing startup. A batch file runs, starting Tomcat. When Tomcat starts, it opens a second command window that displays various status messages.
You know that Tomcat has started when you see a line such as the following, indicating how long the startup took:
If the Tomcat window appears briefly, and then an exception message flies by quickly and the window closes, the most likely problem is that you already have a web server running on your system, and that server has already laid claim to the port Tomcat wants to use for HTTP communication. The solution to that problem is to edit the server.xml file in c:tomcatconf and look for this tag:
Change the port number from 8080 to some other number, such as 18080. Later, when you display servlets in a browser window, you have to specify this number as the HTTP port number instead of 8080.
You don’t need to shut down Tomcat after you start it unless you make a change in one of its configuration files. If you do, you can shut down Tomcat by running the shutdown batch file from the c:tomcatbin directory. Then you can run the startup batch file to get Tomcat going again.
Testing Tomcat
To find out whether you installed Tomcat correctly, you can try running the test servlets that are automatically installed when you install Tomcat. Open a web-browser window, and type this address:
(If you changed the port number by editing the server.xml file, use the port number you specified instead of 8080.)
This page appears.