tags:

views:

60

answers:

4

Hi

I am trying to implement a web application(university project) in java using the following Frameworks

Spring Dependency Injection
Spring AOP (Logging and Transaction Management)
Spring DAO
JDBC or HIBERNATE
Spring MVC
Log4J

I create a new Web Application in Netbeans and it gives me a bunch of Files and folders by default.

Could anyone explain me what are the files ?

Where shall i put the code for the data access layer and business Logic?

Or where can i found a basic tutorial to get started(with data access layer, business layer and possibly code example)?

Thanks

A: 

It would be good to list the files that you got, but I think I can guess:

  1. WEB-INF/classes is where your compiled .java code will go. Everything should be in packages, so the directory and package structures should match. Your Spring XML and Hibernate .hbm.xml configuration files will go here as well, because that directory is automatically in the CLASSPATH of your web context.
  2. WEB-INF/lib is where your 3rd party .jar files go. All the Spring and Hibernate JARs, plus all their dependencies, belong here.
  3. The WEB-INF/web.xml is where you'll map in the Spring front controller/dispatcher servlet, the context loader listener, etc.

I don't know what others you got. If you list others, I'll try to explain.

duffymo
+2  A: 

One area in which NetBeans is very good is the online documentation and tutorials so leverage them:

Pascal Thivent
A: 

That is a ton of Java frameworks for a Web Dev course at a university. My advice would be to start small, because you don't need all of those libraries to get a working web application.

As you found, Netbeans is doing a lot of work for you that you really need to know to be effective. Do a simple JSP or Java Servlet tutorial to get something up and running quickly from scratch on a lightweight app server like Jetty or Tomcat.

Also, please take a look at what Model View Controller architecture is prior to diving into Hibernate or SpringMVC. This is a critical step!

Drew
A: 

Here is Netbeans web application + hibernate tutorial.

http://netbeans.org/kb/docs/web/hibernate-webapp.html

code for business and data access would go under

  • your project name/Source Packages/
ring bearer