Solved

Eclipse and TOMCAT

Posted on 2006-06-14
11
722 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SHA2 certs for IIS AND Java? 2 136
Desingning Refactoring existing code 2 46
jsp error 6 72
batch vs regular insert in spring DAO 2 52
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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

759 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