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

Reply via email to