How does the Jsp Expressions works ? What happens at the
back?

Answer Posted / nowsheen tariq

jsp expressions is a normal java expression , when we write
the jsp expression in our jsp page like
<%=some expression%> then in the servlet ie generated by
jsp compiler the jsp expression will be placed without" "
in out.printmethod.

for example :

<%
int i=10,j=20,k=30;%>
k----> <%=k%>

in the servlet equivalent to above jsp page

out.print("k---->");
out.print(k);


like that at the back the jsp expression will be placed in
the out.print()without " " so that the value of the
expresssion will be evaluated and printed.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is translation phase?

577


What is jsp net?

520


What is jsp servlet?

498


Why use of scripting elements in jsp is discouraged?

549


How to find out the name of the http method using jsp el?

536






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.

2086


What are the two kinds of comments in jsp and what's the difference between them ?

541


What is session scope?

509


Why is it not recommended to use script elements in jsp?

483


Differentiate between include directive and include action.

505


How to disable session in jsp?

528


How does response sendredirect work?

508


List the various action tags used in jsp.

505


Explain the action.

539


What is jsp and how it works?

499