> Hi,
> Does everything inside the <% %> tags goes into the _jspService( )method
???
> if not, how can we diffrentiate code(when writing JSP code) that goes
into the
> _jspService( )method and outside the method(say I want to write another
> function abc())
> Thanks
> Sri
>
You can't write additional functions in the normal way, because as you
rightly said, the entire JSP script is inserted into _jspService(), and you
can't have nested functions in Java.
You can get round this by including the function inside <script> tags, e.g.
<script runat="server">
void myFunc( PrintWriter out)
{
out.println("HelloWorld!");
}
</script>
You can then call myFunc() from the rest of your script. Remember than the
built-in objects are not available in the function unless you pass them as
parameters.
Hope this helps,
John Wheeler.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html