You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "LEONARD Julien (Consulting for ACCOR Hotels)" <ju...@consulting-for.accor.com> on 2007/11/26 10:26:22 UTC

[S2] SVG in tiles result

Hello all,
 
I'm trying to put a svg image in a tiles result, but it seems that it
don't work...

I've changed the html tag :
<html xmlns:svg="http://www.w3.org/2000/svg">

And I have tried 2 examples. 
 
Example 1:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400"
height="300">
<rect x="50" y="50" rx="5" ry="5" width="300" height="100"
style="fill:#CCCCFF;stroke:#000099"/>
<text x="55" y="90" style="stroke:#000099;fill:#000099;font-size:24;">
HELLO cher visiteur </text>
</svg>

Example2 :
<svg:svg width="300" height="100" version="1.1" >
<svg:circle cx="100" cy="50" r="40" stroke="black"
stroke-width="2" fill="red" />
</svg:svg>

With the Example 1, the svg is not interpreted. 
With the Example 2, the svg is not interpreted and there is some errors
(displayed since <s:head theme="ajax" debug="true" /> ) :

DEBUG:  DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "svg" in "svg.widget" registered to
namespace "svg". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG:  dojo.widget.Parse: error:[object Error]
DEBUG:  DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "circle" in "svg.widget" registered to
namespace "svg". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG:  dojo.widget.Parse: error:[object Error]

Is somebody can help me ?

Julien


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message electronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci apres "le message" ), sont confidentiels et destines exclusivement a l'usage de la  personne a laquelle ils sont adresses. Si vous avez recu ce message par erreur, merci  de le renvoyer a son emetteur et de le detruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressement autorisees de ce message, sont interdites.
********************************************************************** 


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


RE: [S2] SVG in tiles result

Posted by "LEONARD Julien (Consulting for ACCOR Hotels)" <ju...@consulting-for.accor.com>.
Thanks for the help Antonio.
It works fine :)
I have an action that return a svg file correctly :)

Julien

-----Message d'origine-----
De : LEONARD Julien (Consulting for ACCOR Hotels) [mailto:julien.leonard@consulting-for.accor.com] 
Envoyé : lundi 26 novembre 2007 11:20
À : Struts Users Mailing List
Objet : RE: [S2] SVG in tiles result

Oh...  Ok thanks I will try with <embed> or <object> ^^

Julien

-----Message d'origine-----
De : Antonio Petrelli [mailto:antonio.petrelli@gmail.com]
Envoyé : lundi 26 novembre 2007 11:17
À : Struts Users Mailing List
Objet : Re: [S2] SVG in tiles result

2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> In fact, it's exactly what I've tried...



What did you try? Using <embed> or <object>?

Could it be a MIME type problem?



No, it's a browser problem: unfortunately most browser do not support putting SVG directly in the HTML pages, without and enclosing <embed> or similar tags.

Antonio


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
**********************************************************************
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 


---------------------------------------------------------------------
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: [S2] SVG in tiles result

Posted by "LEONARD Julien (Consulting for ACCOR Hotels)" <ju...@consulting-for.accor.com>.
Oh...  Ok thanks I will try with <embed> or <object> ^^

Julien

-----Message d'origine-----
De : Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Envoyé : lundi 26 novembre 2007 11:17
À : Struts Users Mailing List
Objet : Re: [S2] SVG in tiles result

2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> In fact, it's exactly what I've tried...



What did you try? Using <embed> or <object>?

Could it be a MIME type problem?



No, it's a browser problem: unfortunately most browser do not support putting SVG directly in the HTML pages, without and enclosing <embed> or similar tags.

Antonio


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 


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


Re: [S2] SVG in tiles result

Posted by Antonio Petrelli <an...@gmail.com>.
2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> In fact, it's exactly what I've tried...



What did you try? Using <embed> or <object>?

Could it be a MIME type problem?



No, it's a browser problem: unfortunately most browser do not support
putting SVG directly in the HTML pages, without and enclosing <embed> or
similar tags.

Antonio

RE: [S2] SVG in tiles result

Posted by "LEONARD Julien (Consulting for ACCOR Hotels)" <ju...@consulting-for.accor.com>.
In fact, it's exactly what I've tried...
Could it be a MIME type problem? 

-----Message d'origine-----
De : Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Envoyé : lundi 26 novembre 2007 11:05
À : Struts Users Mailing List
Objet : Re: [S2] SVG in tiles result

2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> No, directly in the html.



Probably you are interested in this then:
http://www.w3schools.com/svg/svg_inhtml.asp

HTH
Antonio


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


Re: [S2] SVG in tiles result

Posted by Antonio Petrelli <an...@gmail.com>.
2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> No, directly in the html.



Probably you are interested in this then:
http://www.w3schools.com/svg/svg_inhtml.asp

HTH
Antonio

RE: [S2] SVG in tiles result

Posted by "LEONARD Julien (Consulting for ACCOR Hotels)" <ju...@consulting-for.accor.com>.
No, directly in the html. I have a template.jsp that include since to tiles my body jsp :

<table width="100%" height="100%">
	<tr>
		<td height="10%">
			<s:select list="listeImagesCertifs" name="challenge.diplome" value="%{challenge.diplome}" theme="simple" onchange="changeImageChallenge()" emptyOption="true"></s:select>
		</td>
	</tr>
	<tr>
		<td width="100%" height="90%">
			<s:div id="cadreDiplome" cssClass="formatDiplome" href="FormatDiplome.do" theme="ajax" listenTopics="/showDiplomeTopic">
			</s:div>
		</td>
	</tr>
	<tr>
		<td>
		<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400" height="300">
<!-- un petit rectangle avec des coins arroundis  -->
<rect x="50" y="50" rx="5" ry="5" width="300" height="100" style="fill:#CCCCFF;stroke:#000099"/>
<text x="55" y="90" style="stroke:#000099;fill:#000099;font-size:24;">
HELLO cher visiteur </text>
</svg>
		</td>
	</tr>
	<tr>
		<td>
		<svg:svg width="300" height="100" version="1.1" >
<svg:circle cx="100" cy="50" r="40" stroke="black"
stroke-width="2" fill="red" />
</svg:svg>
		</td>
	</tr>
</table>

Julien

-----Message d'origine-----
De : Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Envoyé : lundi 26 novembre 2007 10:48
À : Struts Users Mailing List
Objet : Re: [S2] SVG in tiles result

2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> I'm trying to put a svg image in a tiles result, but it seems that it 
> don't work...



How are you trying to put it? As a picture, using the <img> HTML tag?

Antonio


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


Re: [S2] SVG in tiles result

Posted by Antonio Petrelli <an...@gmail.com>.
2007/11/26, LEONARD Julien (Consulting for ACCOR Hotels) <
julien.leonard@consulting-for.accor.com>:
>
> I'm trying to put a svg image in a tiles result, but it seems that it
> don't work...



How are you trying to put it? As a picture, using the <img> HTML tag?

Antonio