• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts1

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i tried to execute the simple hellow world sample in struts in eclipse its giving me a error in web xml file stating
The processing instruction must begin with the name of the target. web.xml (path where the web xml file is placed/StrutsExample1/WebContent/WEB-INF )
please help me in decoding this error . the code of that web xml is
<?
xml version="1.0" encoding="UTF-16"?>
<
web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<
display-name>StrutsExample1</display-name>
<
servlet>
<
servlet-name>action</servlet-name>
<
servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<
init-param>
<
param-name>config</param-name>
<
param-value>/WEB-INF/struts-config.xml</param-value>
</
init-param>
<
load-on-startup>2</load-on-startup>
</
servlet>
<
servlet-mapping>
<
servlet-name>action</servlet-name>
<
url-pattern>*.do</url-pattern>
</
servlet-mapping>
<
welcome-file-list>
<
welcome-file>index.jsp</welcome-file>
</
welcome-file-list>
</
web-app>


 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kirthika iyer wrote:
<?
xml version="1.0" encoding="UTF-16"?>
<
web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<
display-name>StrutsExample1</display-name>
<
servlet>
<
servlet-name>action</servlet-name>
<
servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<
init-param>
<
param-name>config</param-name>
<
param-value>/WEB-INF/struts-config.xml</param-value>
</
init-param>
<
load-on-startup>2</load-on-startup>
</
servlet>
<
servlet-mapping>
<
servlet-name>action</servlet-name>
<
url-pattern>*.do</url-pattern>
</
servlet-mapping>
<
welcome-file-list>
<
welcome-file>index.jsp</welcome-file>
</
welcome-file-list>
</
web-app>


Are you sure this how your web.xml file looks like, then its wrongly formatted.
why there is line break after each opening tag?? I will correct first tag for you ..

And please use code tags, like I used.
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

Using a title of "struts1" in a forum completely dedicated to questions on Struts is worse than useless. What if everyone used such topic titles?

Please go back and change your post to add a more meaningful subject by clicking the
 
The only cure for that is hours of television radiation. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic