Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Head First Servlets & JSP - mini MVC exercise

Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
All of the following truths are shameless lies. But what about this tiny ad:
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic