brajnandan
brajnandan

Reputation: 21

Getting warning while using struts.xml file.

I am using Struts2.0. When i am writting a program, in struts.xml file getting warning "the file cannot be validated as there was a connection problem " at the line:-" !DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd" "

When i am executing the application first page is loaded but after submitting,the next page is not loaded and showing error like: "The requested resource (/TestProject/login) is not available."

I am using struts2.0,Tomcat6.0, and including jar files are :

  1. commons-logging-1.1
  2. freemarker-2.3.8
  3. ognl-2.6.11
  4. struts2-core-2.0.6
  5. xwork-2.0.1

plz help me why this error is coming either due to warning or some other reason.

Upvotes: 0

Views: 8816

Answers (1)

mprabhat
mprabhat

Reputation: 20323

The first error may be because your project is not able to find tld's.

-Check your sturts-core.jar contains struts-2.0.dtd -Your struts.xml starts like this

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

Second error is because when you are deploying your application and struts.xml is not getting deployed, seems you are using eclipse and your struts.xml is in resources folder.

Ensure that your resources folder is added in the src directories,

Project - > Build Path - > Configure Build Path - > Source (If resources is not present here click on Add Folder and select Resources.

If you are just starting with Struts, please upgrade to latest version which is Struts2.3

Upvotes: 2

Related Questions