[Javalist] Spring XML parzolasi hiba

Gábor Garami gabor.garami at hron.me
2012. Aug. 11., Szo, 23:13:18 CEST


Es tenyleg. Nagyon koszonom.

Kozben kiderult, h volt meg egy huba az XML-ben, azt is javitottam
(defaultErrorView).

Garami Gábor
E-mail: gabor.garami at hron.me
Tel: +36 20 235 9621
MSN: hrgy at vipmail.hu
Skype: hron84


2012/8/11 Viczián István <viczian.istvan at gmail.com>:
> A value nélküli a jó, tehát amit írsz, csak a property alatt egyből a map.
> --
> Viczián István
>
>
> On Sat, Aug 11, 2012 at 10:30 PM, Gábor Garami <gabor.garami at hron.me> wrote:
>> Sziasztok,
>>
>> Megint valami egyszerut nezek be szerintem. Ez mar az otodik
>> probalkozasom ezzel az XML snippettel, es mar eluntam a
>> kiserletezgetest:
>>
>>     <bean id="exceptionResolver"
>> class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
>>         <property name="defaultErrorView">error.jspx</property>
>>         <property name="exceptionMappings">
>>             <value>
>>                 <map>
>>                     <entry key=".NoResultException" value="notFound.jspx"/>
>>                 </map>
>>             </value>
>>         </property>
>>
>>     </bean>
>>
>> Keptelen vagyok ravenni a Springet, hogy az exceptionMappings
>> property-t _felparzolja_. Mindig ezt kapom:
>>
>> org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element
>> 'property' cannot have character [children], because the type's
>> content type is element-only.
>>
>> Mivel mar az otodik variaciot probalom ki rajta, feladtam. Ha valaki
>> tudna konkretan ehhez mukodo peldat hozni, az jo lenne, ha nem: hogy
>> lehet egy mapet megadni xml-ben? Java-bol elobb feltoltenem ezt a
>> nyuves parametert, mint xml-bol...
>>
>> Amiket emlekszem, hogy probaltam:
>>  - <props><prop></prop></props>
>>  - ugyanezt <value>-ban
>>  - siman megadni a mapet
>>  - a fenti
>>  - az otodik mar nem tudom, mi volt.
>>
>> Hatha ez is kell:
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>        xmlns:p="http://www.springframework.org/schema/p"
>>        xmlns:context="http://www.springframework.org/schema/context"
>>        xmlns:mvc="http://www.springframework.org/schema/mvc"
>>        xmlns:aop="http://www.springframework.org/schema/aop"
>>        xmlns:tx="http://www.springframework.org/schema/tx"
>>        xsi:schemaLocation="
>>             http://www.springframework.org/schema/beans
>>             http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>>             http://www.springframework.org/schema/context
>>             http://www.springframework.org/schema/context/spring-context-3.0.xsd
>>             http://www.springframework.org/schema/mvc
>>             http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
>>             http://www.springframework.org/schema/aop
>>             http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
>>             http://www.springframework.org/schema/tx
>>             http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
>>
>> Elore is kosz,
>>
>> Garami Gábor
>> E-mail: gabor.garami at hron.me
>> Tel: +36 20 235 9621
>> MSN: hrgy at vipmail.hu
>> Skype: hron84
>> _______________________________________________
>> Javalist mailing list
>> Javalist at lists.javaforum.hu
>> http://lists.javaforum.hu/mailman/listinfo/javalist
> _______________________________________________
> Javalist mailing list
> Javalist at lists.javaforum.hu
> http://lists.javaforum.hu/mailman/listinfo/javalist


További információk a(z) Javalist levelezőlistáról