JS

K

KK

HEllo Everyone,
i am creating a simple jsp and servlet application..i am using
J2EE1.4
application server.
When i am trying to run my JSP application i am encountered with the
following error:
I even copied the tools.jar file to the sun->j2ee1.4->lib folder but
no response.
----------------------
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that
prevented
it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
No Java compiler was found to compile the generated source for the
JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/
tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a
Tomcat
restart.
If using an alternate Java compiler, please check its installation
and
access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError
(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError
(ErrorDispatcher.java:348)
org.apache.jasper.compiler.Compiler.generateClass
(Compiler.java:424)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:
464)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:
448)
org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:551)
org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:
301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:
248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run
(SecurityUtil.java:
284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute
(SecurityUtil.java:
306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege
(SecurityUtil.java:200)
-------------------
my jsp bean code is as following :
-----
<%@ page import = "java.util.*" %>
<%! String username;
boolean check;
%>
<%
username = request.getParameter("uname");
%>
<jsp:useBean id="ob" class="MainCheck" />
<jsp:setProperty name="ob" property="userName" value="<
%=username
%>" />
<%
check = ob.check();
if(check)
{
%>
<h2>User Exists</h2>
<%
}
else
{
%>
<h2>User Doesnt Exists </h2>
<%
}
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top