IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Servlets/JSP Java Discussion :

taglib qui arrête le chargement de ma jsp


Sujet :

Servlets/JSP Java

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    90
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 90
    Points : 56
    Points
    56
    Par défaut taglib qui arrête le chargement de ma jsp
    Bonjour,
    voilà aujourd'hui j'ai hérité d'un application struts utilisant spring security

    server web : weblogic 8.1

    mon appli marche sous mon weblo qui est sous windows
    mais sous mon weblo qui tourne sous unix, arriver à la première page une section (tiles:insert) ne se charge pas et bloque le chargement du reste de la page.

    après nettoyage de cette section j'en suis arrivé à :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
    <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
    <%@ taglib uri="/WEB-INF/tld/struts-layout.tld" prefix="layout"%>
    <%@ taglib uri="/WEB-INF/tld/security.tld" prefix="security"%>
    
    <html:html>
    <head>
    	<title>TUTU</title>
    </head>
    <body >
    </body>
    </html:html>
    qui ne fonctionne pas sous server weblo sous unix

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
    <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
    <%@ taglib uri="/WEB-INF/tld/struts-layout.tld" prefix="layout"%>
     
    <html:html>
    <head>
    	<title>TUTU</title>
    </head>
    <body >
    </body>
    </html:html>
    qui fonctionne


    j'ai aucun log, aucun message d'erreur, juste la page qui ne se charge pas.

    j'ai bien mon fichier security.tld dans le répertorie /WEB-INF/tld/(et le fait que ca marche sous windows me fait dire que mon war est correcte)

    bref je ne comprend pas ce qui peux se passer....

    quelqu'un a t' ldéja eu un problème analogue ??

    merci

    je vous copie mon security.tld des fois que ....

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
     
     
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
            PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
            "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    	<tlib-version>1.0</tlib-version>
    	<jsp-version>1.2</jsp-version>
    	<short-name>security</short-name>
    	<uri>http://www.springframework.org/security/tags</uri>
    	<description>
            Spring Security Authorization Tag Library
    	</description>
     
    	<tag>
    		<name>authorize</name>
    		<tag-class>org.springframework.security.taglibs.authz.AuthorizeTag</tag-class>
    		<description>
                A simple tag to output or not the body of the tag if the principal
                has or doesn't have certain authorities.
    		</description>
     
    		<attribute>
    			<name>ifNotGranted</name>
    			<required>false</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    A comma separated list of roles which the user must not have
                    for the body to be output.
    			</description>
    		</attribute>
     
    		<attribute>
    			<name>ifAllGranted</name>
    			<required>false</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    A comma separated list of roles which the user must all
                    possess for the body to be output.
    			</description>
    		</attribute>
     
    		<attribute>
    			<name>ifAnyGranted</name>
    			<required>false</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    A comma separated list of roles, one of which the user must
                    possess for the body to be output.
    			</description>
    		</attribute>
    	</tag>
     
        <tag>
            <name>authentication</name>
            <tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
            <description>
                Allows access to the current Authentication object.
            </description>
     
            <attribute>
                <name>property</name>
                <required>true</required>
                <rtexprvalue>true</rtexprvalue>
                <description>
                    Property of the Authentication object which should be output. Supports nested
                    properties. For example if the principal object is an instance of UserDetails,
                    te property "principal.username" will return the username. Alternatively, using
                    "name" will call getName method on the Authentication object directly.
                </description>
            </attribute>
            <attribute>
                <name>var</name>
                <required>false</required>
                <rtexprvalue>false</rtexprvalue>
                <description>
                    Name of the exported scoped variable for the
                    exception thrown from a nested action. The type of the
                    scoped variable is the type of the exception thrown.
                </description>
            </attribute>
            <attribute>
                <name>scope</name>
                <required>false</required>
                <rtexprvalue>false</rtexprvalue>
                <description>
                    Scope for var.
                </description>
            </attribute>
        </tag>
     
    	<tag>
    		<name>acl</name>
    		<tag-class>org.springframework.security.taglibs.authz.AclTag</tag-class>
    		<description>
                Allows inclusion of a tag body if the current Authentication
    			has one of the specified permissions to the presented
    			domain object instance. This tag uses the first AclManager
    			it locates via
    			WebApplicationContextUtils.getRequiredWebApplicationContext(HttpServletContext).
    		</description>
     
    		<attribute>
    			<name>hasPermission</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    A comma separated list of integers, each representing a
    				required bit mask permission from a subclass of
                    org.springframework.security.acl.basic.AbstractBasicAclEntry.
                </description>
    		</attribute>
    		<attribute>
    			<name>domainObject</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    The actual domain object instance for which permissions
    				are being evaluated.
    			</description>
    		</attribute>
    	</tag>
     
    	<tag>
    		<name>accesscontrollist</name>
    		<tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
    		<description>
                Allows inclusion of a tag body if the current Authentication
    			has one of the specified permissions to the presented
    			domain object instance.
    		</description>
     
    		<attribute>
    			<name>hasPermission</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    A comma separated list of integers, each representing a
    				required bit mask permission from a subclass of
                    org.springframework.security.acl.basic.AbstractBasicAclEntry.
                </description>
    		</attribute>
    		<attribute>
    			<name>domainObject</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    			<description>
                    The actual domain object instance for which permissions
    				are being evaluated.
    			</description>
    		</attribute>
    	</tag>
     
    </taglib>

  2. #2
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    As-tu le même souci si, dans la jsp, tu références la tld via son uri :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <%@ taglib uri="http://www.springframework.org/security/tags" prefix="security"%>
    Modératrice Java - Struts, Servlets/JSP, ...

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    90
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 90
    Points : 56
    Points
    56
    Par défaut
    merci de ta réponse

    alors oui j'ai le même pb avec
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <%@ taglib uri="http://www.springframework.org/security/tags" prefix="security"%>
    alors je me suis amusé a supprimer 1 à 1 tous les <tag> du security.tld et il s'avère que c'est le
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <tag>
            <name>authentication</name>
    ...
    qui est la cause de mon problème.
    si je le commente la page d'affiche correctement (la jps n'utilise pas de security:authentication)


    dans mon WEB-INF/lib j'ai pourtant spring-security-taglibs-2.0.2.jar avec
    org.springframework.security.taglibs.authz.AuthenticationTag dedans....

    je ne comprend pas trop

  4. #4
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Quelle version de J2EE utilises-tu ?
    Modératrice Java - Struts, Servlets/JSP, ...

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    90
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 90
    Points : 56
    Points
    56
    Par défaut
    je suis sous weblo 8.1
    donc jdk 1.42.08

    mais le fait que ca marche sous win et pas sous unix, je me demande si c'est pas un problème dans mon weblo.
    qui a peut être 2 entré pour la classe org.springframework.security.taglibs.authz.AuthenticationTag

    je fouille dans mon weblo pourtant ...

  6. #6
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    En fait, je parlais de la version de J2EE, soit plus précisément les versions de JSP et de Servlets.
    Pour le savoir, il faudrait donner le début du web.xml.

    Sinon, le fait d'avoir deux jars de Spring, un dans ton appli et un sur le serveur, est une piste possible mais dans ce cas, il ne devrait pas planter seulement sur un tag en particulier.

    As-tu regardé s'il y avait un jar de Spring sur le serveur Weblogic sous Unix ?
    Modératrice Java - Struts, Servlets/JSP, ...

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    90
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 90
    Points : 56
    Points
    56
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    <?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 id="web-app">
    	<context-param>
    quand au jar, j'ai bien regardé sous unix, et j'ai rien vu, excepté le jar de mon war éclaté.
    De plus je ne comprend pas pourquoi j'ai pas de trace/log lorsque ca plante.

  8. #8
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Tu es donc en J2EE 1.3 (JSP 1.2/Servlet 2.3), ce qui semble être la version supportée par Weblogic 8.1.

    Désolée mais je ne vois pas ce qui peut provoquer ce dysfonctionnement.
    Modératrice Java - Struts, Servlets/JSP, ...

Discussions similaires

  1. Arrêt du chargement après le script ?
    Par ZaRnO-56 dans le forum Langage
    Réponses: 3
    Dernier message: 08/08/2008, 14h18
  2. Réponses: 13
    Dernier message: 27/11/2007, 11h06
  3. Affichage de données au chargement d'une jsp
    Par xino972 dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 24/06/2007, 11h39
  4. [Système] exec() qui bloque le chargement de page sous IE
    Par Ryan Sheckler dans le forum Langage
    Réponses: 6
    Dernier message: 09/01/2007, 22h02
  5. [Custom Tags] taglib qui teste le résultat d'une taglib
    Par emilie_caroline dans le forum Taglibs
    Réponses: 13
    Dernier message: 01/12/2006, 15h38

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo