aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes The way from JSP page to .class file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "The way from JSP page to .class file" Watch "The way from JSP page to .class file" New topic

The way from JSP page to .class file

Peter Braun
Ranch Hand

Joined: Feb 09, 2005
Posts: 57

While I had been reading about Lifecycle of JSP a question came to my mind: How can the Container compile a .java class translated from .jsp?
The Java API doesn't support compilation, does it? Does it call the javac complier in a shell?

I know it's not important, I'm just curious.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39547
Yes, it uses the same classes that make up the core of javac. They can be used directly if one knows the API. They're somewhere in the com.sun.* hierarchy, so you shouldn't be using them, of course (although they work just fine). If you look through the jar files that make up Tomcat, you'll find them.

Ping & DNS - updated with new look and Ping home screen widget
It is sorta covered in the JavaRanch Style Guide.
subject: The way from JSP page to .class file
Similar Threads
Is this thread dump indicating tomcat is low on memory?
I have a dll that I wan to load in jsp
Setting an HTTP header from within a jsp
repetedly calling a servlet from another servlet
where are the equivalent .java and .class file are stored ?