Problème avec JSP et un web.xml généré par XDoclets

Le
g-greg
Bonsoir à tous,

Débutant sur J2EE, j'ai un problème bizarre :
Je développe une appli web avec des JSP, sur le serveur du SDK Sun v8.
- Avec un web.xml fait main et simple, les tags JSP EL ${toto} et les
tags <c:> sont bien interprétés.
- Avec le web.xml généré par xdoclets, les tags ${toto} apparaissent
tels quels dans la page,
et les tags <c:> ne sont pas exécutés, ils ne font rien.

J'ai donc fait générer à XDoclets quelque chose qui inactive
l'interprétation des tags !?

Apparemment ça ne vient pas des modules java (filtres, listeners)
présents, car ça le fait même sans eux.
Je joins le web.xml généré, si ça vous dit quelque chose ? D'avance
merci.


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app >
<distributable/>
<display-name>BrutalMetal2</display-name>

<!--
To use non XDoclet filters, create a filters.xml file that
contains the additional filters (eg Sitemesh) and place it in your
project's merge dir. Don't include filter-mappings in this file,
include them in a file called filter-mappings.xml and put that in
the same directory.
-->

<filter>
<filter-name>HitCounterFilter</filter-name>
<description><![CDATA[Ajoute un nb de hits en bas de
page.]]></description>
<filter-class>filters.HitCounterFilter</filter-class>
</filter>

<!--
To use non XDoclet filter-mappings, create a filter-mappings.xml
file that
contains the additional filter-mappings and place it in your
project's merge dir.
-->
<filter-mapping>
<filter-name>HitCounterFilter</filter-name>
<servlet-name>RacineServlet</servlet-name>
</filter-mapping>

<!--
To use non XDoclet listeners, create a listeners.xml file that
contains the additional listeners and place it in your
project's merge dir.
-->
<listener>
<listener-class>listeners.ContextListener</listener-class>
</listener>

<!--
To use non XDoclet servlets, create a servlets.xml file that
contains the additional servlets (eg Struts) and place it in your
project's merge dir. Don't include servlet-mappings in this file,
include them in a file called servlet-mappings.xml and put that in
the same directory.
-->

<!--
To specify mime mappings, create a file named mime-mappings.xml, put
it in your project's mergedir.
Organize mime-mappings.xml following this DTD slice:

<!ELEMENT mime-mapping (extension, mime-type)>
-->

<!--
To specify error pages, create a file named error-pages.xml, put it
in your project's mergedir.
Organize error-pages.xml following this DTD slice:

<!ELEMENT error-page ((error-code | exception-type), location)>
-->

<!--
To add taglibs by xml, create a file called taglibs.xml and place it
in your merge dir.
-->

<resource-ref >
<res-ref-name>jdbc/BrutalDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

<!--
To set up security settings for your web app, create a file named
web-security.xml, put it in your project's mergedir.
Organize web-security.xml following this DTD slice:

