dcsimg
JavaScript
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, April 18, 2008 08:29 AM

Waht is the purpose of javascript in implementing of jsp's?

Re: JavaScript

Posted By:   Stephen_McConnell  
Posted On:   Monday, April 21, 2008 09:51 AM

Java Server Pages (JSP's) are code that executes on the server side. When you call a JSP from the browser, the browser sends a request to the server, the code executes and it returns HTML that is then rendered by the browser.


JavaScript is executed on in the browser on the Client Side. When JavaScript executes, there no need to go back the server. This can take a GREAT burden off the server.



  • One can do many things with JavaScript on the client side BEFORE you even have to go back to the server.

  • One can do preliminary validation of input fields.

  • One can react to user inputs and build HTML on the fly that will be rendered in your browser.

  • One can do animation on the client side.

  • One can modify which page you are submitting to based upon user input.

  • One can even use JavaScript to submit information to the browser and receive back information and build HTML on the fly based upon that information without having to render the entire page (this is what AJAX is about).


I used to feel I didn't need to use JavaScript and was a real snob about it. But now it's become a major tool in any web development I do.


Hope this helps.


Stephen McConnell

About | Sitemap | Contact