Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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:
Tim Cooke
Campbell Ritchie
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Struts
Problem in web.xml
Bhoomika Bathla
Ranch Hand
Posts: 40
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello friends
there is a web.xml as below:-
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>Hello World Struts Application</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> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <listener> <listener-class>struts.example.ApplicationScopeInit</listener-class> </listener> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <taglib> <taglib-uri>/WEB-INF/lib/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/lib/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/lib/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/lib/struts-tiles.tld</taglib-uri> <taglib-location>/WEB-INF/lib/struts-tiles.tld</taglib-location> </taglib> </web-app>
Problem is that when i use
<listener> <listener-class>struts.example.ApplicationScopeInit</listener-class> </listener>
in my web.xml then when i run applicaton it says requested resource no found else it runs the application.What is the problem in using this tag in web.xml???
Siva Masilamani
Ranch Hand
Posts: 385
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What is the listener type ?
Where did you put the compile listener class in your application ?
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
Bhoomika Bathla
Ranch Hand
Posts: 40
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The path of compiler class is :-
"WEBINF/classes/struts/example/ApplicationScopeInit.class"
what listener type you are asking for ?
Siva Masilamani
Ranch Hand
Posts: 385
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
We have lot of Listener types like ServletContextListener,ServletContextAttributeListener etc.....
Let us know the listener type you are using....if possible post your code.
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Error page configured in web.xml not working
Parsing error processing resource path /WEB-INF/struts-config.xml
Jboss 4.2.3 how to change the default datasource to oracle ?
Failed to load servlet:
error comes while running the struts application please see the source code for detail
More...