File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat: No Java compiler was found

 
blackcarlos Dibia
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Tomcat forum with appropriate subject change.
 
blackcarlos Dibia
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pls I am kind of confused, I'm using J2EE 1.4 and not a tomcat server!
I have been using the deploytool and it works fine for servlets but I got this error when trying to deploy this jsp pls I would love to get a more relevant response
pls I need the help to move on since I'm new to jsp technology
would greatly appreciate it
blackcarlos
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Tomcat is the reference server that comes with J2EE, so you might actually be using it. Try to find the directories mentioned, and see if the file in question is where the message says it should be.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're new to JSP, you might have an easier time if you just download and install an instance of Tomcat.
Most of the books and tutorials I've seen use it to run their examples.

With Tomcat, you don't need j2ee. It ships with the components it needs.
Just having a j2se is sufficient.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic