Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Web Application Setup(Setting up a webapp with WTP)
icon5.gif  Web Application Setup [message #771083] Mon, 26 December 2011 03:38 Go to next message
M M is currently offline M M
Messages: 3
Registered: December 2011
Junior Member
Hello, I started using WTP for Eclipse a few days ago, I developed my "Hello World" servlet, I run it inside the Eclipse environment and, untill then, everything worked fine.
Now I would like to test something a little bit more complex, I'm developing an application that uses the Apache Common Configurations library to read from an xml configuration file (it's just an example it could be anything else).
I found some problems and I didn't find any useful doc to solve them.

Inside the Java EE perspective, and starting from a Dynamic Web Project folder:

- Which is the proper location for the jars containing the Commons Configuration? That is: which is the proper location for libraries that are referenced in the code of the webapp?

- Which is the proper location for additional files used by the webapp (eg configuration files)?

Thanks in advance to everyone! Smile

[Updated on: Mon, 26 December 2011 03:44]

Report message to a moderator

Re: Web Application Setup [message #771551 is a reply to message #771083] Tue, 27 December 2011 10:40 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang Knauf
Messages: 63
Registered: July 2009
Member
Hi,

>
> - Which is the proper location for the jars containing the Commons
> Configuration? That is: which is the proper location for libraries that
> are referenced in the code of the webapp?

WEB-INF\lib
>
> - Which is the proper location for additional files used by the webapp
> (eg configuration files)?
>

probably those files should be hidden for any web page user (even not
reachable when typing the exact URL). So the suggested place is
"WEB-INF" (where other config files like "web.xml" are placed) or
"META-INF". In those directories, a user will receive an "access denied"
error when requesting those files.

Best regards

Wolfgang
Re: Web Application Setup [message #772287 is a reply to message #771551] Thu, 29 December 2011 07:32 Go to previous message
M M is currently offline M M
Messages: 3
Registered: December 2011
Junior Member
Hi Wolfgang, thank you very much!
I did exactly what you suggested and everything is working fine, most of all, each jar added to the WEB-INF\lib has been automatically included in Java Build Path > Libraries set, under the Web App Libraries category.

Here follows the procedure I followed (for anyone that may need the same help):
Inside the Project Exlporer pane (Java EE perspective) open the WebContent folder and right click on the WEB-INF\lib folder, then choose the Import... option and, when the import window appears, choose the File System type. Then select the jars you want to import, click the Finish button and the work is done.

Thanks again to Wolfgang
Bye
Previous Topic:Axis, missing qualified name problem
Next Topic:Serving a web page with embedded applet
Goto Forum:
  


Current Time: Mon Jul 28 16:39:40 EDT 2014

Powered by FUDForum. Page generated in 0.01556 seconds