...

View Full Version : JSP at run time



otnj2ee
01-15-2008, 10:07 PM
It is said, during the run time, the JSP is converted to a Java servlet. My questions are:

1) Will all the content on the JSP page be converted into the java servlet class including <html related, scriptlet <% %>, javascript, tags etc?

2) If not, what about the javascript? Will it be converted into java scriptlet or, instead, it will be compiled and run by the javascript's engine?


Thanks


Scott

shyam
01-16-2008, 12:02 PM
1) Will all the content on the JSP page be converted into the java servlet class including <html related, scriptlet <% %>, javascript, tags etc?

all html and javascript content will become out.println's. scriptlets <% %>, <%! %> and <%= %> will become the servlets java code

2) If not, what about the javascript? Will it be converted into java scriptlet or, instead, it will be compiled and run by the javascript's engine?
javascript will be ignored by the jsp engine and will run only on the browser....there are however some frameworks like the bsf that sometimes execute javascript on the server but that is using a javascript runtime implemented in java



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum