Microsoft
Software
Hardware
Network
Question : Tomcat Webapps Read File
I have a web application using JSP that usea a JavaBean using Tomcat server. The JavaBean must be able to read a file located in the webapps directory as readonly. When using new File( filename), it doesn't located the file immediately in the webapps directory.
How do I specifiy the filename so that new File will find the file in the webapps directory? Since the Javabean isn't a JSP/servlet, it's harder to do that.
Answer : Tomcat Webapps Read File
>String filePath = context.getRealPath("/File
.txt);
error
String filePath = context.getRealPath("/File
.txt");
Random Solutions
Equipment for home MPLS test lab?
How to reset the sametime password for a single user
Getting the Windows.MessageBox handle
How to store a path in EditBox1.Text via DialogBox control?
Windows Service crashing on one machine, not on the other
unable to scan with my HP Photosmart All-in-one printer
Thunderbird slow to download
PHP.ini file 'display_errors' is set to Off but errors still appear on page?
Can I install an external fibre channel tape drive onto a traditional non-fibre channel server by adding a fibre channel board in the server?
How do I add a Folder to Windows Installer without having to add each individual file