pls ranchers I,m new to
jsp technology and having problems deploying this page
here is the code I'm using
J2EE 1.4
<%--Import the
Java packages --&>
<% @ page language="java"%>
<% @ page import="java.lang.*"%>
<html>
<font size=4 face="Verdana" color=#112244>
<body>
<%
String str =request.getParameter("r1");
String str1 =request.getParameter("t1");
String str2 =request.getParameter("t2");
String final_output="";
int num1=0;
int num2=0;
int num3=0;
num1 = Integer.parseInt(str1);
num2 = Integer.parseInt(str2);
if(str.equals("add")
{
num3=num1+num2;
final_output="Addition";
}
if(str.equals("sub")
{
num3=num1-num2;
final_output="Subtraction";
}
if(str.equals("div"))
{
num3=num1/num2;
final_output="Division";
}
if(str.equals("mul"))
{
num3=num1*num2;
final_output="Multiplication";
}
%>
<%-- Displaying the option selected --%>
The selected mathematical function by you is : <%=final_output%>
<br>
<%
Integer in=new Integer(num3);
out.println("The Result is " + in.toString());
%>
</body>
</html>
and here is the html file to access it
<html>
<body>
<h2>Mathematical Functions</h2>
<font size=4 face="Verdana" color=#112244>
<form method="post" action="Calculate.jsp">
<input type="radio" name="r1" value="add" checked="false">Addition
<br>
<input type="radio" name="r1" value="sub" checked="false">Subtraction
<br>
<input type="radio" name="r1" value="mul" checked="false">Multiplication
<br>
<br>
Enter two numbers:
<input type="text" name="t1" value="">
<input type="text" name="t2" value="">
<br>
<br>
<input type="Submit" name="b1">
</form>
</body>
</head>
</html>
after deployment I get this error from the server
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.
pls how can I sort it out
[ July 19, 2005: Message edited by: Bear Bibeault ]