aspose file tools
The moose likes Tomcat and the fly likes Tomcat: No Java compiler was found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat: No Java compiler was found" Watch "Tomcat: No Java compiler was found" New topic

Tomcat: No Java compiler was found

blackcarlos Dibia

Joined: Mar 30, 2005
Posts: 21
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.*"%>
<font size=4 face="Verdana" color=#112244>
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);
<%-- Displaying the option selected --%>
The selected mathematical function by you is : <%=final_output%>
Integer in=new Integer(num3);
out.println("The Result is " + in.toString());
and here is the html file to access it
<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
<input type="radio" name="r1" value="sub" checked="false">Subtraction
<input type="radio" name="r1" value="mul" checked="false">Multiplication
Enter two numbers:
<input type="text" name="t1" value="">
<input type="text" name="t2" value="">
<input type="Submit" name="b1">
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

Joined: Jan 10, 2002
Posts: 62272

Moved to the Tomcat forum with appropriate subject change.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
blackcarlos Dibia

Joined: Mar 30, 2005
Posts: 21
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
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42954
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

Joined: Dec 11, 2004
Posts: 13410

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.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Tomcat: No Java compiler was found