Files
yacos/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml
Jialin Wang ef43e20036
2007-12-16 15:38:33 +00:00

77 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
<!-- the application context definition for the SiteWebSpring DispatcherServlet -->
<bean name="/main.htm" class="org.yacos.web.author.controller.MainController" />
<bean name="/submissionArticleOK.htm" class="org.yacos.web.author.controller.SArticleControllerOK" />
<bean name="/submissionArticle.htm" class="org.yacos.web.author.controller.SArticleController">
<property name="sessionForm" value="true" />
<property name="commandName" value="submissionArticle" />
<property name="commandClass" value="org.yacos.web.author.form.FormSubmission" />
<property name="formView" value="submissionArticle" />
<property name="successView" value="submissionArticleFile.htm?_flowId=fileupload" />
<property name="articleManager" ref="articleManager" />
</bean>
<bean name="/choosePreference.htm" class="org.yacos.web.PCmember.controller.ChoosePreferenceControl">
<property name="commandName" value="choose"/>
<property name="commandClass" value="org.yacos.web.author.form.FormPreference" />
<property name="formView" value="choosePreference" />
<property name="successView" value="choosePreferenceOK" />
<property name="articleManager" ref="articleManager" />
</bean>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView">
</property>
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
<bean name="/submissionArticleFile.htm" class="org.springframework.webflow.executor.mvc.FlowController">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<!-- Launches new flow executions and resumes existing executions. -->
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="singlekey"/>
<!-- Creates the registry of flow definitions for this application -->
<flow:registry id="flowRegistry">
<flow:location path="/WEB-INF/fileupload.xml" />
</flow:registry>
<!--
Support for multipart requests using commons file upload
Make sure you have the commons-fileupload.jar in your classpath
-->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- Limit uploads to small (5KB) files for this sample -->
<property name="maxUploadSize" value="5120" />
</bean>
<bean id="uploadAction" class="org.yacos.web.utils.FileUploadAction" />
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="messages" />
</bean>
<jee:jndi-lookup id="articleManager" jndi-name="ArticleManagerBean/remote"
cache="true" />
</beans>