• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do JSP need a java complier?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just read in Ed Roman's book that JSP don't need java complier?
Does he mean JSP shouldn't be complied and hence they don't need a java complier. But I guess when you run a JSP program from a browser you do need and java plug-in in the browser, don't you??
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JavaServer Page is like an HTML page with interspersed Java code. The JSP engine (or container) translates the JSP to a Java source code file and then needs a compiler to compile to a Java class. The class then executes and produces output that combines the HTML markup with Java output.
So - JSP requires a compiler on the server. On the browser end the only way to tell that JSP was involved is the .jsp file type. As far as the browser is concerned it is showing HTML.
Once the class has been compiled and loaded, it continues to run just like a servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic