Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

foobar/work accessible to everybody ?!

 
Mike Riker
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, not sure is this Tomcat or Eclipse issue, but anyway ...

When I create new Tomcat project (sysdeo plugin) with Eclipse, it creates <projectame>/WEB-INF and <projectname>/work directories.

Ok, WEB-INF is for sources and classes and work directory is for temp stuff (e.g. jsp's compiled to servlets), right ?

When I deploy my application, the work directory is accessible via browser to everybody (?!)

Is this a chmod issue, or should the stuff in work directory be placed in WEB-INF or what's going on ?

Thanks,

- Mike
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
Anything you don't want the users to see goes in WEB-INF.

I'm moving this to servlets as it isn't IDE specific.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the WEB-INF directory directly under the "work" directory?
If so, yes, that's the directory that the browsers can see.
 
Mike Riker
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Is the WEB-INF directory directly under the "work" directory?
If so, yes, that's the directory that the browsers can see.


(Still having a strange feeling that this thread was moved to wrong place)

The directory structure that eclipse now creates is:

--

someapp/WEB-INF
someapp/work

--

Is this thing somekind of sysdeo-plugin configuration issue or why on earth it would expose work directory with all the sources by default to everyone...

- Mike
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what Eclipse is doing with the work directory but in a standalone instance of Tomcat (or any other spec compliant container) the 'someApp' directory would be where you put your jsp, html, css, etc...
People would also be able to see the "work" directory but they would have to include "someApp/work" in the url.

If you have a standalone instance of Tomcat on your machine, you can grab any of the war files from http://simple.souther.us, drop them in your {tomcat_home}/webapps directory, and see what the proper directory structure should be for a servlet app.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64856
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the stand-alone version of Tomcat, the work folder is created under $CATALINA_HOME and is not accessible via the browser. Eclipse must be doing something hinky with its internal Tomcat setup.

So this is IDE-specific and should be moved back to the forum where Eclipse is discussed.

P.S. Other servers such as Resin create the work folder in the web app hiearchy, but it's placed under WEB-INF where it is not browser accessible.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic