Reputation: 15807
Please see the steps I have followed below:
1) Start the Glassfish server in Netbeans:
2) Run the Netbeans project, which successfully browses to: http://localhost:8080/CRUDWebAppSQL/StudentServlet I am able to use the application. 3) Close Netbeans, which stops Glassfish (in preparation for the next step)
Then I try this:
1) Run the following DOS commands:
cd C:\Program Files\glassfish-4.0\bin
sadmin start-domain domain1
2) Message received saying server has started. Browse to: http://localhost:4848/ and login. Make sure that CRUDWebAppSQL is listed as an app. 3) Browse to: http://localhost:8080/CRUDWebAppSQL/StudentServlet which display a Glassfish 404 error
Why does step three produce a Glassfish 404 error? Does it have something to do with this: Where does glassfish save your class/project after deployment on Windows?
Upvotes: 0
Views: 3032
Reputation: 99
Netbeans glassfirsh server combine with Felix platform.
Download GlassFish Server Open Source Edition.
Unzip it and goto bin folder in the unzipped folder.
double click asadmin.bat
type start-domain
in this command you can start glassfirsh server (you can find more command in google)
open browser and type http://localhost:8080/
click link as
go to the Administration Console.
it view "GlassFish Console".
in here you can deploy your web app.(Extension ".war" file)
Upvotes: 1
Reputation: 693
NetBeans is using a different mechanism to deploy your application to support hot deployment in comparison to a manual deployment.
To run the application without NetBeans first build the web application with e.g. with Maven mvn clean install
to get the *.war file.
Start the Glassfish application server and either deploy the war file through the web interface or with command line asadmin deploy war-name
By the way I would suggest to update NetBeans to the current 8.2 release and have a look at Payara, which is a patched drop-in replacement for Glassfish: http://www.payara.fish/downloads
Upvotes: 4