Back Forum Reply New

error:No WebApplicationContext found

Hi every body,
i am working on eclipse, Jboss
i am getting following error when trying to access index page

my web.xml code is as follows
please inform wher i am going wrong::
right now i am having only springapp-servlet.xml

//web.xml

lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'dtd/web-app_2_3.dtd'gt;

lt;web-appgt;   lt;servletgt;
lt;servlet-namegt;springapplt;/servlet-namegt;
lt;servlet-classgt;
org..web.servlet.DispatcherServlet
lt;/servlet-classgt;
lt;load-on-startupgt;1lt;/load-on-startupgt;
lt;/servletgt;lt;servlet-namegt;springapplt;/servlet-namegt;
lt;ucl-patterngt;*.htmlt;/ucl-patterngt;
lt;/servlet-mappinggt;

lt;welcome-file-listgt;
lt;welcome-filegt;index.jsplt;/welcome-filegt;
lt;/welcome-file-listgt;                                    
lt;taglibgt;
lt;taglib-urigt;/springlt;/taglib-urigt;
lt;taglib-locationgt;/WEB-INF/spring.tldlt;/taglib-locationgt;
lt;/taglibgt;

lt;/web-appgt;java.lang.IllegalStateException: No WebApplicationContext found: not in a DispatcherServlet request?
org..web.servlet.support.RequestCon  textUtils.getWebApplicationContext(RequestContextU  tils.java:79)
org..web.servlet.support.RequestCon  textUtils.getWebApplicationContext(RequestContextU  tils.java:56)
org..web.servlet.support.RequestCon  text.lt;initgt;(RequestContext.java:92)
org..web.servlet.support.RequestCon  text.lt;initgt;(RequestContext.java:78)
org..web.servlet.tags.RequestContex  tAwareTag.doStartTag(RequestContextAwareTag.java:8  5)
org.apache.jsp.jsp.index_jsp._jspService(org.apach  e.jsp.jsp.index_jsp:96)
org.apache.jasper.runtime.fromJspBase.service(from  JspBase.java:97)
javax.servlet.from.fromServlet.service(fromServlet  .java:810)
org.apache.jasper.servlet.JspServletWrapper.servic  e(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFil  e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe  rvlet.java:264)
javax.servlet.from.fromServlet.service(fromServlet  .java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF  ilter(ReplyHeaderFilter.java:81)

Hi kasibhat,

Two very basic questions:

1) You do have a WEB-INF/springapp-servlet.xml file, right?

2) Was that a copy-paste error in your web.xml? You are missing the start tag for the lt;servlet-mappinggt;. I am assuming that this is not the problem or else I would think you would not be getting as far as you are.

-Arthur Loder
¥
Back Forum Reply New