spring-webflow

How to use multiple ViewResolvers in Spring?

南楼画角 提交于 2019-11-28 16:34:59
I am working on a web app where I have most of my pages making use of apache tiles (2.1.2), but a few of them need to just be plain jsps. I am having a problem in that both an InternalResourceViewResolver and a UrlBasedViewResolver will try to resolve the view no matter what, so that no matter which ordering I use, it will either fail on the plain JSP pages, or on the tiles pages. Here is the config: <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/> <property

getting error missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem

淺唱寂寞╮ 提交于 2019-11-28 14:11:48
I am trying to setup Maven, JSF and Primefaces project. But when i run the project i get the following error com.sun.faces.config.ConfigurationException: Source Document: jar:file:/D:/Personal%20Work/eclipse%2032%20Bit/workspace/Java%20EE /Spring/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps /ch18_SpringWebFlowAndJSF/WEB-INF/lib/primefaces-3.5.jar!/META-INF/faces-config.xml Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload /FileItem Here is my POM snippet

Catch “dead” session in Spring webflow

[亡魂溺海] 提交于 2019-11-28 11:17:09
问题 I want to catch the exception thrown when I loose my session, not only because a session timeout (for reports for example). Also I want that this handler will handle only that specific exception and will not be a global exceptions handler or any thing like this. Basically, I want to catch exception org.springframework.web.HttpSessionRequiredException . 回答1: With any of the proposed solutions below you should be able to handle the exceptions and perform logic on them. Possible Solutions: 1.

Printing log from flow.xml

本小妞迷上赌 提交于 2019-11-28 10:50:58
问题 I am working on a web application with spring web flow. While I am working on a flow.xml file I have get a decision state on it like this - <decision-state id="checkPermissin"> <if test="requestParameters.canApprove" then="approve" else="warning" /> </decision-state> When a request comes to the flow.xml then it get the request parameter canApprove from it and test whether it is true or false. Then it goes to the either of approve or warning state. My question is - can I log/print the status

Spring webflow - how to pass the session in evaluate expression?

旧时模样 提交于 2019-11-28 08:51:34
问题 I'm using spring webflow, but I need to access my HttpSession in a method that's accessed using a transition ==> evaluate expression. (so in the xml file containing my flow) So far I've yet to find a way to actually pass it to my method. I've taken a look at the flowrequestcontext but so far I haven't found a way yet. 回答1: I think you don't need to pass it as soon as you pass the RequestContext. You can try this: public class MyAction extends MultiAction{ public Event myMethod(RequestContext

Web flow add model attribute for binding with form values

試著忘記壹切 提交于 2019-11-28 05:48:15
问题 I'm new to web flow, so I'm not sure how to do this: I have a spring mvc controller, and I have a spring webflow. One of the flow states is supposed to display a form for adding a new client. In the controller I have methods for saving the Client object (binded to the form as modelAttribute = "client") to the database. I don't know how to pass the control from the webflow to the controller and back or create a model Attribute directly in the flow for binding with the form (but as I understand

How to use multiple ViewResolvers in Spring?

寵の児 提交于 2019-11-27 19:56:32
问题 I am working on a web app where I have most of my pages making use of apache tiles (2.1.2), but a few of them need to just be plain jsps. I am having a problem in that both an InternalResourceViewResolver and a UrlBasedViewResolver will try to resolve the view no matter what, so that no matter which ordering I use, it will either fail on the plain JSP pages, or on the tiles pages. Here is the config: <bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver

Login/logout in REST with Spring 3

淺唱寂寞╮ 提交于 2019-11-27 16:48:37
We are developing RESTful webservices with Spring 3 and we need to have the functionality of login/logout, something like /webservices/login/<username>/<password>/ and /webservices/logout . The session should be stored in the context until the session is timed out or logged out to allow consumption of other webservices. Any request to access webservices without session information should be rejected. Looking for state-of-the-art solution for this scenario. I am actually resurrecting the question asked here Spring Security 3 programmatically login , which is still not properly answered. Please

Login/logout in REST with Spring 3

浪尽此生 提交于 2019-11-27 04:09:37
问题 We are developing RESTful webservices with Spring 3 and we need to have the functionality of login/logout, something like /webservices/login/<username>/<password>/ and /webservices/logout . The session should be stored in the context until the session is timed out or logged out to allow consumption of other webservices. Any request to access webservices without session information should be rejected. Looking for state-of-the-art solution for this scenario. I am actually resurrecting the

Grails unable to install plugin

拈花ヽ惹草 提交于 2019-11-26 13:49:01
I am trying to install webflow plugin version with my grails 1.3.9 version. I have tried the following thing., Using command grails intall-plugin webflow 1.3.8 Result was : org.grails#grails-webflow;1.3.8: not found Modifying buildConfig file and adding the line plugins { compile ":webflow:1.3.8" When running app result was: UNRESOLVED DEPENDENCIES org.grails.plugins#webflow;1.3.8: not found I don't know what else to try. Please help. Zoidberg The repository changed and it's causing problem for older Grails versions. See my answer at: Grails Url shortener plugin not getting installed : Please