This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Spring and the fly likes making a Spring MVC website Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "making a Spring MVC website" Watch "making a Spring MVC website" New topic
Author

making a Spring MVC website

malgo douginos
Greenhorn

Joined: Jan 08, 2012
Posts: 2
Hi,

I must make a java MVC spring based forum, since I only know the basis (some JSP, HTML, JAVA J2EE) I need some help figuring out an existing one.

first, does each page require a model and controller? because I got a pre-made spring-MVC from my school to look at but :



index.html has no controller or model
ajoutVoituresForm.jsp only has a controller
ParcVoiruresForm.jsp only has a controller

moreover, in web.xml the display name is SpringWebMVC but I can only acces the website from
http://localhost:8080/MVCTest/index.html
shouldn't it be
http://localhost:8080/SpringWebMVC/index.html

many thanks =D

ps : here is the source code of everything if you want to look at it : http://sliders.alpha.free.fr/MVC/SpringWebMVCFormulaires.rar
Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
index.html is probably the default page defined outside of Spring MVC. The model is provided by Spring. You add attributes to it, for example it appears the JSP you have open is expecting a "titre" attribute to be set on the model.

Read this if you haven't already.

http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/mvc.html
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: making a Spring MVC website
 
Similar Threads
NX: URLy Bird 1.3.1 Connection Factory Design
a conceptual problem with security in spring
Deploying Applet
Relationship between Model (in MVC) and DAO
Spring Web Flow 2 Web Development