• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JSP compilation

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All!

During compilation of a JSP file, it will be first converted into a .java file then .class file after that it will be loaded by the container to serve request. I want to know where container put converted .java and .class file. will it be available after request has been fulfilled.

Thanks in advance!
 
author & internet detective
Posts: 40747
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rajeev,
Which application server are you using? The location is server specific.

Also, some containers only store the Java file in memory or only produce it upon compilation error or leave this as a configurable option.
 
Rajeev roushan sharma
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Rajeev,
Which application server are you using? The location is server specific.

Also, some containers only store the Java file in memory or only produce it upon compilation error or leave this as a configurable option.



Thanks Jeannne for your quick response
I am using Tomcat 6.0.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a "work" directory that contains each app's intermediate files.
 
Rajeev roushan sharma
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:There's a "work" directory that contains each app's intermediate files.



Thanks :) I did not get any intermediate file under work folder. Is there any way to configure where to put compiled JSP's intermediate java and class file ?
 
Saloon Keeper
Posts: 24315
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rajeev roushan sharma wrote:

David Newton wrote:There's a "work" directory that contains each app's intermediate files.



Thanks :) I did not get any intermediate file under work folder. Is there any way to configure where to put compiled JSP's intermediate java and class file ?



Only in a general way. You can set the CATALINA_BASE environment variable, and that will retarget the parent directory for the work directory - as well as the temp directory (if not overridden), the logfiles, and the conf directory. On some operating systems, you can retarget the work directory itself via a filesystem link (which is occasionally useful if filesystem space is tight or you're based on read-only media).

You don't own the java or classfiles that come from JSPs and shouldn't be meddling with them in the course of ordinary application systems. It's fully within the rights of an appserver to discard the Java source entirely (or even bypass source generation) and to generate the classes directly into RAM without ever keeping permanent copies of the compiled JSPs anywhere in the filesystem. It's even possible that future Tomcat releases might choose to do so.

So unless your interest is academic or you plan to fork Tomcat and pay the expense of keeping the fork up to date as new Tomcat releases emerge, I recommend not worrying about it.
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rajeev roushan sharma wrote:

David Newton wrote:There's a "work" directory that contains each app's intermediate files.



Thanks :) I did not get any intermediate file under work folder. Is there any way to configure where to put compiled JSP's intermediate java and class file ?



http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Configuration

Make sure keepgenerated has not been set to false.

Try playing with scratchdir to use a different directory.
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic