Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page hyperlink navigation with Spring MVC @Controller

 
james loveay
Greenhorn
Posts: 10
Java MS IE Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I've been working on this for a while but can't seem to find the right way to go with it.

I want to be able to log in to a system, then on clicking on a hyperlink go to another page which will display a list of objects.

I'm using Spring MVC 3.1 with @Controller classes and the navigation goes from one .jsp to another .jsp page.

I've tried a few things and have considered SWF but think that is a little over what I need to do for this, also there seems to be no examples that I have been able to find, unless I'm getting a search term wrong.

So this is the code that I have



MainMenuController File



I have tried the @RequestMapping("/loanbooks") also @RequestMapping(value = "/loanbooks", method = RequestMethod.GET)

Both have failed, either returning a 404 or returning a mapping issue, if I can get the mapping correct between the jsp and the controller and there is still a problem then I think that I require a mapping in the xml file but I'm just not sure where I'm going wrong.

Can somebody take the time to have a look at this and explain what I'm missing.

Many thanks in advance.

I think though that I'll try to use SWF and see how I go with that, hopefully I can make another post soon to let you know how I got on with it.
 
james loveay
Greenhorn
Posts: 10
Java MS IE Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

just an update, Have solved the problem.

Again another simple one that I just couldn't figure out and stumbled on it just by luck but I know what I did so that's great for later.

Just wanted to input the code changes so that anybody with the same problem can follow and not go around the houses like I have been.



The controller class was changed



This solved the problem and allowed my to display the results quite happily.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic