달력

32024  이전 다음

  • 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 translator'에 해당되는 글 1건

  1. 2007.10.11 Resin 2.x 버전과 3.0.x 버전대에서 Ibatis 사용시 XML 파싱 못할때...

resin.conf에 아래와 같이 추가해주던가....

    <system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" />
    <system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl" />
    <system-property javax.xml.transform.TransformerFactory="org.apache.xalan.processor.TransformerFactoryImpl" />
    <system-property org.xml.sax.driver="org.apache.xerces.parsers.SAXParser" />


아니면 다음과 같이 리스너를 구현한다.

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class XmlTranslateListener implements ServletContextListener {

 public void contextInitialized(ServletContextEvent arg0) {
 
  System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
  System.setProperty("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");
  System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xalan.processor.TransformerFactoryImpl");
  System.setProperty( "org.xml.sax.driver",  "org.apache.xerces.parsers.SAXParser" );
 }
   

 public void contextDestroyed(ServletContextEvent arg0) {
  // TODO Auto-generated method stub

 }

}

Posted by tornado
|