Fact:
I request the root application in your browser http://localhost:8080/myapp, and my browser displays this error: Error 310 (net::ERR_TOO_MANY_REDIRECTS): many redirects.
Environment:
I use Java 6, Glassfish 2.1, Struts2, Spring, and Hibernate.
Check:
Then I look through web.xml and in the welcome list files I have this:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
So let's check index.jspthis redirection too:
...
<head>
<meta http-equiv="refresh" content="0;url=<%=request.getContextPath()%>/portal/home.do">
...
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/icono.png" />
</head>
...
Then we can go to struts.xml, and we will see this fragment:
...
<package name="portal-action" extends="portal-base" namespace="/portal">
<action name="home" method="home" class="beginAction">
<result type="tiles">begin.home</result>
</action>
...
Let the beginActionclass be checked :
...
public String home(){
return SUCCESS;
}
...
And we can check tiles.xml:
...
<definition name="begin.welcome" extends=".baseHome">
<put-attribute name="working.region" value="/jsp/common/welcome.jsp" />
</definition>
...
Finally, we can view the entire file welcome.jsp, which contains only:
<%@ taglib prefix="s" uri="/struts-tags"%>
<br />
What all!
Do you have any idea about this problem?