2

I have created a new Appfuse 2.1.0 struts2 application and from the servlet i want to redirect to https://gmail.com, i have used the following code:
response.sendRedirect("https://gmail.com");

But this line was not working, my application was not redirecting to this domain which i have specified. Do i need to do any configurations to redirect to another domain from my appfuse application?

bjb568
  • 11,089
  • 11
  • 50
  • 71
Pawan
  • 273
  • 1
  • 7
  • 21
  • 2
    And what does it do instead of redirecting? Any exception? What's the stack trace? And what's the code behind it? – JB Nizet May 27 '12 at 07:33
  • Much depends on what you do after the 'line that is not working'. Please provide more code demonstrating the problem. – Confusion May 27 '12 at 07:33
  • There is no exceptions, just an empty page was displayed and in the address bar the servlet URL was displayed. And in the doGet method of servlet, there are only 2 lines of code, _'sendRedirect()'_ and next _'return'_ statement – Pawan May 27 '12 at 08:48

1 Answers1

-1

You need to give Url like:

  response.sendRedirect("https:www.gmail.com");
Shekhar Khairnar
  • 2,643
  • 3
  • 26
  • 44