Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Java [игнор отключен] [закрыт для гостей] / Struts -> message-resources -> problem / 2 сообщений из 2, страница 1 из 1
06.08.2006, 03:56
    #33901632
NewNoob
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Struts -> message-resources -> problem
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
06.08.2006, 04:10
    #33901633
NewNoob
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Struts -> message-resources -> problem
нашел =)

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


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