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

How do you delete a cookie within a jsp?

670


What are the literals used in jsp?

672


What is called jsp directive?

591


Can a jsp page instantiate a serialized bean?

641


Can we write java code in jsp?

618






Give a sample jsp configuration in the deployment descriptor.

582


How many types of jsp tags are there?

561


What is dynamic web project?

587


Explain lifecycle methods.

660


What is client scripting?

553


What is jsp application?

569


Why is jsp used?

573


How many tags are there in jsp?

555


What are the components that make up a tag library in jsp?

529


What is difference between include directive and jsp:include action?

563