以前拿tomcat5.5开发的struts+spring+hibernate的程序,在tomcat5.5上可以完好运行
我想把它放在weblogic上面运行就不行了
//web.xml
<servlet>
    <servlet-name>context</servlet-name>
    <servlet-class>
       org.springframework.web.context.ContextLoaderServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
  <servlet>
    <servlet-name>ApplicationServlet</servlet-name>
    <servlet-class>com.Easyhouse.servlet.ApplicationServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
  </servlet>//ApplicationServlet中的关键代码
                        ServletContext sc=this.getServletContext();
ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(sc);
sc.setAttribute("ApplicationContext", ac);然后在
servlet中去获得的到ApplicationContext,第一次不为空,然后修改下servlet代码,得到的就为null了