• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transfer Control from one jsp page to another jsp page

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i have the login page, when i click submit button i wanted it to go to another jsp page. how is that possible in spring?
do i have to add something in dispatcher servlet
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you click submit, the control should go to the controller, where it finds the appropriate method based on the request type(i.e POST/GET) from there, you return a ModelAndView object
 
priya sunny
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thank you very much
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

priya sunny wrote:Hi,
i have the login page, when i click submit button i wanted it to go to another jsp page. how is that possible in spring?
do i have to add something in dispatcher servlet



Are you using Spring Security? Spring Security does it automatically if they are trying to access a secured page and they got redirected to the login page, cause they weren't logged in. Then when they login it will redirect them back to the first page they were trying to access. Also in the configuration of your login-form, there is a success url attribute you can set to send it to a particular URL.

Mark
 
priya sunny
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark
I am not using Spring security.. i am new to spring..
Learning with POCs.
Thankyou..
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

priya sunny wrote:Hi Mark
I am not using Spring security.. i am new to spring..
Learning with POCs.
Thankyou..



So then more towards what Prasad wrote. You have to write that code in your Controller.

For it happening automatically for what you want. Spring Security is a better solution.

Mark
 
priya sunny
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,
Is it possible for you to give me an example program using Spring Security or a link where it exists?? i am interseted in learning..
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

priya sunny wrote:Hi Mark,
Is it possible for you to give me an example program using Spring Security or a link where it exists?? i am interseted in learning..



Sure

http://static.springsource.org/spring-security/site/docs/3.0.x/reference/springsecurity.html

Good Luck

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic