Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Login URL problem in my application

 
Rama Krishna Ghanta
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I have a problem with the URL in my Struts application.The scenario is as follows.
When i access my application using http://hostname ortnumber/contextroot a login page shows up and for this page the html:form action is login. If I provide correct login credentials, before logging in to the application,I need to create a cookie. All this process I am successful and my problem comes up after logging in. After successful logging in to the application my URL will be http://hostname ortnumber/contextroot/login.do. But the actual URL should be http://hostname ortnumber/contextroot/somethingelse.do which is the success page.Can someone suggest me how I can change the URL. I have tried redirect="true" in my struts-config file.But that causes someother severe problems to me. I have tried to forward the page using JavaScript to actual URL when the url had /login.do.But that causes me a performance downgradation as the same action path will be executed twice.Can someone suggest me a good solution please...Am really in a great need of the solution as early as possible.
 
Rama Krishna Ghanta
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry All....Smileys changed my URL pattern for (: p)ortnumber ...

Hello All,
I have a problem with the URL in my Struts application.The scenario is as follows.
When i access my application using http://hostname:portnumber/contextroot a login page shows up and for this page the html:form action is login. If I provide correct login credentials, before logging in to the application,I need to create a cookie. All this process I am successful and my problem comes up after logging in. After successful logging in to the application my URL will be http://hostname:portnumber/contextroot/login.do. But the actual URL should be http://hostname:portnumber/contextroot/somethingelse.do which is the success page.Can someone suggest me how I can change the URL. I have tried redirect="true" in my struts-config file.But that causes someother severe problems to me. I have tried to forward the page using JavaScript to actual URL when the url had /login.do.But that causes me a performance downgradation as the same action path will be executed twice.Can someone suggest me a good solution please...Am really in a great need of the solution as early as possible.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Setting redirect="true" on your forward seems like the correct solution to me, so I would have to ask what "sever problems" that caused.

- Brent
 
Rama Krishna Ghanta
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brent,
I have found a solution to my problem. Using redirect="true" works for me fine.But the problem is in a different location for me.I have resolved that.Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic