I am changing over from Tomcat to jBoss-2.4.4_Tomcat-4.0.1
If I take my .war file from Tomcat and drop it into the jBoss deploy
directory, it works perfectly.
However, my .war includes the original .java files, and I want them
to be readable on the site to display the code I'm writing.
I do this by using a method that reads in the .java file based on its path:
private void readInFileAndOutputJsp() throws IOException {
String tomcatVersion = request.getParameter("vers");
String serverPath = "/usr/local/jakarta-tomcat-" +
tomcatVersion + "/webapps/";
String javaFilePath = "sitebuilder/WEB-INF/classes/";
String packagePath = "com/gaddzeit/applogic/";
String javaFileName = request.getParameter("filename");
FileReader packageDir = new
FileReader(serverPath+javaFilePath+packagePath+javaFileName);
BufferedReader readableFile = new BufferedReader(packageDir);
while(readableFile.ready()) {
out.println(readableFile.readLine());
}
}
I just want to change the serverPath to the jboss deploy directory.
But this will only work if the .war has unarchived itself.
Does jBoss unarchive war files? If not, is there a way to alter my
method to read the .java files directly out of the .war?
You can currently see how I've implemented this on my production
server (which is using Tomcat standalone) at:
http://www.gaddzeit.com:8080/sitebuilder/CodeReview?vers=4.0.2
David Gadd
--
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development