3 Replies - 5147 Views - Last Post: 03 July 2012 - 02:34 AM

#1 Paci  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 18-January 12

Mozilla firefox running html but not my .jsp creations

Posted 02 July 2012 - 02:35 AM

Hey guys (Hope this is the right forum)

I am having problems getting my JSP's to run on my browser. Using the simple Hello.jsp and Hello.html programs that I am using as examples below.

I am using texpad version 4.7.3 and I am running Apache Tomcat 5.5 Tomcat5.

Environment Variables:

My CLASSPATH: .C:\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar;C:\Servlets+JSP

PATH: %JAVA_HOME%;%PATH%

My JAVA_HOME: C:\Program Files\Java\jdk1.7.0_05

The following is my tomcat java properties:

Java virtual machine: C:\Program Files\Java\jre6\bin\client\jvm.dll
Java classpath: C:\Apache Software Foundation\Tomcat 5.5\bin\bootstrap.jar;C:\Apache Software Foundation\Tomcat 5.5\bin\tomcat-juli.jar

I have jre7 installed and my latest jdk is jdk1.7.0_05, previous versions jre1.5.0_02, jre6 and jdk1.5.0_02 are still installed, do i delete these?


Hello.jsp + Hello.html is contained within my root folder: C:\Apache Software Foundation\Tomcat 5.5\webapps\ROOT

Hello.html which does run

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- 
Simple HTML file to test server setup and configuration. 
   
Taken from Core Servlets and JavaServer Pages 2nd Edition
from Prentice Hall and Sun Microsystems Press,
http://www.coreservlets.com/.
(C) 2003 Marty Hall; may be freely used or adapted.
-->
<HTML>
<HEAD><TITLE>HTML Test</TITLE></HEAD>
<BODY BGCOLOR="#FDF5E6">
<H1>HTML Test</H1>
Hello.
</BODY></HTML>


Hello.jsp which will not run

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- 
Simple JSP file to test server setup and configuration. 
   
Taken from Core Servlets and JavaServer Pages 2nd Edition
from Prentice Hall and Sun Microsystems Press,
http://www.coreservlets.com/.
(C) 2003 Marty Hall; may be freely used or adapted.
-->
<HTML>
<HEAD><TITLE>JSP Test</TITLE></HEAD>
<BODY BGCOLOR="#FDF5E6">
<H1>JSP Test</H1>
Time: <%= new java.util.Date() %>
</BODY></HTML>


This is the error I recieve when i run http://localhost/Hello.jsp

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/IProblem;
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/IProblem;
org.apache.jasper.compiler.JDTCompiler$2.acceptResult(JDTCompiler.java:345)
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:478)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:404)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Something to do with eclipse there? I do not know what to do,please help :helpsmilie:

Is This A Good Question/Topic? 0
  • +

Replies To: Mozilla firefox running html but not my .jsp creations

#2 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1148
  • View blog
  • Posts: 2,522
  • Joined: 05-May 05

Re: Mozilla firefox running html but not my .jsp creations

Posted 02 July 2012 - 12:33 PM

Tomcat runs on port 8080 by default. Try this:

http://localhost:8080/Hello.jsp
Was This Post Helpful? 0
  • +
  • -

#3 Paci  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 18-January 12

Re: Mozilla firefox running html but not my .jsp creations

Posted 03 July 2012 - 12:06 AM

Hi I am using a version of Tomcat that is configured to use to port 80 from http://www.coreservl...#Enable-Invoker

All html files run without using 8080.
I did try your method though but it yielded the same results.

I am really having nightmares here, this is is to get to my final part of my course.. :dontgetit:

If it makes any difference, I am running windows 7 home addition(yeah i know, not the best) on my work pc and I run everything as administrator.

Something wrong with my java set up maybe??? Only jsp files do not work.

Spent hours on this. :whatsthat:
Was This Post Helpful? 0
  • +
  • -

#4 Paci  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 18-January 12

Re: Mozilla firefox running html but not my .jsp creations

Posted 03 July 2012 - 02:34 AM

Problem solved, reinstalled Tomcat and all is well
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1