This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes tomcat configuration in eclipse - context element in server.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "tomcat configuration in eclipse - context element in server.xml" Watch "tomcat configuration in eclipse - context element in server.xml" New topic
Author

tomcat configuration in eclipse - context element in server.xml

Maciej Drozdzowski
Ranch Hand

Joined: Dec 30, 2009
Posts: 40

i'm having a problem understanding one thing.

when i create a new server (tomcat) in eclipse, config files are created, including server.xml.
when i add my projects, it creates <Context> elements under Server->Service->Engine->Host.

i'm more than ok with that, everything works fine, but i want to understand that file.

when i tried to find a .dtd for that file - i found explanation why none can exist.
i checked apache's documentation and i noticed that eclipse adds one attribute to the <Context> element - source.



where can i find some docs for attributes added by eclipse?
chets patel
Ranch Hand

Joined: Apr 27, 2010
Posts: 73

For every web application there will be one Context entry in server.xml.

value of the path attribute is used in URL when you access the servlet.
reloadable=true says that any change will be loaded without restart of server.
docBase will be the path of the WAR file of your web application project.

Hope this is clear..
Maciej Drozdzowski
Ranch Hand

Joined: Dec 30, 2009
Posts: 40

you're not answering my question, maybe i didn't make myself clear.

eclipse adds the source attribute and it's not in tomcat's docs.
what is that attribute? where do i find docs for such attributes, which are not specified by tomcat, but added by eclipse?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959
    
  19

Maciej Drodel wrote:you're not answering my question, maybe i didn't make myself clear.

eclipse adds the source attribute and it's not in tomcat's docs.
what is that attribute? where do i find docs for such attributes, which are not specified by tomcat, but added by eclipse?


This appears to be something contributed by the WTP plugin - which for the record, I don't like (I use the sysdeo plugin). Your best bet would be to lookup the docs on WTP.

On the other hand, I don't believe it's really worthwhile learning WPT's internal contributions to Tomcat config. They're totally useless anywhere but in WTP, and that especially means they're no good for production. And since one of the reasons I despise WTP so whole-heartedly is because it plays fast and loose with Tomcat configuration to begin with, you'll pardon me if I wouldn't consider these sort of extensions to have long-term viability.


Customer surveys are for companies who didn't pay proper attention to begin with.
Maciej Drozdzowski
Ranch Hand

Joined: Dec 30, 2009
Posts: 40

i googled a bit for that WTP stuff, but i found nothing.
i was just wondering what that meant.
and yes, i agree, only the tomcat attributes matter
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959
    
  19

I think it stands for something like "Web Toolkit Plugin". Most of the documentation is probably lurking somewhere on the eclipse.org website and you'll probably have to squirrel-search for it, since I don't recall the eclipse.org search engine as posing any serious threat to Google.
 
 
subject: tomcat configuration in eclipse - context element in server.xml
 
Similar Threads
Can't deploy using Tomcat Manager if Conext is in server.xml?
EclipseIDE 3.6 + Tomcat 5.5 exception
Configuring webapp to use subdirectories
Problem with new web-app
Name java:jdbc is not bound in this Context