I'm trying to build a simple Struts2 application which validates user input making sure the user does not input blank username/ pw. The application runs correctly until it comes to the actual validation. If the user enters a blank value the validation is ignored and the SUCCESS action is rendered. It does not even seem to recognize the xml validator (RequiredTestAction-validation.xml).
I'm using Struts2.3.4 library in Netbeans 7.3. I tried to include themain code components for the application. Please let me know if I need to include any more information.
The following excerpt from the stack trace tells me I'm missing a TLD or using the wrong library, but I really don't know where to obtain the missing TLD since I'm using the latest
Struts libary for my
IDE?
Caused by: java.io.FileNotFoundException:
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1623)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1271)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1238)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:260)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1153)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1049)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:962)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
Would really appreciate any advice in case I have not structured or coded this correctly.
WEB-INF/classes/app08a/RequiredTestAction
WEB-INF/classes/app08a/RequiredTestAction-validation.xml
WEB-INF/classes/struts.xml
/WEB-INF/web.xml
/jsp/Required.jsp