• Post Reply Bookmark Topic Watch Topic
  • New Topic

When jsp translates into servlets where does the Declaration part goes in the servlet  RSS feed

 
sandesh pawar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
One question is that ,when we write a jsp page,and at the time of the converted into servlet.Then declaration part of jsp also gets converted.My question is in which method does it gets translated.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Find the java files that your servlet container creates on the behalf of your JSP pages and you will find out a great deal of information on how your JSPs get constructed.
Under Tomcat, these files will be found in a hierarchy created at $TOMCAT_HOME/work.
 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sandesh...
Variables and methods present in Declaration tag in jsp are present as instance variables and methods in generated servlet.
Bonus point
Variables present in scriplet tag in jsp are present as local variables in generated servlet.
u can not declare mrthods in scriplets .. Try it out
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!