Wat is the difference between and in jsp..wen translate into servlet..wer it is stored in servlet..can we create global variables in jsp..if yes then how??

Showing Answers 1 - 1 of 1 Answers

shiv shankar

  • Nov 24th, 2005
 

1) <% ! int i %> means the decleration in jsp where it will translated into the instance variable in the servlet where as <% int i %> means the scriptlet in the jsp where as in servlet it will translated into local varibles that is what ever u are going to write in the scriptlet it will goes into the service method of the translated servlet.globle variables simplest way is probably to put the value in the application scope...<%! application.setAttribute("something", "value");String value = (String)application.getAttribute("something");%>

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions