This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes what will go in init() methord when JSP get compiled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "what will go in init() methord when JSP get compiled" Watch "what will go in init() methord when JSP get compiled" New topic
Author

what will go in init() methord when JSP get compiled

ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208
Hi

Like when i write in JSP

<jsp:scriptlet>
out.println("JAI SHRI RAM");
</jsp:scriptlet>

and when it is compiled into servlet then it will go under _jspService() methord.

I want to ask that from a JSP page what will go in init() methord.

Thanks
Regards
Gaurav
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

One way to find out is to look at the generated source code.
In Tomcat, you will find this under the tomcat/work directory.

Other servers will have it in a different place.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what will go in init() methord when JSP get compiled
 
It's not a secret anymore!