Link to home
Start Free TrialLog in
Avatar of cofactor
cofactor

asked on

response sendRedirect issue

I have a web app .  name :  PaymentServices.war


I want to redirect to   url http://localhost:8080/PaymentServices/index.action  as soon as browser's welcome page is hit .



I am confused which one to  write in welcome.jsp  . This is default welcome page.



<%
  response.sendRedirect("index.action?lang=en");
%>


OR


<%
  response.sendRedirect("/index.action?lang=en");
%>

OR

<%
  response.sendRedirect("PaymentServices/index.action?lang=en");
%>

OR

<%
  response.sendRedirect("/PaymentServices/index.action?lang=en");
%>

OR

 anything else ?
ASKER CERTIFIED SOLUTION
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cofactor
cofactor

ASKER

>>>hen why not change your web..xml to have

this wont load  struts tag library.

hence I want to route through struts action.
hence I want to do  redirect.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>Did you actually mean "your website" welcome page?

yes.

first and last option works fine.