iteye_7916
2010-01-25 17:38
浏览 270
已采纳

在strus-config.xml中添加contextConfigLocation value=”applicationContext.xml“ 报错

在struts-config.xml中加上“,/WEB-INF/applicationContext.xml”,则可以关联删除,去除则报错
deleted object would be re-saved by cascade

struts-config.xml配置部分如下:
[code="xml"]
className="org.springframework.web.struts.ContextLoaderPlugIn">
value="/WEB-INF/action-servlet.xml,/WEB-INF/applicationContext.xml" />

[/code]

web.xml如下:[code="java"]<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

jmesaPreferencesLocation
WEB-INF/jmesa.properties


Set Character Encoding
filters.SetCharacterEncodingFilter

encoding
GBK



pagefilter
com.page.PageFiter

  <filter>
<filter-name>AuthorSession</filter-name>
<filter-class>filters.AuthorSessionFilter</filter-class>



AuthorSession
.jsp


AuthorSession
.do


hibernateFilter
filters.OpenSessionInViewFilter
<!-- org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
-->


hibernateFilter
.do



Set Character Encoding
/


pagefilter
*.do


org.springframework.web.context.ContextLoaderListener


action
org.apache.struts.action.ActionServlet

config
/WEB-INF/struts-config.xml


debug
3


detail
3


application
ApplicationResources.properties

0


ImageServlet
net.sf.jasperreports.j2ee.servlets.ImageServlet


action
*.do


ImageServlet
/servlets/image


login.jsp



/tld/jmesa.tld
/WEB-INF/tld/jmesa.tld



BASIC


[/code]

staff.xml配置:[code="java"]<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">



员工






组织ID




上级ID




员工编号,组织为每个员工派发的号码




员工姓名




员工类型











员工ID






[/code]

sysUser.xml如下[code]









[/code]

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

6条回答 默认 最新

相关推荐 更多相似问题