This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60774
    
  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: 60774
    
  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?
calling javascript function through onclick present on checkbox
ServletOutputStream is not working?
using javascripts in servlet?
ace