Eclipse and Tomcat questions

S

Steven

Hi everyone,

Lastnight I setup Eclipse to work with Tomcat, which works very good, but
there are something I don't understand.

1. My files are put in my workspace in (C:\Documents and Settings\...etc)
How does Tomcat (which is installed in C:\Tomcat) know that it should get
the files from my workspace directory?
Because in the C:\Tomcat directory I can't find any .XML file that refers to
my workspace directory.

2. How I developed my servlets till now, I had some other free editor, I
needed to compile my servlets then restart Tomcat and then test it.
With Eclipse + Tomcat plugin, all I need to do save the servlet and
apparently the source code is compiled automatically. All I need to do is
refresh the servlet in my browsers (very handy and easy to develop like
this). But my question is, does Eclipse compile the servlet automatically
after saving? And why doesn't tomcat have to be restarted?

Just a few questions to understand it a bit better, I'm really happy with
this setup as it makes everything a lot easier.

Rgrds,
Steven.
 
A

Alex Hunsley

Steven said:
Hi everyone,

Lastnight I setup Eclipse to work with Tomcat, which works very good, but
there are something I don't understand.

How? Using the sysdeo plugin, or something else?

1. My files are put in my workspace in (C:\Documents and Settings\...etc)
How does Tomcat (which is installed in C:\Tomcat) know that it should get
the files from my workspace directory?
Because in the C:\Tomcat directory I can't find any .XML file that refers to
my workspace directory.

How about c:\tomcat\conf\server.xml? Does that mention your workspace dir?

2. How I developed my servlets till now, I had some other free editor, I
needed to compile my servlets then restart Tomcat and then test it.
With Eclipse + Tomcat plugin, all I need to do save the servlet and
apparently the source code is compiled automatically. All I need to do is
refresh the servlet in my browsers (very handy and easy to develop like
this). But my question is, does Eclipse compile the servlet automatically
after saving?

If you have Project -> Build Automatically ticked, yes, it will compile
your java src immediately.
And why doesn't tomcat have to be restarted?

You can configure tomcat to automatically reload classes that have
changed. Can be caused by this:

reloadable="true"

appearing in server.xml's contexts...

Btw, I may be wrong about this, but I don't think c.l.java.gui is a good
group for this question. I think that group is for gui programming, as
opposed to gui IDEs.
 
I

IchBin

Steven said:
Hi everyone,

Lastnight I setup Eclipse to work with Tomcat, which works very good, but
there are something I don't understand.

1. My files are put in my workspace in (C:\Documents and Settings\...etc)
How does Tomcat (which is installed in C:\Tomcat) know that it should get
the files from my workspace directory?
Because in the C:\Tomcat directory I can't find any .XML file that refers to
my workspace directory.

2. How I developed my servlets till now, I had some other free editor, I
needed to compile my servlets then restart Tomcat and then test it.
With Eclipse + Tomcat plugin, all I need to do save the servlet and
apparently the source code is compiled automatically. All I need to do is
refresh the servlet in my browsers (very handy and easy to develop like
this). But my question is, does Eclipse compile the servlet automatically
after saving? And why doesn't tomcat have to be restarted?

Just a few questions to understand it a bit better, I'm really happy with
this setup as it makes everything a lot easier.

Rgrds,
Steven.
Think you want to look at this subdirectory where the xml project files
are dynamically built and referenced:

...\Tomcat5.5\conf\Catalina\localhost

Example:

<Context path="/Tom1"
reloadable="true"
docBase="C:\Documents and Settings\Ed Taylor\My Documents\Projects
Eclipse\workspaces\workspace Web\Tom1" workDir="C:\Documents and
Settings\Ed Taylor\My Documents\Projects Eclipse\workspaces\workspace
Web\Tom1\work" >
</Context>

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
I

IchBin

Steven said:
Hi everyone,

Lastnight I setup Eclipse to work with Tomcat, which works very good, but
there are something I don't understand.

1. My files are put in my workspace in (C:\Documents and Settings\...etc)
How does Tomcat (which is installed in C:\Tomcat) know that it should get
the files from my workspace directory?
Because in the C:\Tomcat directory I can't find any .XML file that refers to
my workspace directory.

2. How I developed my servlets till now, I had some other free editor, I
needed to compile my servlets then restart Tomcat and then test it.
With Eclipse + Tomcat plugin, all I need to do save the servlet and
apparently the source code is compiled automatically. All I need to do is
refresh the servlet in my browsers (very handy and easy to develop like
this). But my question is, does Eclipse compile the servlet automatically
after saving? And why doesn't tomcat have to be restarted?

Just a few questions to understand it a bit better, I'm really happy with
this setup as it makes everything a lot easier.

Rgrds,
Steven.
Think you want to look at this subdirectory where the xml project files
are dynamically built and referenced:

...\Tomcat5.5\conf\Catalina\localhost

Example:

<Context
path="/Tom1"
reloadable="true"
docBase="C:\Documents and Settings\Ed Taylor\My Documents\Projects
Eclipse\workspaces\workspace Web\Tom1"
workDir="C:\Documents and Settings\Ed Taylor\My Documents\Projects
Eclipse\workspaces\workspace Web\Tom1\work" >
</Context>

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top