As a testament to the search capabilities of the forums, I was having severe problems trying to figure out why my jsp page kept coming up with errors when I introduced beans (first time doing a jsp/bean tutorial). Found this, and works like a charm. Thanks for the question and the answer, previous problem solvers
Hi all, I created a bean compile it on c:\java directory and then I placed my java file and class file in TOMCAT-HOME\webapps\examples\WEB-INF\classes When I tried to acces my form and hit the submit button I got Internal server error as follows. type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in the jsp file: /SaveName.jsp
Hi, I wrote a java bean and tried to call it from a jsp page.i placed the class and file in tomcat\webapps\examples\WEB_INF\classes\ when i submit the jsp page, it displays an internal server error. org.apache.jasper.jasperException:unable to compile the class for JSP waiting for response.....
More than likely you are defining your useBean JSP tag incorrectly. Try defining it like this... <!-- declares bean. retrieves from session and is referenced by "bryce" --> <jsp:useBean id="referenceName" scope="session" class="class.where.bean.located" /> <%= reference.getXXX() %> Hope this helps, Ryan
SCJP 1.4, SCWCD
Java: The power, elegance, and simplicity of a hand grenade
beans has to be packaged, if u don't container might treat it as a part of its own package and u get errors; so have package declarations in your beans classes: ie package com.etc; then compile it to /WEB-INF/classes/com/etc hope this would solve the problem. [ February 28, 2002: Message edited by: ersin eser ]