You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antonio Petrelli <br...@tariffenet.it> on 2006/09/04 15:59:51 UTC

[tiles] Re: Struts tiles cewolf problem

Matts ha scritto:
> Hi, I'm developing a web app with struts, tiles. I want to use cewolf to render chart. It's work fine if i don't use tiles.
> The problem is that with tiles the chart are not show.
>
> Any one nows how to integrate correctly with tiles??
>   

Do you use Tiles definitions? If yes can you post them here, along with 
layout pages and the JSP page supposed to show the chart?
Do you receive any exception? If yes, can you post them?

Ciao
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [tiles] Re: Struts tiles cewolf problem(Resolved)

Posted by Matts <ma...@hotmail.com>.
You thinks well antonio!! It has worked without the <html:base> tag!!!!! 
Thank you very much.
I will try now to integrate it with the real application, and I think I will 
have problems removing <html:base> cause I have other resourses that need 
it!!! But well that is another theme!! thanks

----- Original Message ----- 
From: "Antonio Petrelli" <br...@tariffenet.it>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, September 04, 2006 11:40 AM
Subject: Re: [tiles] Re: Struts tiles cewolf problem


> Matts ha scritto:
>> Layout1(at web-inf/tiles):
>> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>>
>> <%@ taglib uri="http://struts.apache.org/tags-tiles"
>> prefix="tiles" %>
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>>
>> <HTML>
>>
>> <HEAD>
>>
>> <TITLE><tiles:getAsString name="title"/></TITLE>
>>
>> <html:base/>
>
> Hehe! I (think I) got it!
> This is the "infamous" <html:base /> tag that, with Tiles, uses your 
> layout JSP page as the base path, I still don't know why. (Just check your 
> produced HTML and look at the <base> tag).
> In these cases I suggest to remove the <html:base/> tag and use only 
> relative paths.
>
> HTH
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [tiles] Re: Struts tiles cewolf problem

Posted by Antonio Petrelli <br...@tariffenet.it>.
Matts ha scritto:
> Layout1(at web-inf/tiles):
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> <%@ taglib uri="http://struts.apache.org/tags-tiles"
> prefix="tiles" %>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <HTML>
>
> <HEAD>
>
> <TITLE><tiles:getAsString name="title"/></TITLE>
>
> <html:base/>

Hehe! I (think I) got it!
This is the "infamous" <html:base /> tag that, with Tiles, uses your 
layout JSP page as the base path, I still don't know why. (Just check 
your produced HTML and look at the <base> tag).
In these cases I suggest to remove the <html:base/> tag and use only 
relative paths.

HTH
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [tiles] Re: Struts tiles cewolf problem

Posted by Matts <ma...@hotmail.com>.
Layout1(at web-inf/tiles):
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ taglib uri="http://struts.apache.org/tags-tiles" 

prefix="tiles" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<TITLE><tiles:getAsString name="title"/></TITLE>

<html:base/>

</HEAD>

<BODY bgcolor="#CCCCCC">

<TABLE border="0" width="765" cellspacing="5" align="center">

<TR>

<TD valign="top" align="left">

<tiles:insert attribute='body' />

<br clear="ALL">

</TD>

</TR>

</TABLE>

</BODY>

</HTML>

----- Original Message ----- 
From: "Antonio Petrelli" <br...@tariffenet.it>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, September 04, 2006 11:16 AM
Subject: Re: [tiles] Re: Struts tiles cewolf problem


> Matts ha scritto:
>> <definition name=".layout1" path="/WEB-INF/tiles/layout1.jsp">
> 
> Can you post also layout1.jsp please?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [tiles] Re: Struts tiles cewolf problem

Posted by Antonio Petrelli <br...@tariffenet.it>.
Matts ha scritto:
> <definition name=".layout1" path="/WEB-INF/tiles/layout1.jsp">

Can you post also layout1.jsp please?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [tiles] Re: Struts tiles cewolf problem

Posted by Matts <ma...@hotmail.com>.
My tiles-def.xml looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles 
Configuration 1.1//EN"

"http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">

<tiles-definitions>

<!-- layout1: utilizado en la pagina de login -->

<definition name=".layout1" path="/WEB-INF/tiles/layout1.jsp">

<put name="title"/>

<put name="body"/>

</definition>

<definition extends=".layout1" name="greeting.page">

<put name="title" value="Greeting"/>

<put name="body" value="/WEB-INF/tiles/body-greeting.jsp"/>

</definition>

</tiles-definitions>

The page that is supposed to show the chart is greeting.jsp wich has the 
body body-greeting.jsp.
greeting. jsp (at web-root/pages):
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<tiles:insert definition="greeting.page"/>

body-greeting.jsp (at web-inf/tiles):
<%@taglib uri='/WEB-INF/cewolf.tld' prefix='cewolf' %>


<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td>

<h1><%=request.getAttribute("greeting")%></h1>

</td>

</tr>

</table>

<jsp:useBean id="pageViews" class="logica.PageViewCountData"/>

<cewolf:chart id="line" title="Page View Statistics" type="line" 
xaxislabel="Page" yaxislabel="Views">

<cewolf:data>

<cewolf:producer id="pageViews"/>

</cewolf:data>

</cewolf:chart><p>

<cewolf:img chartid="line" renderer="cewolf" width="400" height="300"/>

<P>

thanks for reply.
Matts.

----- Original Message ----- 
From: "Antonio Petrelli" <br...@tariffenet.it>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, September 04, 2006 10:59 AM
Subject: [tiles] Re: Struts tiles cewolf problem


> Matts ha scritto:
>> Hi, I'm developing a web app with struts, tiles. I want to use cewolf to 
>> render chart. It's work fine if i don't use tiles.
>> The problem is that with tiles the chart are not show.
>>
>> Any one nows how to integrate correctly with tiles??
>>
>
> Do you use Tiles definitions? If yes can you post them here, along with 
> layout pages and the JSP page supposed to show the chart?
> Do you receive any exception? If yes, can you post them?
>
> Ciao
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org