Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Head First Servlets & JSP - mini MVC exercise  RSS feed

 
leo donahue
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the Chapter 3 mini MVC project where we set up our "development environment".

Is this development environment modeled after a specific EJB Container?

I have NetBeans 5.5 and Sun Java System Application Server Platform Edition 9.0 downloaded from here

When I try creating a new project, be it a JSP or an Enterprise app, the structure of the webapp doesn't look like the one on page 72 in Chapter 3.

Where does this structure come from?
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Leo,

I also use NetBeans5.5 and have the book you mention.

They both have the required WEB-INF folder, and the required web.xml in that folder.

NetBeans creates a folder "web" for you for developing but does not use this folder at runtime: if you build the project, NetBeans will create a .war file to deploy (in the "dist" folder).
This .war file does not have any "web" folder.

Herman
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if that book teaches using a specific IDE or not but I don't recommend starting out learning JSP or Servlets using one (core Java either for that matter). What you end up learning is the IDE and not the real subject matter at hand.

My advice:
Download a simple, no frills, Servlet/JSP container (Tomcat is my preference but there are other open source and free ones out there as well), and the JDK recommended by that container's documentation.

Build your first dozen or so web applications using a simple text editor, javac, and deploy them in this container.

This forces you to learn the fundamentals of setting up a Java development environment, and the proper structure of a web application.

Once you're comfortable with this environment, if you feel that an IDE will speed things up for you or make your life easier, then start evaluating them.

Remember production web servers don't typically have IDEs on them. Many don't even have GUIs. Learning to develop this way insures that you'll be able to deploy and debug your applications in any environment.

If you'd still rather start out using Netbeans, let us know and we can move this thread to our IDEs forum where someone who know the ins and outs of that tool will most likely be able to help you out.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!