File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

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

Regards,
Maneesh Chauhan
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

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).

HtH.


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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Duplicate of:
http://www.coderanch.com/t/364517/Servlets/java/context-xml-Help-Needed

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
 
 
subject: Need Help