| Author |
Message |
|
|
Hi Hans,
The .war file is a bit to heavy to post, if you still need it, then pm me and we'll find another solution to get it across.
regards,
Gunther
|
 |
|
|
Hi Martin,
Although I haven't tried it, you could probably build the example with just the latest official versions of webflow and icefaces.
If you get the webflow-example running, you need to remove the following two jars from the lib-directory in your war : com.springsource.com.sun.faces.jar and com.springsource.javax.faces.jar. Then copy in backport-util-concurrent.jar, commons-fileupload.jar, icefaces.jar, icefaces-comps.jar, icefaces-facelets.jar, jsf-api-1.2.jar and jsf-impl-1.2.jar from the latest icefaces release. Then, adapt your web.xml to the following :
Code:
<!-- The master configuration file for this Spring web application -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/config/web-application-config.xml
</param-value>
</context-param>
<!-- Use JSF view templates saved as *.xhtml, for use with Facelets -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Enables special Facelets debug output during development -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Causes Facelets to refresh templates during development -->
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>1</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.standardRequestScope</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.doJSFStateManagement</param-name>
<param-value>true</param-value>
</context-param>
<!-- Enables Spring Security -->
<!-- <filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<!-- Loads the Spring web application context -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Serves static resource content from .jar files such as spring-faces.jar -->
<servlet>
<servlet-name>Resources Servlet</servlet-name>
<servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<!-- Map all /resources requests to the Resource Servlet for handling -->
<servlet-mapping>
<servlet-name>Resources Servlet</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
<servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Map all /spring requests to the Dispatcher Servlet for handling -->
<!--
<servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>/spring/*</url-pattern>
</servlet-mapping> -->
<!-- Just here so the JSF implementation can initialize, *not* used at runtime -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SpringWebFlowInstantiationServlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.http.servlet.SpringWebFlowInstantiationServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/web-application-config.xml</param-value>
</init-param>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Just here so the JSF implementation can initialize -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<servlet>
<servlet-name>Blocking Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/spring/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.iface</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
Then adapt your faces-config file to :
Code:
<faces-config>
<application>
<!-- Enables Facelets -->
<view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler>
</application>
</faces-config>
Then try to launch the application by going to http://localhost:8080/swf-booking-icefaces/spring/main. There's also a css directory in the swf-booking-icefaces example that you don't have in the standard swf example, but you don't really need that to get the sample going.
If you try to launch it without the spring/main, you will get an exception. And you'll also need to disable the security listener for now, as that too doesn't work as the faceletsViewResolver that is used by SWF to translate certain url used in the sample doesn't work with the icefaces integration.
I haven't done any further testing using icefaces components in the sample itself, as I think the current integration isn't really production-ready as is.
regards,
Gunther
|
 |
|
|
No, the example works out of the box when building from svn. Just make sure to point your browser to http://localhost:8080/swf-booking-icefaces/sping/main when starting up. Trying to launch http://localhost:8080/swf-booking-icefaces/ as such will result in an exception due to the faceletsviewresiolver not working with the icefaces integration, as described in my previous post.
good luck, and if you need any help, just shout.
|
 |
|
|
Hi,
The icefaces-swf-booking seems to be based on the old swf-booking example from the Spring Web flow milestones. The other one (swf-booking-icefaces) is based on the example that ships with the SWF2.0 GA release.
I've downloaded and built this example according to the readme-information on the svn pages, and got it to work. Wolf, if you want, I'll post the web.xml and faces-config files (with facelets though).
I do have another question though concerning the behaviour I'm seeing.
The original webflow booking sample uses the faceletsviewresolver in several places (mapping for instance the url “spring/intro” to the intro.xhtml file under WEB-INF, or “/spring/login” to login.xhtml). The icefaces integration seems to break this behaviour, as it goes looking for a flow with the 'intro' or ‘login’ id as soon as you try to use said url-syntax. Is this standard/intended behaviour, not yet implemented or an oversight in the configuration from my part?
Thx,
Gunther
|
 |
|
|
Hi again,
Did some debugging, and managed to solve the question above (actually, it was not the response that was generating the NPE, but the rememberMeservice itself).
Anyway, I got it woking by implementing my own CustomTokenBasedRememberMeServices, because the standard one has a security measure in the 'loginSuccess' method, that effectively blocks the creation of a cookie is a certain parameter is not present. That parameter being linked to the actual checkbox on the login page. Obviously, since we're working with a backing bean, this parameter never gets sent.
My question however, does anybody know if there's a cleaner way to maybe pass this parameter, so I can keep on using the standard TokenBasedRememberMeServices? I'll keep digging, but any ideas are more then welcome.
Also, if there's interest, I'll post the necessary backing-bean code and securityContext.xml parameters.
Rgds,
GuntherD
|
 |
|
|
Hi,
Has anybody managed to get the "remember me" services working with the backing bean example? I have been following the pointers in the original Javakaffee post http://www.javakaffee.de/blog/2006/07/04/jsfacegi-authentication-with-a-backing-bean/?, but am stuck on the [/code]rememberMeServices.loginSuccess(request, response, authResult); [/code] part, because when I try to get the response like this [code]HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();[/code], the response object always returns null.
Any ideas anybody?
Thx
|
 |
|
|
Hi,
I'm having a problem with the Icefaces integration for Netbeans 6.0. It isn't really a problem, but more a nuissance. When I drop a commandbutton or commandlink on the designer, and then try to edit the java code by double clicking or right-clicking the button, the corresponding action-event code in the backing bean isn't created automatically (as it is in a regular visual web project).
As I said, more of a nuissance then a problem, as you can always add the code manually, but the strange thing is that this only seems to happen with certain components. Double clicking on an inputtext component for instance does automatically open up the Java editor and adds the necessary code.
Also, when I try to add the action-tags in the properties-pane for a commandbutton, it doesn't accept this. Again, minor nuissance since I can always add this in the JSP editor directly, but even after doing this, it doesn't show up in the properties pane.
Am I the only one experiencing this, or does anybody else have this problem? I'm using Netbeans 6.0, the 1.6.1. runtime libraries for Netbeans and the project integration plugin. When starting a new project, I select Icefaces visual web project.
Regards,
GuntherD
|
 |
|
|
Hi All,
Michael, you mention in one of your posts that there is a workaround for using the renderedOnUserRole without Acegi. I've been searching the forums for some more info on this, but haven't found an answer yet, so yes, I would like some information on how to solve this (if your offer still stands).
Thx.
|
 |
|
|
Hey Kurt,
is does indeed seem that the problem lies with some of the iceface modules, since I removed some iceface references from the web.xml too, and got it working that way.
Thanks for the feedback,
Gunther
|
 |
|
|
Hi all,
I'm running netbeans 5.5.1 with VWP and icefaces on a vista machine. I'm having trouble getting icefaces to run in this configuration. I keep getting FileNotFoundExceptions, which are due to an 'access denied' exception on the web-directory (see the error message below - for those of you that do not understand dutch, Toegang geweigerd means access denied).
I'm not having this problem on a similar project running on a XP machine, so this is probably due to a Vista security setting. I have already checked rights on the folder, and that seems OK. Anybody has any ideas?
Here's the error message :
9-sep-2007 22:39:20 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.io.FileNotFoundException: C:\Users\Gunther\WebApplication4\build\web (Toegang geweigerd)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:35)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:44)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:143)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:41)
at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:25)
at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Thanks for your help.
|
 |
|
|
|
|