• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

netbeans tomcat webapp directory location

 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I 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
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question too difficult for “beginning”: moving discussion.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go 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.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'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...)

 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My OS is windows 7 with 32 bit.
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I went to Tools and Server and see


catalina home:C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27

catalina base:C:\Documents and Settings\gg\Application Data\NetBeans\7.2.1\apache-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 Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin

I clicked startup.bat.

Nothing happened and servber also not started.

please advise
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sai 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.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Copy your webapp directory, or your war file to C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27\webapps
To start Tomcat, open a command prompt at C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin 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.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

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.
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I see

catalina base:C:\Documents and Settings\gg\Application Data\NetBeans\7.2.1\apache-tomcat-7.0.27.0_base
has webapps as below
C:\Documents and Settings\gg\Application Data\NetBeans\7.2.1\apache-tomcat-7.0.27.0_base\webapps

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 Files\Apache Software Foundation\Apache Tomcat 7.0.27\webapps


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 Files\Apache Software Foundation\Apache Tomcat 7.2.1\webapps


I am not sure what is the issue. please advise


 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sai 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.
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I 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 Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin

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 Files\Apache Software Foundation\Apache Tomcat 7.0.27\webapps

when i go to
http://localhost:8080/
or
http://localhost:8080/ chapter04 gives

'HTTP Status 404 - /

please advise




 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


C:\>cd C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin

C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin>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 Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin>
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://wso2.org/project/wsas/java/1.1/docs/setting-java-home.html

i followed above link to set the java_home
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It 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
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It 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
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
File | 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.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic