Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to redirect a request to another URL in Struts

 
ankit misra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I am developing an application(http://localhost:8080/tas/....). I have user registration page and on that page user will enter their information's. When the user will click on register button the page will redirect the page to a completely different url(like: www.google.com/myservices). So, here my application context starts with /tas and my request will be redirected to google with some post/get parameters. I am using Struts1.3.10 framework. In the jsp file I am using
<% String redirectURL = "www.google.com"; response.sendRedirect(redirectURL); %> but in the url it show (http://localhost:8080/www.google.com). Any help would be much appriciated.

Ankit
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
ankit misra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It worked. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic