UserDao怎么写的
好像为sessionFactory提供的setter方法有问题
好像为sessionFactory提供的setter方法有问题
解决方案 »
- web工程导入后,工程名上有两个地球图标,是怎么回事?
- org.hibernate.MappingException: Dialect does not support identity key generation
- oracle 与hibernate
- hql 语句问题
- jboss 启动不了,出现如下错误!!!
- 严重的tomcat问题!紧急求助!!!
- 在线求教关于jtable的刷新和删除
- 关于eclipse2.1的一个菜鸟问题.
- 新手一问?关于J2EE的的搭建!
- 启动J2EE1.4的问题----急切希望得到大家帮助!!!!!!
- (附建议)hibernate中的session问题,项目中绝对会碰上
- XML的内部参数实体
struts让spring来管理action的时候的配置~~??
/user放在spring里,Actioclass不是对应的..Action?我用的时候是
首先在web.xml中配置:<servlet>标签上面:
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
然后在struts-config.xml里面:<message-resources/>上面
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.AutowiringRequestProcessor" />
</controller>
这个意思就是让spring来管理action
action的配置就放在struts中,不用在applicationContext.xml中再配置
比如我在struts-config.xml中:
直接 <action attribute="userForm" input="/userEdit.jsp"
name="userForm" path="/userEdit" scope="request"
type="com.qust.struts.action.UserEditAction">
<forward name="success" path="/userDetail.jsp" />
</action>
这个/userEdit就不用在applicationContext.xml中再配置了呵呵~~
我也是刚学不久~~
不知道能不能帮上你的忙~~
<action-mappings >
<action name="userForm" path="/register" scope="request">
<forward name="failuer" path="/failuer.jsp" redirect="false"/>
<forward name="success" path="/success.jsp" redirect="false"/>
</action>
</action-mappings>
action对应的类在哪?
需要用代理:
for instance:path="/user"
type="org.springframework.web.struts.DelegatingActionProxy"
2UserDao的sessionFactory有没set方法?