File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Need Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

Need Help

Maneesh Chauahn
Ranch Hand

Joined: Mar 06, 2006
Posts: 48
Hi All,
I have a webapplication that contains the some html files and images. These html files and images are the part of the build. I would like to place
these html files and images outside the webapplication build.
Let supposer
C:\StaticResources ---> Contains the HTML files and Images
C:\usr\Tomcat\webapps\webapplication --> is the path of the webapplication

So can it possible that jsp which are presented in the web-application directly points to html files and images files. I know that
by using the Java File Stream i can access the same .

Is there any support in the servlet that can directly access the same

Maneesh Chauhan
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3381

I think it might be possible by using the APIs and by passing the absolute URI.

But then, it is better and suggestable for portability reasons (to avoid dependencies), to keep the static (html files and images) *as a part of the web application* (Inside WAR file).


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Duplicate of:

Maneesh Chauahn,
Please do not ask the same question multiple times.
Doing so creates confusion and makes people less likely to want to help you.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Need Help
It's not a secret anymore!