Solved

Eclipse and TOMCAT

Posted on 2006-06-14
11
708 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
Comment Utility
>>Perhaps JAVA_HOME does not point to the JDK

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

Author Comment

by:irodov
Comment Utility
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
Comment Utility
If it's not there you need to create it. It should point to the installation directory of a JDK
0
 

Author Comment

by:irodov
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:irodov
Comment Utility
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
Comment Utility
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
Comment Utility
Post the directory structure of your webapp on this forum, maybe there is a problem there.
0
 
LVL 30

Assisted Solution

by:mayankeagle
mayankeagle earned 45 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now