This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 8904

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


Groovy
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed
 
Similar Threads
My Webspere contains so many errors how to resolve it
bad major version at offset=6
Finding path location on server returning null
My Webspere contains so many errors how to resolve it
Error while defining class due to PARENT_FIRST class loader