Can out.println be used in JSP? I got the following error:
I have googled that out.println cannot be used in a method declaration, which is what i've done. So what do i do from there?
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\build\generated\src\org\apache\jsp\menu_005ftest_jsp.java:39: cannot find symbol
symbol : variable out
location: class org.apache.jsp.menu_005ftest_jsp
out.println("<li><a href=" + strMenuLink + ">" + strMenuName + "</a>");
^
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\build\generated\src\org\apache\jsp\menu_005ftest_jsp.java:40: cannot find symbol
symbol : variable out
location: class org.apache.jsp.menu_005ftest_jsp
out.println("<ul>");
^
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\build\generated\src\org\apache\jsp\menu_005ftest_jsp.java:42: cannot find symbol
symbol : variable out
location: class org.apache.jsp.menu_005ftest_jsp
out.println("</ul>");
^
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\build\generated\src\org\apache\jsp\menu_005ftest_jsp.java:44: cannot find symbol
symbol : variable out
location: class org.apache.jsp.menu_005ftest_jsp
out.println("<li><a href=" + strMenuLink + ">" + strMenuName + "</a></li>");
^
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\build\generated\src\org\apache\jsp\menu_005ftest_jsp.java:113: out is already defined in _jspService(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
PrintWriter out = response.getWriter();
^
5 errors
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\nbproject\build-impl.xml:364: The following error occurred while executing this line:
C:\Documents and Settings\USER\Desktop\FOS_Menu\FOS_Menu\nbproject\build-impl.xml:149: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
At first i didnt declare a PrintWriter but then after i first got the error, i just threw it in. But it seems that even that part has an error too. Thanks.