|Re: Publish fail on new Unbuntu/Eclpse/Tomcat install [message #1091719 is a reply to message #1091678]
||Wed, 21 August 2013 22:17
| Russell Bateman
Registered: July 2009
Location: Provo, Utah, USA
On 8/21/2013 3:06 PM, Eric Meredith wrote:|
> Fair enough...
> In this case, the path I specified (/var/lib/tomcat7/webapps/ROOT) is on
> my local machine, which used for development.
> Maybe the question is ... Where should I publish
This is really a question for the Eclipse web tools forum, but I'll butt
in if I can help.
There are a couple of answers to your question. I'll try to be thorough
without resorting to an entire thesis.
1. You can wire in a Tomcat for Eclipse to use in an intimate way via
Window -> Preferences -> Server -> Runtime Environments -> Add... then
navigate to the top of your Tomcat 7 download. Then, in the Project
Explorer, add a new Server, selecting the Tomcat you wired in. Eclipse
publishes to a this path in your workspace:
where N is usually 0 unless you're doing this with multiple Tomcat versions.
In that subdirectory, you'll see webapps and wtpwebapps. At least in a
Dynamic Web Project (I have no experience with static web projects),
it's the second subdirectory where I find exactly what I'd expect to see
once I deployed my WAR file to a production installation of Tomcat
(/var/lib/tomcat7/webapps), namely, my application.
It's easy this way also to make your Eclipse Tomcat work on a different
port number so that anything that's running on your "real" Tomcat
remains undisturbed. Just double-click the server in the Server view to
This is how I do it, WTP has made it easy. I see it as a sort of default
WTP way. However, I've had colleagues who have...
2. ...wired up Eclipse to publish to local downloads of Tomcat on paths
like, /home/russ/dev/apache-tomcat-6.0.37, and so Eclipse publishes the
web application to /home/user/dev/apache-tomcat-6.0.37/webapps. Etc.
I've not done this, but I'm sure there's doc somewhere on it and, of
course, Nitin knows (he's one of the WTP developers).
As for rigging Eclipse to...
3. ...publish to /var/lib/tomcat7/webapps (what you've asked for), I'm
even less sure how to do that. I find the first method, besides just
being the one I first learned, to be a simpler approach.
There are great tutorials on #1 above at
(short and sweet)
(old, but very thorough)
and all over the place--just Google.
Hope this helps. If not, Nitin is the expert.
Powered by FUDForum
. Page generated in 0.02289 seconds