• Post Reply Bookmark Topic Watch Topic
  • New Topic

myfile_jsp.java and myfile_jsp.class files?  RSS feed

 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am in the process of deploying my web-app and whilst working with my (new) web-host to do this I have noticed files such as "myfile_jsp.java" and "myfile_jsp.class" which are in totally separate part of my hosting package (ie, not in ROOT/mywebapp - they are much higher than this in a separate branch of my main hosting package).

It seems that these files have 'somehow' been automatically generated on the server (not sure how yet - I' trying to find this out too. ) but more importantly, I was just wondering what these files actually are and where they have come from?

My guess is that they are something that Tomcat has done once I have uploaded my web-app which is to compile the JSP files I have, and effectively put them into a .java and .class files so they are faster to access.

I have not come across these types of files in my Java learning curve over the past 12 months at all - can anyone point me in the right direction for some further learning on this as I am interested

Thanks
Michael
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are the generated files from the JSP translation. Their details are container-specific.
 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How or when does JSP Translation occur and is there a way to invoke this within Tomcat?

Just had a look around for some information on this topic although couldn't find anything specific.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally the first time that the JSP is referenced. For a more detailed run-down, read this article.

I believe Tomcat used to have a pre-compiler. May still. I've never found it useful, personally.
 
Suhas Mandrawadkar
Ranch Hand
Posts: 72
Android Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Micheal,

If you are really interested why not pick up HF JSP & Servlets
Very nicely explained what happens and how it happens in the book and its fun to read too.

myfile.jsp -> myfile_jsp.java -> myfile_jsp.class

Hint: A JSP is nothing but a servlet ;-)
 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the article, ill have a good read over that.

As for HF Servlets & JSP - already got that and read most of it. Must have either skim read the section on that or not got to it yet ha ha. And yes, it is a good book and very easy to read

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!