Can I use javascript on jsp page?



Can I use javascript on jsp page?..

Answer / Chandra Prakash

Yes, you can use JavaScript on a JSP page. JSP allows you to embed JavaScript code within scriptlets (<code><% ... %></code>), script fragments (<code><script type="text/javascript">...</script></code>), or using the <code><jsp:scriptlet>...</jsp:scriptlet></code> tag. However, it's often recommended to separate JavaScript code from JSP pages for better maintainability and performance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JSP Interview Questions

in jsf page i use two dropdown list.i.e state & district.if state dropdown is selected then & then district is enable.what should be my code.

1 Answers   Tech Mahindra,


Is jsp a front end?

1 Answers  


What is jsp net?

1 Answers  


What are jsp action tags?

1 Answers  


How does error handling occur with jstl?

1 Answers  


What is jsp and its architecture?

1 Answers  


What is difference between java and jsp?

1 Answers  


What is expression tag in jsp?

1 Answers  


How jsp is executed by web server?

1 Answers  


Which language is used to write servlets and jsp?

1 Answers  


How do you prevent the creation of a session in a jsp page and why? What is the difference between include directive & jsp:include action?

1 Answers  


What is the requirement of a tag library?

1 Answers  


Categories