• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring link navigation problem

 
Jagdev Singh
Ranch Hand
Posts: 71
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to spring mvc.I am learning spring-mvc using spring 2.5.6.I am using simpleformcontroller to login into application.After successful login it shows the users home page,here user have populated user command from database.In user home page there are some links to other secure pages.

Now my target is to navigate the links and when user redirect to the desired page.It should have populated user command one that page.

Now my problem is how to send user command from user home page to the target(desired) page when user click the particular link.
How this can be solve using spring 2.5.6.

Thanks in advance.

Regards
Jagdev
 
Atul Kotwale
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would do something like below.

1) Create SimpleController class. Override handleRequest method. In that method get your command objects from the user home page and add to ModelView Object.



2. In Jsp use follow code to get the command object set in the controller. I assume all your views are jsp pages.


 
Jagdev Singh
Ranch Hand
Posts: 71
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Atul,

Thanks For response.

I have one problem now.Following is the scenario.
After user login it shows user home page which has user command object.Now when user navigate to help page using link then how to paas this object to that page.At home page I am accessing that object using expression language.

Regards
Jagdev Singh
 
Atul Kotwale
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your both the pages are jsp then see this topic
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic