2013-12-19 3 views
-1

나는구문 분석 오류

심각한-config.xml에 스트럿 내에서 다음과 같은 오류를 얻고있다 DOCTYPE 루트 "양식 유효성 검증". org.xml.sax.SAXParseException; systemId : jndi : /localhost/SSH/WEB-INF/struts-config.xml; lineNumber : 6; columnNumber : 16; 문서 루트 요소 "스트럿-설정은"DOCTYPE 루트 "폼 validaton 일치해야

XML을 :

<?xml version="1.0" encoding="UTF-8"?> 
     <!DOCTYPE form-validation PUBLIC 
       "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd"> 
     <struts-config> 
     <form-beans> 
     <form-bean name="sform" type="org.apache.struts.action.DynaActionForm"> 
     <form-property name="sid" type="java.lang.String"/> 
     </form-bean> 
     </form-beans> 
     <global-exceptions/> 
     <global-forwards/> 
     <action-mappings> 
     <action path="/sidSubmit" name="sform" 
     type="org.springframework.web.struts.DelegatingActionProxy" 
     scope="request" 
     input="/search.jsp"> 
     <forward name="search" path="/search.jsp"/> 
     </action> 
     </action-mappings> 
     <message-resources parameter="com.xxx.xxx.Application"></message-resources> 
     <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> 
     <set-property property="contextConfigLocation" value="/WEB-INF/studentContext.xml"/> 
     </plug-in> 
     </struts-config> 

답변

1

당신이 함께이 파일을 붙여 복사나요 그것은 양식 유효성 검사에 관한 DOCTYPE을 선언하지만에 대한 구성을 포함? 스트럿츠 1.x에서 웹 응용 프로그램

사용 (the spec에서) 스트럿츠 설정 파일에 대한 올바른 DOCTYPE :.

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

스트럿츠 가정 여기에서 1.3.x를 사용하면 DOCTYPE 선언에서 참조 된 버전을 변경해야 할 수도 있습니다.

관련 문제