tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Atrick" <jju...@gmail.com>
Subject tomcat auth incorrectly redirects to img
Date Mon, 28 Jul 2008 21:45:04 GMT
When attempting to log into a standard form-based login field, I'm always
redirected to an image folder.

My folder layout:
/img
/web-inf/
/web-inf/web.xml
/web-inf/defn/tiles-defn.xml
/web-inf/tiles/header.jsp
/index.jsp
/login.jsp
/error.jsp

setup:
Spring2.5/tiles2/tomcat5.5

The web.xml stuff is pretty standard stuff.

my root template is defines as

[code]
<title>
    <tiles:getAsString name="title"/>
</title>
</head>
<body>

<div id="header">
    <div id="logo"><img src="<c:url value="/img/logo1.gif" />" /></div>

    <div>
        <div id="headertitle">
            <tiles:insertAttribute name="header"/>
        </div>


        <div id="headermenu">
            <tiles:insertAttribute name="headernav"/>
        </div>
    </div>
</div>
{/code]

and all my tiles defn are as such:

[code]
    <definition name="first.layout"
template="/WEB-INF/jsp/template/layout.jsp">
        <put-attribute name="title" value="etc"/>
        <put-attribute name="header" value="asdf"/>
    </definition>
[/code]

What happens:
1. I attempt to go to a url
2. It properly stops me and asks me to login
3. I enter user credentials and hit login
4. It sucessfully logins.
5. It redirects me to /img/myimage.gif

every time.

I know that the login works fine, as when I fix my url to the url i was
originally at, everything is correctly authenticated. Is there a way to set
a default url when you attempt to login?

Anyone else get a similar problem before?

Specifically, it seems that whenever it gets to this line:

<div id="logo"><img src="<c:url value="/img/logo1.gif" />" /></div>

it redirects to the image instead of simply outputting it. The even odder
thing is that, when I go back to the proper view, (ie: localhost:8080/myapp)
the layout renders correctly. Is there some issue with tiles not correctly
redirecting images?


Any help would be a life saver.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message