Solved

Eclipse and TOMCAT

Posted on 2006-06-14
11
716 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
 

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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

929 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

20 Experts available now in Live!

Get 1:1 Help Now