Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Frustration developing simple Dynamic Web App(My J2EE deployment doesn't behave like the ones in tutorials)
Frustration developing simple Dynamic Web App [message #1716438] Thu, 03 December 2015 20:04 Go to next message
Charles Fisher is currently offline Charles FisherFriend
Messages: 3
Registered: December 2015
Junior Member
I have just deployed a fresh new Mars Eclipse for J2EE IDE package. I tried to create a simple Dynamic Web Application with a single JSP and a single servlet. I have watched two separate reasonably good YouTube tutorials. Here are the two problems:

1) In the tutorials, when the developer creates a New -> Servlet, the appropriate lines are added to the web.xml file. When I do it they are not.

2) In the tutorials, they create an "index.jsp" JSP, and tweak it a little, and then they "Run on the Server" and it just runs. When I do it - and I have tried this with both the preview server and with a Tomcat 7 I installed - the servers themselves start, but they both give me the error,

HTTP ERROR 500

Problem accessing /SimpleWebApp/index.jsp. Reason:
JSP support not configured


The tutorials didn't do anything special to configure JSP support, but I am clearly missing something here. I have pored over the "Web Tools Project" help files in Eclipse and I can't find anything addressing this problem.

This makes me nostalgic for the old Error Code manuals you used to get with IBM mainframe products: if you could get an error code or error text, it was in the manual. Documentation these days seems a lot more hit or miss. Of course Eclipse is a volunteer organization, so if I find a gap I can voluteer to fill it, right?

TIA for any help.

