views:

1342

answers:

3

I haven't been around Java development for 8 years, but am starting to build a NetBeans Web Application. When I walk through the Web Application wizard, it asks for the server I'm going to be using.

What would be the best and simplest server for me to start using with NetBeans?

+3  A: 

Since the NetBeans IDE is a Sun product, I would assume that the Glassfish application server would be a natural fit.

That said, one of the pluses of developing a web application in Java is that the interface for working with the http is standardized (i.e. the Servlet specification), so that you can pick any servlet container you want: be it Glassfish, Tomcat, Jetty or Weblogic. Since it sounds to me that you're experimenting and you want to use something easy to administer, I might go with Glassfish. However, be open to revisit that decision when you need to actually deploy your web application in a production environment. Be sure to check out other options like Tomcat or Jetty.

Alan
I got the Glassfish plugin going with NetBeans, thanks for the insight.
Chris Sutton
A: 

Unless you are deploying to a full J2EE application server, I would recommend using Tomcat. Tomcat can run as a standalone web/servlet/jsp server and avoids some of the complexities of a full J2EE app server.

The web development bundle for Netbeans will include installers for and automated integration with Glassfish and Tomcat. You will get the "best" experience using Netbeans with those servers.

That said, the workflow in Netbeans can be easily integrated with other application servers. As of 6.1, this includes Sun Java System Application Server 8 and 9, GlassFish v1 and v2, Apache Tomcat 4, 5 and 6, JBoss 4, BEA WebLogic 10, IBM WebSphere 6.0 and 6.1, Sailfin V1. See the Netbeans J2EE Features site for more info.

James Schek
A: 

Glassfish is actually an easy to use app server. I think it's easier for a beginner to use and it's integrated with Netbeans. Setting up database connection caches is easy, for example.

You administer the server through this web page:

http://localhost:4848

(login: admin, password: adminadmin)

Glassfish will run your apps on port 8080.

The Glassfish home page: http://glassfish.dev.java.net (don't really need to read)

For non-Netbeans users there's a QuickStart guide:

http://glassfish.dev.java.net/downloads/quickstart/index.html

Here's a screencast overview:

http://download.java.net/javaee5/screencasts/admin-console/index.html

At some point you will want to learn Tomcat too because it's so prevalent, but Glassfish is a much friendlier start. In fact, it's probably better as a production server too, if you can find an affordable host.