开发者

JSTL doctype without internet connection

开发者 https://www.devze.com 2022-12-08 21:49 出处:网络
I was using a properties.xml file which i stored with java.util.properties storeToXML. but storeToXML always set a doctype like:

I was using a properties.xml file which i stored with java.util.properties storeToXML.

but storeToXML always set a doctype like:

<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/proper开发者_运维技巧ties.dtd">

now i use JSTL XML to check for the properties:

<c:import url="${settingsPath}" var="xml" />
<x:parse xml="${xml}" var="doc" />
<x:choose>
    <x:if select="$doc/properties/entry[@key='foo'] = 'true'">
      <!-- do something -->
    </x:if>
</x:choose>

but I want to use this without an internet connection. but then i get the error:

org.apache.jasper.JasperException: javax.servlet.jsp.JspException: java.sun.com


A usable workaround might be to replace the doctype property by the proper doctype after the xml data has been generated.

0

精彩评论

暂无评论...
验证码 换一张
取 消