This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Spring and the fly likes using simple url handler mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Spring
Bookmark "using simple url handler mapping" Watch "using simple url handler mapping" New topic

using simple url handler mapping

pradeep talekar

Joined: Dec 02, 2012
Posts: 1
I want to use simple url handler mapping for the following example :

index.jsp contains :-

web.xml [deployment descriptor] contains :-

rmc-servlet.xml contains :

LoginController.class contains :-

HelloWorldPage.jsp contains : -${msg}

But every time I get /upload.form resource not available.
I suspect there is some problem with the mapping.

Thanks a lot.

Bill Gorder

Joined: Mar 07, 2010
Posts: 1681

Is there a specific reason why you are not using the preferred @Controller model with the RequestMappingHandlerAdapter? This adapter is much more powerful and flexible than the others. Typically you should not need to implement any Spring interfaces or extend any Spring classes (like AbstractController) with the newer model. This decreases coupling to the framework.

See a sample application here:

The simple URL mapping requires explicit configuration for each controller and does not auto detect mappings. Using this approach will lead to very large config files if you have a large number of controllers.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: using simple url handler mapping