powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Struts -> message-resources -> problem
2 сообщений из 2, страница 1 из 1
Struts -> message-resources -> problem
    #33901632
NewNoob
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Struts: 1.2.4
Tomcat: 5.0.28

-----------------------------------------------------------------
Ошибка:
SEVERE: Parse Error at line 54 column 66: Element type "message-resources" must be declared.
org.xml.sax.SAXParseException: Element type "message-resources" must be declared.
..................
..................
SEVERE: Parse Error at line 57 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-forwards?,action-mappings?)".
org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-forwards?,action-mappings?)".
-----------------------------------------------------------------

struts-config.xml:
Код: plaintext
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.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config  PUBLIC 
        "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
        "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>

    <data-sources>
        <data-source type="org.apache.commons.dbcp.BasicDataSource">
            <set-property
                    property="driverClassName"
                    value="com.mysql.jdbc.Driver" />
            <set-property
                    property="url"
                    value="jdbc:mysql://localhost/test" />
            <set-property
                    property="username"
                    value="root" />
            <set-property
                    property="password"
                    value="" />
            <set-property
                    property="maxActive"
                    value="10" />
            <set-property
                    property="maxWait"
                    value="5000" />
            <set-property
                    property="defaultAutoCommit"
                    value="false" />
            <set-property
                    property="defaultReadOnly"
                    value="false" />
            <set-property
                    property="validationQuery"
                    value="SELECT COUNT(*) FROM tasks" />
        </data-source>
    </data-sources>

    <form-beans>
        <form-bean name="AddingDataForm" type="app.AddingDataForm"/>
    </form-beans>

    <action-mappings>
        <action path="/addingdata"
                type="app.AddingDataAction"
                name="AddingDataForm"
                validate="true"
                input="/addingdata.jsp">
            <forward name="AddingData" path="/addingdata.jsp"/>
            <forward name="failure" path="/failure.html"/>
        </action>
    </action-mappings>

    <message-resources parameter="properties.MessageResources" />

</struts-config>

Чё то ему не нравица как я объявляю message-resources .
Если message-resources закоментить, то не ругаеца =)
Подскажите в чем трабла. Спасибо.
...
Рейтинг: 0 / 0
Struts -> message-resources -> problem
    #33901633
NewNoob
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
нашел =)

авторMost probably its the wrond struts version...you cannot use message resources in struts i.0, might want to change the head of the struts-config.xml to

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

помогло =)
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Struts -> message-resources -> problem
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]