aspose file tools*
The moose likes Spring and the fly likes Spring link navigation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring link navigation problem" Watch "Spring link navigation problem" New topic
Author

Spring link navigation problem

Jagdev Singh
Ranch Hand

Joined: Jan 12, 2010
Posts: 71

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

Joined: Dec 22, 2011
Posts: 17
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

Joined: Jan 12, 2010
Posts: 71

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

Joined: Dec 22, 2011
Posts: 17
If your both the pages are jsp then see this topic
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Spring link navigation problem