Screencast #28: Simple Web Application using Eclipse and GlassFish v3 Prelude


GlassFish v3 Prelude is now available! Some of the cool features are:
  • Modularity using OSGi
  • Rapid deployment using retain session data across HTTP redeploys and deploy-on-save
  • Embeddability
  • Dynamic languages and frameworks
  • Faster start up time
  • Integrated NetBeans and Eclipse tooling
  • Comet and Cometd
This screencast shows how you can create a simple Web application using JSP and Servlets in Eclipse 3.4, deploy it directly on GlassFish v3, use rapid deployment, and debug the application.


The GlassFish plugin for Eclipse has many more features than demonstrated in this screencast and are explained here.

A complete list of GlassFish related screencasts is available here. Other screencasts published on this blog are available here.

Also see GlassFish v3 running using Equinox, Rails and Merb applications using GlassFish Gem, and Embeddable GlassFish.

Submit your bugs Eclipse/GlassFish bugs here, talk to us using GlassFish Plugins Forum, and get the latest information on glassfishplugins.dev.java.net.

Technorati: screencast glassfish v3 eclipse jsp servlets deployonsave deployment
Comments:

jjjj

Posted by guest on December 02, 2008 at 04:45 AM PST #

Looks like its quite easy to learn and deploy web applications using the GlassFish v3 Prelude plug in. I am not a Java programmer but from what I have seen, I would'nt mind learning the language. Where can I get learning materials for a Java novice like me?

Posted by Timothy Mburu on December 03, 2008 at 12:24 PM PST #

Hi,

We have many resources available to you to learn Java programming. Please see:

The New to Java Programming Center:
http://java.sun.com/new2java/

The Java Tutorial:
http://java.sun.com/docs/books/tutorial/

And Sun Java Courses:
http://www.sun.com/training/catalog/java/index.xml

Enjoy the Java Journey!!!

Dana Nourie
Sun Microsystems

Posted by Dana Nourie on December 03, 2008 at 01:35 PM PST #

When I try to run this program, I did not get the default index.jsp from my eclipse. I created one index.jsp and added at WebContent folder. After that when I try to run the whole application on server I get this error :

INFO: Deployment of HelloGlass done is 328 ms
Dec 4, 2008 2:12:19 PM org.apache.catalina.core.StandardWrapperValve log
SEVERE: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: java.err.nojdk
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:89)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:375)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
at org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:195)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:361)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)

Note: I am using GlassFish Prelude server and I am using Eclispse ( 3.4 Gayneme ) version.

Posted by sreeprasad on December 03, 2008 at 04:46 PM PST #

Hi Dana,

It sounds like you're trying to use a JRE instead of a full JDK with your glassfish runtime, which is not supported. If you have further questions, please post them on users@glassfishplugins.dev.java.net.

Posted by Rochelle Raccah on December 04, 2008 at 05:17 AM PST #

very very good blog for saring thankss

Posted by çiçekçi on January 11, 2009 at 10:03 PM PST #

[Trackback] GlassFish Plugins team released ver 1.0.16 of Eclipse plugin for GlassFish. The team has maintained pretty good cadence in terms of adding features and fixing bugs in the plugin (16 releases in approx as many months). However this particular...

Posted by Arun Gupta's Blog on January 16, 2009 at 09:54 PM PST #

[Trackback] The Sun Tech Days Singapore started earlier this morning - over 1100 developers, an outstanding audience!!! The kick off had a good local flare when the Gods of Longevity, Fortune, and Prosperity (Fu Lu Shou) showed up to start the...

Posted by Arun Gupta's Blog on January 19, 2009 at 04:29 PM PST #

hımm. Mixed but good.. :S

Posted by sinema izle on March 07, 2009 at 07:24 AM PST #

[Trackback] EclipseCon started earlier today and we are announcing the availbility of GlassFish Tools Bundle for Eclipse. Eclipse and GlassFish in one single download bundle, available here. Here are simple steps to get you started ... Download the binary fo...

Posted by Arun Gupta's Blog on March 24, 2009 at 07:32 AM PDT #

[Trackback] EclipseCon started earlier today and we are announcing the availbility of GlassFish Tools Bundle for Eclipse. Eclipse and GlassFish in one single download bundle, available here. Here are simple steps to get you started ... Download the binary fo...

Posted by Arun Gupta's Blog on March 24, 2009 at 07:33 AM PDT #

[Trackback] I had an opportunity to be interviewed by Ian Skerrett at EclipseCon 2009, see the recording below (originally published): And here is a snapshot: And then you can always read about Day 3 and Day 2 summary of Eclipse...

Posted by Arun Gupta's Blog on March 26, 2009 at 11:07 PM PDT #

thanks

Posted by nikah şekeri on April 05, 2009 at 04:18 AM PDT #

[Trackback] The GlassFish Tools Bundle for Eclipse 1.0 is now available. An earlier blog entry explains how to get started using this bundle. If you used an earlier version (0.99.x) of this bundle, then an upgrade is not supported. However...

Posted by Arun Gupta's Blog on May 21, 2009 at 11:07 PM PDT #

[Trackback] What is an Eclipse Demo Camp ? The Eclipse DemoCamps are an opportunity to showcase all of the cool interesting technology being built by the Eclipse community. They are also an opportunity for you to meet Eclipse enthusiasts in...

Posted by Arun Gupta's Blog on June 16, 2009 at 10:26 AM PDT #

[Trackback] I, along with several other speakers, presented at Javali (an ancillary event of FISL) earlier today. The event was sponsored by Sun Microsystems. Many thanks to Sou Java and RS JUG for organizing the event and thanks to Serpro...

Posted by Arun Gupta's Blog on June 23, 2009 at 11:47 AM PDT #

[Trackback] I, along with several other speakers, presented at Javali (an ancillary event of FISL) earlier today. The event was sponsored by Sun Microsystems. Many thanks to Sou Java and RS JUG for organizing the event and thanks to Serpro...

Posted by Arun Gupta's Blog on June 25, 2009 at 02:34 PM PDT #

This is a nice post.I respect those people who always ready to share their knowledge.

Posted by Affordable Website Design on July 06, 2009 at 10:25 PM PDT #

[Trackback] A new version of GlassFish Tools Bundle for Eclipse (ver 1.1) was recently released. The build contains Eclipse 3.4.2 IDE with WTP Java EE support GlassFish v2.1 pre-registered and configured GlassFish v3 Prelude pre-registered and configured JavaDB s...

Posted by Arun Gupta's Blog on August 21, 2009 at 06:21 AM PDT #

thankıs

Posted by cicek on September 10, 2009 at 12:29 AM PDT #

Best wishes on your broader command, especially now that the Bear has come out of his cave. God Bless you!

Posted by rapidshare downloads on September 20, 2009 at 07:49 PM PDT #

thankıs

Posted by çiçekçi on November 17, 2009 at 04:28 AM PST #

Hi!

I had the same problem as Dana Nourie.

org.apache.jasper.JasperException: java.err.nojdk

Glashfish plugin was using the default JRE. with doesn't have all the necessary jar files.

I went to Menu bar the Window > Preferences > Java > Installed JREs.

And then I added the JRE from JDK install forder.

And it works!

Posted by Wladimir Tavares on December 06, 2009 at 02:48 PM PST #

Hi Arun
I had the similar problem but now its over
thanks!

Posted by Bay Area Web Design on January 25, 2010 at 05:12 PM PST #

Hi Arun,

What if I already have an Eclipse 3.5 and a "standalone" SGES V211patch14 installation on my laptop (WinXP) ?

Can I then download the Eclipse Glassfish plugin, and then add a server pointing the appserver directory to the directory of my standalone V211patch14 server ?

Or will the plugin only work with the appservers that come bundled with the plugin, or aren't any appservers bundles within the plugin ?

Please advice.

Thanks,
EDH

Posted by Edwin Dhondt on February 03, 2010 at 01:29 AM PST #

Hi Arun,

I've already got an Eclipse 3.5 installation as well as separate "standalone" SGES V211Patch02 installation on which I deploy things once in a while (not from within Eclipse).

What will happen when I download and install the Glassfish Eclipse plugin ?

Will I be able to add a server in Eclipse pointing the appserver directory to my standalone V211patch02 installation, or does the plugin only work with the bundled appservers (or doesn't the plugin come bundled with appservers) ?

Thanks,
EDH

Posted by Edwin Dhondt on February 03, 2010 at 01:33 AM PST #

EDH,

An existing Eclipse 3.5 installation can be easily configured to install the plugin and then connect with an externally installed App Server (v211patch02) in your case. This is all explained at:

http://blogs.sun.com/arungupta/entry/totd_115_glassfish_in_eclipse

Let me know if you need more guidance.

Posted by Arun Gupta on February 03, 2010 at 01:59 AM PST #

Thanks for the resources you provided.

Posted by çiçek siparişi on April 12, 2012 at 12:34 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today