permaculture playing cards*
The moose likes JSP and the fly likes Can a  compiled JSP page be used in a servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Can a  compiled JSP page be used in a servlet?" Watch "Can a  compiled JSP page be used in a servlet?" New topic
Author

Can a compiled JSP page be used in a servlet?

vishwanath nadimpally
Ranch Hand

Joined: Jan 25, 2005
Posts: 116
I was looking through my tomcat's work\Catalina\localhost\ and found for each of the deployed context's jsp pages there are .java files and .class files. These are the compiled jsp pages that the jsp compiler creates during the jsp life cycle.

Now, just a thought, can we use these compiled jsp classes in any way, like instantiating a jsp's .java class inside a servlet or something. I don't know if this will serve any purpose or it will be good to any end, but just a thought and I would appriciate any comments on this.
[ October 19, 2006: Message edited by: vishwanath nadimpally ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

It would be a very bad idea.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can a compiled JSP page be used in a servlet?
 
Similar Threads
Unable to compile HelloWorldExample.java file in Tomcat 5.0.28
books
Method library
Editing compiled Java files
Debugging in Eclipse