Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 733
  • Last Modified:

Eclipse and TOMCAT

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
irodov
Asked:
irodov
3 Solutions
 
CEHJCommented:
>>Perhaps JAVA_HOME does not point to the JDK

Well *does* it? It should do (not a JRE)
0
 
irodovAuthor Commented:
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
 
CEHJCommented:
If it's not there you need to create it. It should point to the installation directory of a JDK
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
irodovAuthor Commented:
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
 
irodovAuthor Commented:
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
 
matthew016Commented:
If u have your webapps in the Tomcat webapps directory,
be sure to start the server from Tomcat and not from Eclipse.
0
 
runa_paathakCommented:
Post the directory structure of your webapp on this forum, maybe there is a problem there.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now