Can we write java code in jsp?



Can we write java code in jsp?..

Answer / Purnendu Kumar Shukla

Yes, Java code can be written in JSP using scriptlets (<% ... %>), expression language (<%= ... %>, <%# ... %>, or ${...}), and JavaScript functions (<script>). However, it's generally recommended to use managed beans with Java Code in a separate .java file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JSP Interview Questions

Mention the advantages of jsp over pure servlets?

1 Answers  


How can we create jsp custom tags?

1 Answers  


Can we use jstl in html?

1 Answers  


What is jsp? Explain

1 Answers  


mention the three important tags used in the development of jsp bean.

1 Answers  


What is the _jspservice() method?

1 Answers  


What is an expression language?

1 Answers  


how to extends one jsp page to another jsp page with realtime example?

3 Answers   CTS, Jamcracker,


What is the most needed for STRUTS ?

2 Answers   Trigent,


What is jsp tag?

1 Answers  


How can automatic creation of session be prevented in a jsp page?

1 Answers  


how to maintain sessions in jsp?can you tellme the methods.

16 Answers   IBM, Scope International, TCS,


Categories