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

Struts 1 Java Discussion :

Gros Problème struts


Sujet :

Struts 1 Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Inscrit en
    Avril 2011
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 12
    Par défaut Gros Problème struts
    Bonjour,
    J'ai une erreur à l'exécution du serveur, voici le message d'erreur :

    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
    org.apache.jasper.JasperException: L'uri absolue: <a href="http://struts.apache.org/tags-logic" target="_blank">http://struts.apache.org/tags-logic</a> ne peut être résolu dans le fichier web.xml ou dans les fichiers jar déployés avec cette application
    	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    	org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
    	org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:149)
    	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386)
    	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:450)
    	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1397)
    	org.apache.jasper.compiler.Parser.parse(Parser.java:130)
    	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
    	org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
    	org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
    	org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
    	org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
    	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Merci de votre aide.

  2. #2
    Membre émérite Avatar de noOneIsInnocent
    Homme Profil pro
    Inscrit en
    Mai 2002
    Messages
    1 037
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2002
    Messages : 1 037
    Par défaut
    Bonjour

    est-ce que tu peux poster le code de ta JSP puis le fichier web.xml stp ?

  3. #3
    Membre averti
    Homme Profil pro
    Inscrit en
    Avril 2011
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 12
    Par défaut
    Merci d'avoir répondu voilà mon code :

    web.xml

    Code xml : 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
    <?xml version="1.0" encoding="UTF-8"?>
     
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		 xmlns="http://java.sun.com/xml/ns/javaee"
    		 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    		 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    		 id="WebApp_ID" version="2.5">
     
    <display-name>strutsExample</display-name>
     
    <servlet>
    	<servlet-name>action</servlet-name>
    	<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    	<init-param>
    		<param-name>config</param-name>
    		<param-value>/WEB-INF/struts-config.xml</param-value>
    	</init-param>
    	<load-on-startup>2</load-on-startup>
    </servlet>
     
    <servlet-mapping>
    	<servlet-name>action</servlet-name>
    	<url-pattern>*.do</url-pattern>
    </servlet-mapping> 
     
    <welcome-file-list>
    	<welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
     
     
    </web-app>



    index.jsp

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
     
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
     
    <logic:redirect forward="helloWorld"/>


    helloWord.jsp

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
     
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Hello World</title>
    </head>
    <body>
    <bean:write name="helloWorldForm" property="message"/>
    </body>
    </html>

  4. #4
    Membre averti
    Homme Profil pro
    Inscrit en
    Avril 2011
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 12
    Par défaut
    voici l'arborescence de mon projet en pièce jointe :
    Images attachées Images attachées  

  5. #5
    Expert confirmé

    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
    Par défaut
    Les uri définies dans les directives taglib sont celles de Struts 1.3.
    Est-ce bien la version de Struts que tu utilises ?

  6. #6
    Membre averti
    Homme Profil pro
    Inscrit en
    Avril 2011
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 12
    Par défaut
    Dans le struts-config.xml c'est indiqué 1.2 ?

    voici le code :

    Code xml : 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
    <?xml version="1.0" encoding="UTF-8" ?>
     
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
     
     
    <struts-config>
        <form-beans>
            <form-bean name="HelloWorldActionForm" type="com.vaannila.HelloWorldActionForm"/>
     
        </form-beans>
     
        <global-exceptions>
     
        </global-exceptions>
     
        <global-forwards>
            <forward name="welcome"  path="/Welcome.do"/>
        </global-forwards>
     
        <action-mappings>
            <action input="/index.jsp" name="HelloWorldActionForm" path="/HelloWorld" scope="session" type="com.vaannila.HelloWorldAction">
                <forward name="success" path="/helloWorld.jsp" />
            </action>
            <action path="/Welcome" forward="/welcomeStruts.jsp"/>
        </action-mappings>
     
        <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
     
        <message-resources parameter="com/vaannila/ApplicationResource"/>
     
        <!-- ========================= Tiles plugin ===============================-->
        <!--
        This plugin initialize Tiles definition factory. This later can takes some
        parameters explained here after. The plugin first read parameters from
        web.xml, thenoverload them with parameters defined here. All parameters
        are optional.
        The plugin should be declared in each struts-config file.
        - definitions-config: (optional)
        Specify configuration file names. There can be several comma
        separated file names (default: ?? )
        - moduleAware: (optional - struts1.1)
        Specify if the Tiles definition factory is module aware. If true
        (default), there will be one factory for each Struts module.
        If false, there will be one common factory for all module. In this
        later case, it is still needed to declare one plugin per module.
        The factory will be initialized with parameters found in the first
        initialized plugin (generally the one associated with the default
        module).
        true : One factory per module. (default)
        false : one single shared factory for all modules
        - definitions-parser-validate: (optional)
        Specify if xml parser should validate the Tiles configuration file.
        true : validate. DTD should be specified in file header (default)
        false : no validation
     
        Paths found in Tiles definitions are relative to the main context.
        -->
        <plug-in className="org.apache.struts.tiles.TilesPlugin" >
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
            <set-property property="moduleAware" value="true" />
        </plug-in>
     
        <!-- ========================= Validator plugin ================================= -->
        <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
            <set-property
                property="pathnames"
                value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
        </plug-in>
     
    </struts-config>

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Lecture de FichierXML] <--Gros problème
    Par waldo2188 dans le forum Entrée/Sortie
    Réponses: 3
    Dernier message: 18/03/2005, 17h15
  2. gros problème id
    Par Sékiltoyai dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 20/12/2004, 11h53
  3. Gros problème avec la facturation de Tiscali
    Par Harry dans le forum Dépannage et Assistance
    Réponses: 5
    Dernier message: 21/10/2004, 18h55
  4. Gros problème de session/cookies
    Par valfredr dans le forum XMLRAD
    Réponses: 18
    Dernier message: 03/06/2004, 09h21
  5. Gros Problème avec DirectShow et la méthode RELEASE
    Par Olivier Delmotte dans le forum DirectX
    Réponses: 3
    Dernier message: 10/03/2003, 18h10

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