# JSF: Unterseiten bookmark- und aufruffähig bekommen



## JavaFips (22. Okt 2009)

Hallo,

zwar bekommt man über das JSF-Tag <hutputLink> schon mal schönere URLs,
die sich so weit auch bookmarken lassen, aber beim Aufruf so eines Bookmarks
*nach Ablauf der Session* wird ins Leere gegriffen.

Jetzt habe ich mal PrettyFaces in die Anwendung integriert, löst aber noch
nicht das Problem, dass sich die gebookmarkten URLs über den Ablauf der
Session hinaus immer noch nicht erfolgreich aufrufen lassen.


Aus dem GlassFish-Server-Log:


```
[#|2009-10-22T02:56:12.794+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|
_ThreadID=19;_ThreadName=httpSSLWorkerThread-8080-1;
_RequestID=ef78539e-2bbd-455a-9402-f06dc9ef4feb;|StandardWrapperValve[Faces Servlet]: PWC1406:
Ausnahmefehler bei Servlet.service() für Servlet Faces Servlet
java.lang.NullPointerException
	at org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:366)
	at org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:352)
	at org.apache.jsp.impressum_jsp._jspService(impressum_jsp.java from :66)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
	at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
	at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
	at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
	at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
	at com.ocpsoft.pretty.application.PrettyViewHandler.renderView(PrettyViewHandler.java:83)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
	at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
	at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:64)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
	at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
	at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
	at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
```

Ist da bei der Integration was schiefgegangen, müsste doch mit PrettyFaces eigentlich funktionieren, dass sich Unterseiten über den Ablauf der Session hinaus bookmarken lassen?

Gruß vom Fips


----------



## JavaFips (23. Okt 2009)

.


Kennt hier jemand PrettyFaces?

PrettyFaces - SEO, Bookmarks, and Navigation for JSF / JSF2 (UrlRewrite) | OcpSoft

Ist es damit möglich, JSF-Anwendungen über die Sessiondauer hinaus bookmarkfähig zu kriegen, hat das schon jemand erfolgreich geschafft? 



.


----------



## JavaFips (24. Okt 2009)

.


Es funktioniert. Man kann mit PrettyFaces *über das Ende der Session hinaus bookmarkfähige* Anwendungen  erstellen. 

Die Exception verursacht hat ein <jsp:setProperty ... >, was sich in JSF ja eh nicht gut macht - nachdem ich das mal rausgenommen hab, hat es funktioniert, auch über den Ablauf der Session hinaus.





.


----------

