prettyfaces

Remove jsessionid from URL

ε祈祈猫儿з 提交于 2020-01-20 14:21:12
问题 I'm working on a project with the following technologies: Spring ShiroFilter PrettyFaces Tomcat server While I'm deploying it on tomcat server, I'm getting a "JSESSIONID 456jghd787aa" added at the end of the URL. I was trying to resolve this but I'm not able to do that. 回答1: For tomcat 7 add this to web.xml <session-config> <!-- Disables URL-based sessions (no more 'jsessionid' in the URL using Tomcat) --> <tracking-mode>COOKIE</tracking-mode> </session-config> 回答2: The following filter may

Can the Flash data be persisted after redirection?

只谈情不闲聊 提交于 2020-01-06 02:45:13
问题 Using JSF 2.1.29 In list.xhtml <p:commandLink id="ownerViewLinkId" value="#{petOwner.firstName} #{petOwner.lastName} " action="#{ownerAndPetListBean.viewPetOwnerFrmList(petOwner.id,petOwner.userId,0)}" onclick="PF('progrees_db').show()" oncomplete="PF('progrees_db').hide()" style="color:#0080FF;"> </p:commandLink> In listBean (viewscoped), public void viewPetOwnerFrmList(String ownerIdStr, String userIdStr, String petIdStr) { try { FacesContext.getCurrentInstance().getExternalContext()

JSF2 and PrettyFaces… how does one get the original URL or the query string?

人盡茶涼 提交于 2019-12-22 10:55:40
问题 PrettyFaces is a dead simple URL rewriting engine. All sorts of SEO is possible and it is really really easy . I have one small problem though :( Using pretty faces, I have this rewrite rule: <url-mapping id="blogEntry"> <pattern value="/blog/#{shortUrl}" /> <view-id value="/blogEntry.jsf" /> </url-mapping> So the URL bar looks like: http://host.com/blog/first-post And the rewrite rule maps the request internally to: http://host.com/blogEntry?shortUrl=first-post I'm implementing OpenID, which

CDI ViewScope & PrettyFaces: Multiple calls to @PostConstruct (JSF 2.2)

冷暖自知 提交于 2019-12-22 10:18:29
问题 I'v already check similar questions which declare that JSF 2.1 had this bug, but I'm using JSF 2.2 Let's detail: My environment: CDI: 1.1 Dynamic Web Module: 3.0 Java: 1.7 JSF: 2.2 PrettyFaces: 2.0.12.Final My Bean: @Named(value = "home") @javax.faces.view.ViewScoped public class HomeBean implements Serializable { @Inject private HomeController controller; private List<Store> myPopularStores; @PostConstruct public void postConstruct() { myPopularStores = controller.getStores(); LOG.log(Level

How to reproduce specific Friendly URL?

喜欢而已 提交于 2019-12-19 11:28:04
问题 we are trying to refactor an JSP/XSLT application to JSF. We use a CMS for content management. Technologies : JSF 2.0 using Mojarra, PrimeFaces 2.2.1 and Tomcat 6.29 The organisation of the data structure is the following: There are Sites. Sites contain Channels. Channels contain Contents. Sites, channels and content are translated. The URLs look like: http://whatever/firstSite http://whatever/firstSite/aChannel http://whatever/firstSite/aChannel/aSubChannel/myGreatContent It's the translated

Primefaces FileUpload with PrettyFaces and JSF 2.2.3

可紊 提交于 2019-12-17 09:52:50
问题 I'm having some problems with PrettyFaces on the pages I use <p:fileupload> . When I disable the PrettyFaces filter on the page, everything works just fine. When I put it back, I can see the HTTP traffic on the webbrowser, but my fileupload handler is never fired. This is some relevant part of the code. Any help would be appreciated! My .xhtml <h:form id="formImportarSNs" enctype="multipart/form-data"> <p:fieldset legend="Admin Panel"> <p:fileUpload value="#{adminPanelBean.file}" mode="simple

PrettyFaces & JSF 2 : Do we always need to pass parameters to the URL to retrieve them?

两盒软妹~` 提交于 2019-12-13 01:53:52
问题 Do we always need to pass parameters to the URL to retrieve them ? In my example , I can't get to retrieve my param named 'study'; How should i do that ? XHTML File Sender: <h:commandButton value="Send" type="button" action="pretty:participant"> <f:param name="study" value ="test" /> </h:commandButton> XHTML File Recever: <h:outputFormat value="Print : {0} "> <f:param value="#{study}" /> </h:outputFormat> Pretty Config XML : <url-mapping id="participant"> <pattern value="/Participant/New/" />

Unexpected redirect to login page after successful login

半城伤御伤魂 提交于 2019-12-12 02:44:15
问题 I'm using Spring to handle security in my JSF application. I have a login page at /login and I've configured Spring like this: <http authentication-manager-ref="authenticationManager"> <intercept-url pattern="/login" access="IS_AUTHENTICATED_ANONYMOUSLY" /> <intercept-url pattern="/admin" access="ROLE_ADMIN" /> <intercept-url pattern="/javax.faces.resource/**" access="IS_AUTHENTICATED_ANONYMOUSLY" /> <intercept-url pattern="/**" access="ROLE_ADMIN,ROLE_USER" /> <form-login login-page="/login"

Dynamic view id using pretty faces navigation refuses to work

陌路散爱 提交于 2019-12-12 02:03:57
问题 I am attempting to migrate an application from JSF 1.2 to JSF 2.1. The code below worked in the 1.2. I am using PrettyFaces 3.3.3, MyFaces 2.1. in pretty-config.xml: <url-mapping id="seSite"> <pattern value="/sites/#{seViewChooserBean.urlSiteType}/#{seViewChooserBean.siteId}"/> <view-id value="#{seViewChooserBean.getSiteViewId}"/> </url-mapping> <url-mapping id="seSiteProps"> <pattern value="/sites/#{sePropsBean.urlSiteType}/#{sePropsBean.siteId}/properties"/> <view-id value="/pages/se/site

PrettyFaces using mapped urls and actions, i lose all my stylings

跟風遠走 提交于 2019-12-12 01:35:54
问题 I have been using pretty faces for urls without issue until i started using mapped URLs feature (Section 3.6). http://ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/Configuration.html#config.actions I'm getting the output and the actions i want to happen working fine. The problem though is i can't get to to any of my assets under assets folder. i'm getting a 404. The weird thing is that for every other config there hasn't been a problem. And isn't a problem when I run them together. The app is