Re: Frustration developing simple Dynamic Web App [message #1716595 is a reply to message #1716438] Sat, 05 December 2015 22:46 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

What happens in the current version, Mars.1?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Frustration developing simple Dynamic Web App [message #1716851 is a reply to message #1716595] Tue, 08 December 2015 14:56 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 12/5/2015 5:46 PM, Nitin Dahyabhai wrote:
> What happens in the current version, Mars.1?

I think the "JSP support not configured" is normal for the J2EE Preview
server. It is not normal and would not occur for a Tomcat 7 server.
What is the exact error you see with the Tomcat 7 server?

The fact that you didn't see you web.xml updated for the new servlet
implies your Dynamic Web project is using Servlet spec 3.0 or later and
the servlet is using annotations instead of entries in the web.xml.
This is the default behavior. You probably have already discovered this
by now.

Cheers,
Larry
Re: Frustration developing simple Dynamic Web App [message #1716902 is a reply to message #1716851] Tue, 08 December 2015 23:32 Go to previous messageGo to next message
Charles Fisher is currently offline Charles FisherFriend
Messages: 3
Registered: December 2015
Junior Member
I am using Mars.1

When you say "JSP support not configured" is normal for the preview server, does that mean the preview server is incapable of displaying JSPs, or that I need to configure it in some way to allow it to display JSPs?

I was using Tomcat 8, actually. Why Tomcat 7? I actually got Tomcat to display the initial "index.html" file in my SimpleWebApp once, but then it wouldn't handle my simple JSP or servlet. I actually am having problems even with Tomcat 8 standalone. I deployed the Sample App that is included with Tomcat, you're just supposed to drop the .war file into the webapps directory and Tomcat is supposed to deploy it and you run it, a very simple web application. Like my own: one index.html containing one image href and one link each to a simple JSP and simple servlet. I got the index.html page to display, but the image did not display and the links to the JSP and the servlet failed. Anyway, this is not an Eclipse problem. I am going to install a Tomcat 7, maybe it will be more trouble free.

Let's forget about Tomcat for now and concentrate on the Preview Server in Ecliplse Mars.1. When I ran the JSP I got the error messages already described on the screen, and the log messages below on the Eclipse server console:

-->
Starting preview server on port 8080

Modules:
SimpleWebApp (/SimpleWebApp)

2015-12-08 15:19:44.544:INFO::main: Logging initialized @215ms
2015-12-08 15:19:44.619:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2015-12-08 15:19:44.857:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /SimpleWebApp, did not find org.eclipse.jetty.jsp.JettyJspServlet
2015-12-08 15:19:44.885:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@12fad11{/SimpleWebApp,file:/C:/Users/cdf/java/eclipse4.5workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/SimpleWebApp/,AVAILABLE}{C:/Users/cdf/java/eclipse4.5workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/SimpleWebApp}
2015-12-08 15:19:44.945:INFO:oejs.ServerConnector:main: Started ServerConnector@ee68d8{HTTP/1.1}{0.0.0.0:8080}
2015-12-08 15:19:44.945:INFO:oejs.Server:main: Started @618ms
2015-12-08 15:20:03.642:INFO:/SimpleWebApp:qtp20735837-14: No JSP support. Check that JSP jars are in lib/jsp and that the JSP option has been specified to start.jar
-->

From this I conclude that the Preview Server is a Jetty server, and I am supposed to do some kind of configuration somewhere to get it to work. Start.jar? What jars am I supposed to put into lib/jsp? For that matter, am I supposed to put anything in lib?

Very confused, Eclipse documentation doesn't help.


Re: Frustration developing simple Dynamic Web App [message #1716994 is a reply to message #1716902] Wed, 09 December 2015 13:50 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 12/8/2015 6:32 PM, Charles Fisher wrote:
> I am using Mars.1
>
> When you say "JSP support not configured" is normal for the preview
> server, does that mean the preview server is incapable of displaying
> JSPs, or that I need to configure it in some way to allow it to display
> JSPs?
>
> I was using Tomcat 8, actually. Why Tomcat 7? I actually got Tomcat to
> display the initial "index.html" file in my SimpleWebApp once, but then
> it wouldn't handle my simple JSP or servlet. I actually am having
> problems even with Tomcat 8 standalone. I deployed the Sample App that
> is included with Tomcat, you're just supposed to drop the .war file into
> the webapps directory and Tomcat is supposed to deploy it and you run
> it, a very simple web application. Like my own: one index.html
> containing one image href and one link each to a simple JSP and simple
> servlet. I got the index.html page to display, but the image did not
> display and the links to the JSP and the servlet failed. Anyway, this
> is not an Eclipse problem. I am going to install a Tomcat 7, maybe it
> will be more trouble free.
>
> Let's forget about Tomcat for now and concentrate on the Preview Server
> in Ecliplse Mars.1. When I ran the JSP I got the error messages already
> described on the screen, and the log messages below on the Eclipse
> server console:
>
> -->
> Starting preview server on port 8080
>
> Modules:
> SimpleWebApp (/SimpleWebApp)
>
> 2015-12-08 15:19:44.544:INFO::main: Logging initialized @215ms
> 2015-12-08 15:19:44.619:INFO:oejs.Server:main: jetty-9.2.13.v20150730
> 2015-12-08 15:19:44.857:INFO:oejw.StandardDescriptorProcessor:main: NO
> JSP Support for /SimpleWebApp, did not find
> org.eclipse.jetty.jsp.JettyJspServlet
> 2015-12-08 15:19:44.885:INFO:oejsh.ContextHandler:main: Started
> mailto:o.e.j.w.WebAppContext@12fad11{/SimpleWebApp,file:/C:/Users/cdf/java/eclipse4.5workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/SimpleWebApp/,AVAILABLE}{C:/Users/cdf/java/eclipse4.5workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/SimpleWebApp}
>
> 2015-12-08 15:19:44.945:INFO:oejs.ServerConnector:main: Started
> ServerConnector@ee68d8{HTTP/1.1}{0.0.0.0:8080}
> 2015-12-08 15:19:44.945:INFO:oejs.Server:main: Started @618ms
> 2015-12-08 15:20:03.642:INFO:/SimpleWebApp:qtp20735837-14: No JSP
> support. Check that JSP jars are in lib/jsp and that the JSP option has
> been specified to start.jar
> -->
>
> From this I conclude that the Preview Server is a Jetty server, and I
> am supposed to do some kind of configuration somewhere to get it to
> work. Start.jar? What jars am I supposed to put into lib/jsp? For
> that matter, am I supposed to put anything in lib?
>
> Very confused, Eclipse documentation doesn't help.
>
>
>

I don't believe the J2EE Preview server supports JSP. In addition,
because it is "built in", there is very little you can do to configure
it beyond what projects are deployed to it. For example, I believe it
is hard coded to use port 8080 and no way to change it. You would be
better off using Tomcat, 7 or 8, as it does support JSP and is configurable.

You may benefit from going over the Tomcat FAQ[1]. The information is
old but still applicable to current Tomcats for what it covers.

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ
Re: Frustration developing simple Dynamic Web App [message #1718814 is a reply to message #1716994] Wed, 30 December 2015 16:39 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

On 12/9/2015 8:50 AM, Larry Isaacs wrote:
> I don't believe the J2EE Preview server supports JSP.

On the contrary, I'm able to run a JSP file within the J2EE Preview
Server in Luna SR1, as long as the workspace's default JRE is actually a
JDK.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Issue with Mars 1 and Web Service Explorer
Next Topic:Add Glassfish 4 Server on Eclipse Mars
Goto Forum:
  


Current Time: Fri Mar 29 10:51:49 GMT 2024

Powered by FUDForum. Page generated in 0.03957 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top