aspose file tools*
The moose likes JSP and the fly likes Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed " Watch "Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed " New topic
Author

Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed

Krysty Sullivan
Ranch Hand

Joined: Jun 06, 2002
Posts: 48
After development, you package your web module into a war file and included it in an ear file.
test.ear
- test.war
After installation of the Enterprise Application into the server in WAS Admin console, the directory structure would be like this.
C:\
*WebSphere
*AppServer
*installedApps
*TEST.EAR
*META-INF
*TEST.WAR
*META-INF
*WEB-INF
*myDir
- master.xml
- page3.xsl
*myDir2
- mypage.jsp
Legend: * directory
- file
How will I access master.xml file in my JSP code by providing only the filename?
<%
String myFile = "C:/WebSphere/AppServer/installedApps/TEST.EAR/TEST.WAR/myDir/master.xml";
???
%>
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

application.getResourceAsStream("/WEB-INF/myDir/master.xm.xml");


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed