tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Tomcat 6 Struts 1.3
Date Mon, 02 May 2011 16:44:10 GMT
Hash: SHA1


On 5/2/2011 12:20 PM, cpanon wrote:
> It still seems there is something stopping the jsp 
> processing on TC, after the first time.  Yes, I know how foolish that sounds, 
> sorry nonplused at this moment.

I'm not even sure I understand what you mean. That's okay, let's take a
look at the code.

>     if (desiredReport.equals("a")) {
>       fb00.setFramesetPage("/ccAuth15_PO_all_fragment.jsp"); 

Okay. What is the "/" intended to be relative to? The webapp? The whole
server? More on this, later.

What does the "setFramesetPage" method actually set? I don't see
anything called "frameSet" in the configuration or anything like that.

> <tiles-definitions>
>   <definition name="defaultReport" path="/ccAuth15_template00.jsp">
>     <put name="title" value="defaultReport"></put>
>     <put name="banner" value="/dynamicBanner.jsp"></put>
>     <put name="report" value="/ccAuth15_PO_all_fragment.jsp"></put>
>     <put name="applet" value="/ccAuth13_applet_fragment.jsp"></put>
>   </definition>

I'm no tiles expert, but it seems obvious what's going on, here.

> template00
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <html>
>   <head>
>     <title><tiles:getAsString name="title" ignore="true"/></title>
>   </head>
>   <body bgcolor="#ffffff">
>     <table>
>       <tr>
>         <td><tiles:insert attribute="banner" flush="true"/></td>

Presumably, Tiles is smart enough to resolve the template paths, here,
to the right file on disk. Are these templates properly resolved when
using <tiles:insert>? Or is this the problem you're actually reporting:
that Tiles can't find your templates?

> <html>
>   <head>
>     <title>
>       ${sessionScope.fb00.frameTitle}
>     </title>
>   </head>
>   <body bgcolor="#ffffff">
>     <c:url value="/imageservelet" var="dynaAd">

Good: you are using <c:url>. This will ensure that your URLs are
passed-through both of the following procedures:

1. Pre-pending the context path of the webapp (i.e.
request.getContextPath() + url)

2. Encoding the URL if necessary for url-rewriting (i.e.

>         <td><img src="${dynaAd}" alt="Subscriber store specific image banner"

> /></td>

Use of a URL without the above steps /may/ be a problem, but also may
not: if you are sure this URL is exactly right, then feel free to ignore
this comment.

>         <td><jsp:include flush="true" 
> page="${sessionScope.fb00.framesetPage}"></jsp:include></td>

I checked the documentation for <jsp:include> and it wasn't clear
whether a URL starting with "/" will be treated as if it were relative
to the current webapp or relative to the current hostname. My guess is
the latter.

It also doesn't say whether the url will be "rewritten" if necessary.

>         <td><jsp:include flush="true" 
> page="/ccAuth13_applet_fragment.jsp"></jsp:include></td>

So, I suspect this and the previous includes are the things that are
failing, right?

What is the context path of your webapp?

What exactly happens when it "does not work"? Error message? Exception?
Both? Neither? Empty output within your <td> element? Page generation stops?

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message