This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Joe Ess
  • salvin francis
  • fred rosenberger

Head First Servlets & JSP - mini MVC exercise

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?
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.

Posts: 13411
Firefox Browser VI Editor Redhat
  • 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.
We don't have time for this. We've gotta save the moon! Or check this out:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!