hi volker, thanks for the tip. seems to be a better solution ;-) now, changes it into a servlet, i get another confusing problem. i have overwritten the protected void service(...) method as described in the link you have posted. however, now this service method is called in an infinite loop. and from the 2nd time its called the requestURI changes. my URI looks like this:
/webapp/group/1234 and from the second time it is just /webapp/group hoping for a help on this one! thanks regards, Matthes 2007/6/20, Volker Weber <[EMAIL PROTECTED]>:
Hi, i think you should not use a PhaseListener, but a servlet. see: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls#head-6c1aaf488d48f938896da962aaa4361ec3ffaf70 Regards, Volker 2007/6/20, Matthes R. <[EMAIL PROTECTED]>: > Hi all, > > i've got a problem with my self-written PhaseListener. It is a RESTORE_VIEW > listener and is intended to deal with pretty URLs: > > e.g.: > www.server.com/webapp/user/123 > > the listener splits the requestURI (into an array [webapp, user, 123]). this > works fine. i then put the parameters into some beans. works fine too (i > create session-scope beans if they do not exist and put them into the > FacesContext). > > Now, here is my problem. i then want to change the ViewRoot to do an > internal forward to the index.jsp (this one generates the content from the > beans): > > private FacesContext context; > . > . > . > //set the viewroot to show the indexpage! > UIViewRoot view = context.getApplication(). > getViewHandler().createView(context, > "/jsp/index.jsp"); > context.setViewRoot (view); > > > the index.jsp is loaded correctly, but when it is finished, it starts > loading again. weird thing about that: it does not load any css-styles, so > it is completely useless (besides its useless cos its loading twice). > > anyone got an idea? > > regards, > Matthes >