• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat: No Java compiler was found

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the Tomcat forum with appropriate subject change.
 
blackcarlos Dibia
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic