i am using Apache Tomcat Version 5.0.28 but it is not working well i have just typed a simple code and it is giving error .i am providing error and also code please giude me where is the problem , i am new to jsp please help me thanx.
.jsp file contains following code:
/code
<%@ page language="java" %>
<% String s1="",s2="";
s1=request.getParameter("T1");
s2=request.getParameter("T2");
%>
<%= s1 %>
<%= s2 %>
/code
and .html file contains
/code
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="50%">
<form method="POST" action="ja.jsp">
<!--webbot bot="SaveResults" U-File="file:///D:/Documents and Settings/WAQAR/My Documents/My Webs/_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><p> </p>
<p>username</p>
<p> </td>
<td width="50%"><input type="text" name="T1" size="20"></td>
</tr>
<tr>
<td width="50%">password</td>
<td width="50%"><input type="password" name="T2" size="20"></td>
</tr>
</table>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</body>
</form>
</html>
/code
and the following error is displayed by tomcat when i used to run it plz help me.
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.0.28