0

I am using ubuntu with packaged tomcate7 . I used .war file to upload the website. the web is working fine.

This is not my website but its there:

:/var/lib/tomcat7/webapps/ROOT$ ls
index.html  META-INF

I find my site files (those in .war) at

/var/cache/tomcat7/Catalina/localhost/_/org/apache/jsp/

/var/cache/tomcat7/Catalina/localhost/_/WEB-INF/classes/

I do not find any of my .css or .js files with a system wide search like find / -name '*.css' -ls

  1. where are they?!

  2. Is there an easy way to just give tomcat the .class files or delete the .jsp .java files (for example if I don't want to give the real source but only .class) JSP precompilation. During build-time some tool (jspc) is difficult. any easy walk through?

kevin
  • 328
  • 4
  • 15
  • 33

1 Answers1

0

The WAR file is likely "somewhere" on the server, but tomcat may have been configured to not "explode" the WAR files on deploy, and simply serve the resources directly out of the WAR. That may be why your web site "works" but you can not find the actual .css files, the .css files are not there on the file system but still contained in the WAR.

As for #2, pre-compiling JSPs, for some reason this is still a "jump through flaming hoops" process that is only semi-automated.

Pre-compiling JSPs before deployment entails the converting of the JSP file to a Java source file, compiling that file, and then mapping that resulting class as a servlet in the final web app, and then finally removing the JSP file from the web app.

There is a Tomcat Page that discusses the process, but only offers part of the solution (from an automation stand point).

Of course, one reason pre-compiling is not popular is that pre-compiled JSPs are not portable across containers, nor necessarily versions of the same container. So, that's a notable issue.

Will Hartung
  • 115,893
  • 19
  • 128
  • 203
  • nice answer and accepted with thanks. this http://stackoverflow.com/questions/497830/how-can-i-make-tomcat-pre-compile-jsps-on-startup answers and comprhends most of what I asked and what you stated. – kevin Feb 19 '13 at 19:03