try this code
<% print(out); %>
<%! public void print(JspWriter newout){
try{
newout.println("hello world");
}catch(Exception e){}
} %>
cheers,
ravi
Wayne Lian wrote:
> > you need to pass 'out' as a parameter to the method
> >
>
> what is the type of this 'out'? Just know it's from interface of JSPWriter.
>
> > -----Original Message-----
> > From: Wayne Lian [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 05, 2001 8:59 PM
> > To: [EMAIL PROTECTED]
> > Subject: problem in using out.println in method
> >
> >
> > Hi,
> > I had declared a public method in a JSP page and that method only
> > do "out.println("Testing");", but when i call that method, i got the
> > error
> > message saying that out is undefined or not declared...
> > Can anyone please help me? Thanks.
>
> regards,
> Wayne
>
> -------------------------------------------------
> Everyone should have http://www.freedom2surf.net/
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets