File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Javascript in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Javascript in jsp" Watch "Javascript in jsp" New topic
Author

Javascript in jsp

Deepanjali Reddy
Greenhorn

Joined: Jan 23, 2011
Posts: 6
Hi,

If a jsp has javascript code embedded in it, What happens to the javascript code at the time of tranformation of that jsp into servlet?

I mean when the jsp gets converted into a servlet, how the javascript code managed?

Thanks.
Deepa.


Thanks
Deepa
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Deepanjali Reddy wrote:I mean when the jsp gets converted into a servlet, how the javascript code managed?

It doesn't get managed in any special way. It's just template text like everything else that's not JSP mechanisms. The JSP engine could care less that it's JavaScript.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Deepanjali Reddy
Greenhorn

Joined: Jan 23, 2011
Posts: 6
Thanks Bear Bibeault.

I understood that The javascript code won't be a part of the servlet.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Of course it will be. But it will just be template text.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Javascript in jsp
 
Similar Threads
class via a call button?
ace
using javascripts in servlet?
ServletOutputStream is not working?
calling javascript function through onclick present on checkbox