Solved

Eclipse and TOMCAT

Posted on 2006-06-14
11
720 Views
Last Modified: 2013-11-24
Hi,

Just to learn and use in one of my project --  I am trying to configure eclipse with TOMCAT so that I can use this for creating websites ..
having issues

I am usint TOMCAT 5.0.30 AND Plugin Sysdeo v 3.1.0 ..eclipse 3.0  
I am some other projects in workspace as well..

everything seems to be working -- I am able to stop-start tomcat etc..

now I am trying to develop my project in this tomcat..

so I created a tomcat project in eclipse .. like selfWebSite..

and I created a small index.jsp page .. but when i say

http://localhost:8080/SelfWebsite/index.jsp

I get the below error:

Hi,

Just to learn and use in one of my project --  I am trying to configure eclipse with TOMCAT so that I can use this for creating websites ..
having issues

I am usint TOMCAT 5.0.30 AND Plugin Sysdeo v 3.1.0 ..eclipse 3.0  
I am some other projects in workspace as well..

everything seems to be working -- I am able to stop-start tomcat etc..

now I am trying to develop my project in this tomcat..

so I created a tomcat project in eclipse .. like selfWebSite..

and I created a small index.jsp page .. but when i say

http://localhost:8080/SelfWebsite/index.jsp

I get the below error:

Jun 14, 2006 2:26:42 PM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Javac exception
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
      at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
      at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929)
      at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
      at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Unknown Source)
Jun 14, 2006 2:26:42 PM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Env: Compile: javaFileName=/c:\xxx/SelfWebsite/work//org/apache/jsp\index_jsp.java
    classpath=/c:\xxx/SelfWebsite/WEB-INF/classes/;c:\xxx\SelfWebsite\work;/c:\xxx/SelfWebsite/WEB-INF/classes/;C:/TOMCAT/jakarta-tomcat-5.0.30/shared/classes/;C:/TOMCAT/jakarta-tomcat-5.0.30/common/classes/;C:/TOMCAT/jakarta-tomcat-5.0.30/common/endorsed/xercesImpl.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/endorsed/xml-apis.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/ant-launcher.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/ant.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/commons-collections-3.1.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/commons-dbcp-1.2.1.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/commons-el.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/commons-pool-1.2.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/jasper-compiler.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/jasper-runtime.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/jsp-api.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/naming-common.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/naming-factory.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/naming-java.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/naming-resources.jar;C:/TOMCAT/jakarta-tomcat-5.0.30/common/lib/servlet-api.jar;/C:/TOMCAT/jakarta-tomcat-5.0.30/bin/bootstrap.jar;/J:/Apps_pub/jre14280/lib/ext/dnsns.jar;/J:/Apps_pub/jre14280/lib/ext/ldapsec.jar;/J:/Apps_pub/jre14280/lib/ext/sunjce_provider.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\bin\bootstrap.jar
    cp=c:\xxx\SelfWebsite\WEB-INF\classes
    cp=c:\xxx\SelfWebsite\work
    cp=c:\xxx\SelfWebsite\WEB-INF\classes
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\shared\classes
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\classes
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\endorsed\xercesImpl.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\endorsed\xml-apis.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\ant-launcher.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\ant.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\commons-collections-3.1.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\commons-dbcp-1.2.1.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\commons-el.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\commons-pool-1.2.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\jasper-compiler.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\jasper-runtime.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\jsp-api.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\naming-common.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\naming-factory.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\naming-java.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\naming-resources.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\common\lib\servlet-api.jar
    cp=C:\TOMCAT\jakarta-tomcat-5.0.30\bin\bootstrap.jar
    cp=J:\Apps_pub\jre14280\lib\ext\dnsns.jar
    cp=J:\Apps_pub\jre14280\lib\ext\ldapsec.jar
    cp=J:\Apps_pub\jre14280\lib\ext\sunjce_provider.jar
    work dir=c:\xxx\SelfWebsite\work
    extension dir=J:\Apps_pub\jre14280\lib\ext
    srcDir=c:\xxx\SelfWebsite\work
   compilerTargetVM=1.3
   compilerSourceVM=1.3
    include=org/apache/jsp/index_jsp.java

Jun 14, 2006 2:26:42 PM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Error compiling file: /c:/xxx/SelfWebsite/work//org/apache/jsp\index_jsp.java     [javac] Compiling 1 source file


Please help



Also, if I understanding correctly..

basically my tomcat is in

c:\TOMCAT\jakarta-tomcat-5.0.30 directory

and I have mapped ECLIPSE TOMCAT to point to this home directory..

usually:

all the web application in tomcat goes under

jakarta-tomcat-5.0.30/webapps directory

But I don't see SelfWebsite being created in this directory when I created a tomcat project from eclipse... isn't this a problem??

please help me get this up and running!!!


thanks
0
Comment
Question by:irodov
11 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 45 total points
ID: 16905696
>>Perhaps JAVA_HOME does not point to the JDK

Well *does* it? It should do (not a JRE)
0
 

Author Comment

by:irodov
ID: 16906015
where is JAVA_HOME..

I checked in env variables.. user variable and system variable.. and did it at both places but still having this issue..

if I start tomcat from command prompt --and just create a SelfWebSite folder in webapps and put the same index.jsp in this, it works fine..

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16906038
If it's not there you need to create it. It should point to the installation directory of a JDK
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:irodov
ID: 16906725
i created JAVA_HOME at both places..

I think issue is with the way I am creating Eclipse Tomcat Project..

I created using

File-New-Project -- choose the Tomcat Project

Give a name

and in Project Contents I put the TOMCAT/jakarta directory..

C:\TOMCAT\jakarta-tomcat-5.0.30

now should I create a folder in webapps in tomcat folder?

I am not sure how to start a project..

0
 

Author Comment

by:irodov
ID: 16906847
ok, now even after I create a folder manually i am unable to hit it from the URL

basically I created in webapps

test
and inside test i have index.jsp

if i do

http://localhost:8080/test/index.jsp

i am getting

HTTP Status 404 - /test/index.jsp

type Status report

message /test/index.jsp

description The requested resource (/test/index.jsp) is not available.

looks like I have some basic issue
0
 
LVL 9

Assisted Solution

by:matthew016
matthew016 earned 45 total points
ID: 16907708
If u have your webapps in the Tomcat webapps directory,
be sure to start the server from Tomcat and not from Eclipse.
0
 
LVL 3

Expert Comment

by:runa_paathak
ID: 16909148
Post the directory structure of your webapp on this forum, maybe there is a problem there.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 45 total points
ID: 16910083
After creating JAVA_HOME, you might need to restart Eclipse and any open command windows if you are trying to run Tomcat from there.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question