Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: JSP at run time

  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Posts
    179
    Thanks
    17
    Thanked 0 Times in 0 Posts

    JSP at run time

    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

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Quote Originally Posted by otnj2ee View Post
    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
    Quote Originally Posted by otnj2ee View Post
    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
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •