|
||||||||
|
How to use Eclipse to create Web Application to Deploy to GlassFish
This assumes you have installed latest Eclipse Java EE and GlassFish pluggin
1) File->New->Dyanmic Web Project OR File->New->Other->Web->Dyanmic Web Project
2 - A) If you have not setup the GlassFish RunTime Environment, do it nowTHIS ASSUMES you have already installed the GlassFish Pluggin for EclipseSelect the appropriate version of Oracle GlassFish (See instructor for current version OR BETTTER YET log on to GlassFish you have access to and 2.11) In gui on left you will enter in ProjectName and its location 22.2 ) You will select a Target Run Time --- you can create one here if you don't have one...but, It should be your WebApp server type (i.e. here GlassFish 4)
3) Select the GlassFish Target Runtime Previous Setup (see Server Setup at bottom of this page and number 2A above)
<<<<<NOW HIT FINISH
4) Now you are ready to create your codesee below the project directory structure created and the autogenerated index.jsp files ---
4) Run: right click on project folder ->RunAs->Run on Server
You may be asked what server ---choose the one you want (HERE we have a choice of a local GlassFish and a remote GlassFish on the puzzle.sci server)
What happens --- see the Server Console Window where it says the Server is started and running (see Servers Window)
You will also notice that a window is popped up in Eclipse that shows the results of the main URL of the WebApp -- as we have an index.jsp this is what we see. Otherwise you would see nothing and need to specify furhter the pather to some servlet or other jsp after the main URL |
||||||||
| © Lynne Grewe |