<!ELEMENT security-constraint (display-name?,
web-resource-collection+, auth-constraint?, user-data-constraint?)>
<!ELEMENT web-resource-collection (web-resource-name, description?,
url-pattern*, http-method*)>
<!ELEMENT web-resource-name (#PCDATA)>
<!ELEMENT url-pattern (#PCDATA)>
<!ELEMENT http-method (#PCDATA)>
<!ELEMENT user-data-constraint (description?, transport-guarantee)>
<!ELEMENT transport-guarantee (#PCDATA)>

<!ELEMENT login-config (auth-method?, realm-name?,
form-login-config?)>
<!ELEMENT auth-method (#PCDATA)>
<!ELEMENT realm-name (#PCDATA)>
<!ELEMENT form-login-config (form-login-page, form-error-page)>
<!ELEMENT form-login-page (#PCDATA)>
<!ELEMENT form-error-page (#PCDATA)>
-->

</web-app>
  • Partager ce contenu :
Vos réponses
Trier par : date / pertinence
djice
Le #779610
si je te dis pas de conneries, il me semble que ça vient de la dtd ...


"g-greg"
Bonsoir à tous,

Débutant sur J2EE, j'ai un problème bizarre :
Je développe une appli web avec des JSP, sur le serveur du SDK Sun v8.
- Avec un web.xml fait main et simple, les tags JSP EL ${toto} et les
tags - Avec le web.xml généré par xdoclets, les tags ${toto} apparaissent
tels quels dans la page,
et les tags
J'ai donc fait générer à XDoclets quelque chose qui inactive
l'interprétation des tags !?

Apparemment ça ne vient pas des modules java (filtres, listeners...)
présents, car ça le fait même sans eux.
Je joins le web.xml généré, si ça vous dit quelque chose ? D'avance
merci.



<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app >
<distributable/>
<display-name>BrutalMetal2</display-name>

<!--
To use non XDoclet filters, create a filters.xml file that
contains the additional filters (eg Sitemesh) and place it in your
project's merge dir. Don't include filter-mappings in this file,
include them in a file called filter-mappings.xml and put that in
the same directory.
-->

<filter>
<filter-name>HitCounterFilter</filter-name>
<description><![CDATA[Ajoute un nb de hits en bas de
page.]]></description>
</filter>

<!--
To use non XDoclet filter-mappings, create a filter-mappings.xml
file that
contains the additional filter-mappings and place it in your
project's merge dir.
-->
<filter-mapping>
<filter-name>HitCounterFilter</filter-name>
<servlet-name>RacineServlet</servlet-name>
</filter-mapping>

<!--
To use non XDoclet listeners, create a listeners.xml file that
contains the additional listeners and place it in your
project's merge dir.
-->
<listener>
</listener>

<!--
To use non XDoclet servlets, create a servlets.xml file that
contains the additional servlets (eg Struts) and place it in your
project's merge dir. Don't include servlet-mappings in this file,
include them in a file called servlet-mappings.xml and put that in
the same directory.
-->

<!--
To specify mime mappings, create a file named mime-mappings.xml, put
it in your project's mergedir.
Organize mime-mappings.xml following this DTD slice:

<!ELEMENT mime-mapping (extension, mime-type)>
-->

<!--
To specify error pages, create a file named error-pages.xml, put it
in your project's mergedir.
Organize error-pages.xml following this DTD slice:

<!ELEMENT error-page ((error-code | exception-type), location)>
-->

<!--
To add taglibs by xml, create a file called taglibs.xml and place it
in your merge dir.
-->

<resource-ref >
<res-ref-name>jdbc/BrutalDB</res-ref-name>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

<!--
To set up security settings for your web app, create a file named
web-security.xml, put it in your project's mergedir.
Organize web-security.xml following this DTD slice:

<!ELEMENT security-constraint (display-name?,
web-resource-collection+, auth-constraint?, user-data-constraint?)>
<!ELEMENT web-resource-collection (web-resource-name, description?,
url-pattern*, http-method*)>
<!ELEMENT web-resource-name (#PCDATA)>
<!ELEMENT url-pattern (#PCDATA)>
<!ELEMENT http-method (#PCDATA)>
<!ELEMENT user-data-constraint (description?, transport-guarantee)>
<!ELEMENT transport-guarantee (#PCDATA)>

<!ELEMENT login-config (auth-method?, realm-name?,
form-login-config?)>
<!ELEMENT auth-method (#PCDATA)>
<!ELEMENT realm-name (#PCDATA)>
<!ELEMENT form-login-config (form-login-page, form-error-page)>
<!ELEMENT form-login-page (#PCDATA)>
<!ELEMENT form-error-page (#PCDATA)>
-->

</web-app>




zinou
Le #779361
Il manque les tld's donc cela ne peut vraiment pas marcher.
voir attribut mergeDir dans task deploymentdescriptor
http://xdoclet.sourceforge.net/xdoclet/ant/xdoclet/modules/web/WebXmlSubTask.html

sinon
http://www.jguru.com/faq/printablefaq.jsp?topic=XDoclet




g-greg wrote:
Bonsoir à tous,

Débutant sur J2EE, j'ai un problème bizarre :
Je développe une appli web avec des JSP, sur le serveur du SDK Sun v8.
- Avec un web.xml fait main et simple, les tags JSP EL ${toto} et les
tags - Avec le web.xml généré par xdoclets, les tags ${toto} apparaissent
tels quels dans la page,
et les tags
J'ai donc fait générer à XDoclets quelque chose qui inactive
l'interprétation des tags !?

Apparemment ça ne vient pas des modules java (filtres, listeners...)
présents, car ça le fait même sans eux.
Je joins le web.xml généré, si ça vous dit quelque chose ? D'avance
merci.



<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app >
<distributable/>
<display-name>BrutalMetal2</display-name>

<!--
To use non XDoclet filters, create a filters.xml file that
contains the additional filters (eg Sitemesh) and place it in your
project's merge dir. Don't include filter-mappings in this file,
include them in a file called filter-mappings.xml and put that in
the same directory.
-->

<filter>
<filter-name>HitCounterFilter</filter-name>
<description><![CDATA[Ajoute un nb de hits en bas de
page.]]></description>
</filter>

<!--
To use non XDoclet filter-mappings, create a filter-mappings.xml
file that
contains the additional filter-mappings and place it in your
project's merge dir.
-->
<filter-mapping>
<filter-name>HitCounterFilter</filter-name>
<servlet-name>RacineServlet</servlet-name>
</filter-mapping>

<!--
To use non XDoclet listeners, create a listeners.xml file that
contains the additional listeners and place it in your
project's merge dir.
-->
<listener>
</listener>

<!--
To use non XDoclet servlets, create a servlets.xml file that
contains the additional servlets (eg Struts) and place it in your
project's merge dir. Don't include servlet-mappings in this file,
include them in a file called servlet-mappings.xml and put that in
the same directory.
-->

<!--
To specify mime mappings, create a file named mime-mappings.xml, put
it in your project's mergedir.
Organize mime-mappings.xml following this DTD slice:

<!ELEMENT mime-mapping (extension, mime-type)>
-->

<!--
To specify error pages, create a file named error-pages.xml, put it
in your project's mergedir.
Organize error-pages.xml following this DTD slice:

<!ELEMENT error-page ((error-code | exception-type), location)>
-->

<!--
To add taglibs by xml, create a file called taglibs.xml and place it
in your merge dir.
-->

<resource-ref >
<res-ref-name>jdbc/BrutalDB</res-ref-name>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

<!--
To set up security settings for your web app, create a file named
web-security.xml, put it in your project's mergedir.
Organize web-security.xml following this DTD slice:

<!ELEMENT security-constraint (display-name?,
web-resource-collection+, auth-constraint?, user-data-constraint?)>
<!ELEMENT web-resource-collection (web-resource-name, description?,
url-pattern*, http-method*)>
<!ELEMENT web-resource-name (#PCDATA)>
<!ELEMENT url-pattern (#PCDATA)>
<!ELEMENT http-method (#PCDATA)>
<!ELEMENT user-data-constraint (description?, transport-guarantee)>
<!ELEMENT transport-guarantee (#PCDATA)>

<!ELEMENT login-config (auth-method?, realm-name?,
form-login-config?)>
<!ELEMENT auth-method (#PCDATA)>
<!ELEMENT realm-name (#PCDATA)>
<!ELEMENT form-login-config (form-login-page, form-error-page)>
<!ELEMENT form-login-page (#PCDATA)>
<!ELEMENT form-error-page (#PCDATA)>
-->

</web-app>




g-greg
Le #776703
En fait il manquait Il semble que les tld soient inutiles avec les tags CORE ?
Poster une réponse
Anonyme