Dear all,
I am trying to define a function that print out somethng to the screen. The
following is my code which always generate an error message when the JSP
Server try to translate it. Is it not possible to put print() statement in
the <%! %> declaration section?
/****** CODE *****/
<HTML>
<BODY>
<%!
public void printHello(){
out.print("Hello World");
}
%>
<%
printHello();
%>
</BODY>
</HTML>
/***** ERROR MESSAGE *****/
javax.servlet.ServletException: Compilation error occured:
Found 1 errors in JSP file:
C:\\Program Files\\Allaire\\JRun\\servers\\default\\bus\\test_func.jsp:5:
Error: "out" is either a misplaced package name or a non-existent entity.
Anthony Mak
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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
- Re: Declaring a function? Anthony Mak
- Re: Declaring a function? Sachin S. Khanna
- Re: Declaring a function? Anthony Mak
- Re: Declaring a function? Marin Velikov
- Re: Declaring a function? Clemente Dani
