Hi,
    Also, if you remember that all JSP's are turned into servlets then you can make
use of the Declaration tags to create a method (other than the doxxxx() methods) in
the servlet.
eg

<%! String shout() { return("HELP!!"); } %>

then anywhere in your page you can use shout() eg
    <% out.println(shout()); %>

Karl


Suresh Kumar Nittala wrote:

> I think this answer might help you. Please try it out.
>
> You call your function or anything either a .jsp page or a .txt etc. by including
> it in the jsp page or calling page.
> <%@ include file = "date.jsp"%>  date.jsp is an example.
>
> Regards,
> Suresh Kumar
>
> "Wen B. Sun" wrote:
>
> > Hi,
> >
> > In my JSP, I have a combination of scriptlet and html code that I want
> > to call in different places.  I don't want to copy and paste the same
> > code all over the place to clutter my code.  Is there a way to define a
> > function in JSP to contain this combination of scriptlet and html code?
> > That way, I can just call this function in my JSP and avoid this messy
> > copy and pasting.
> >
> > Thanks in advance.
> >
> > -Wen B. Sun
> >
> > ===========================================================================
> > 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
>
> --
> >From the Desk of Suresh Kumar Nittala
>
> N. Suresh Kumar
> Software Engineer
> VisualSoft (India) Limited.
> 1271, Road No.1, Jubilee Hills
> Hyderabad - 500 033
>
> Telephone: +91-40-3545671/3546714/3544545
> Fax      : +91-40-3607637
>
> Email: [EMAIL PROTECTED]
>        [EMAIL PROTECTED]
>        http://www.visualsoft-india.com
>
> ===========================================================================
> 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

===========================================================================
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

Reply via email to