Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Chuan Shao

Greenhorn
+ Follow
since Aug 12, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chuan Shao

tushar panda wrote:one more thing :
does WEB-INF store only servlet files and nothing else



Information from the Java Servlet Specification 2.4:
---

The contents of the WEB-INF directory are:
• The /WEB-INF/web.xml deployment descriptor.
• The /WEB-INF/classes/ directory for servlet and utility classes. The classes
in this directory must be available to the application class loader.
• The /WEB-INF/lib/*.jar area for Java ARchive files. These files contain servlets,
beans, and other utility classes useful to the Web application. The Web application
class loader must be able to load classes from any of these archive
files.
12 years ago

tushar panda wrote:
if i create new folder under webapps , does i have to create a new WEB-INF folder inside it , or i can still access the default ROOT's WEB-INF folder .



The answer is yes, if you create a new folder under webapps, you create a new web application, which needs its own deployment descriptor(web.xml) under its own WEB-INF directory.
12 years ago

tushar panda wrote:

Chuan Shao wrote:1. Don't put your images under /WEB-INF, otherwise, the browser cannot access the image directory through hyperlink.

2. If you print <img src='/servlet/tomcat.gif' /> on page, you are telling the browser to fetch /${YourWebAppRoot}/servlet/tomcat.gif



i cannot understand ${YourWebAppRoot} . does it mean ROOT folder or a folder in root folder .

thanks brother got it



yes, to make things easy, you can take ${YourWebAppRoot} as ROOT folder in tomcat.
12 years ago
1. Don't put your images under /WEB-INF, otherwise, the browser cannot access the image directory through hyperlink.

2. If you print <img src='/servlet/tomcat.gif' /> on page, you are telling the browser to fetch /${YourWebAppRoot}/servlet/tomcat.gif
12 years ago