Ronald,

I want to virtual host so the path /hello maps internally to /hostname/hello.  
I'm trying to do some sort of internal
redirect WITHOUT having to put dummy/stub files in the main /WEBAPP folder 
which would then include the relevant virtual
host file(s).  So, this kind of cancels out Facelets or Shale/Clay for that 
very purpose.  I've tried making another
ViewHandler.createView(context, "hostname" + viewId) but that ALSO changes the 
submitted path to /hostname/whatever.jsf
instead of retaining it as /whatever.jsf.

Now, I'm thinking I can use the servletContextListener to put my own 
ExternalContext in there so when the JSP calls
ExternalContext.dispatch(), I can override that method to invoke 
"/localhost/filename" since I won't have a generic
"/filename" setup.

I'm open to new ideas and suggestions.  I wonder sometimes why I go for the 
complicated stuff when I program application
services. *sigh*

Regards,
David

-----Original Message-----
From: "R. Müller" [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006 5:14 AM
To: MyFaces Discussion
Subject: Re: How to override the MyFaces 1.1.1 taglib listener
registration?


Hi David,

why you want to override - define your own in the web.xml !

<listener>
<listener-class>myServletContextListener</listener-class>
</listener>

You have to implement the 'javax.servlet.ServletContextListener' -
Interface with the following two methods :

public void contextInitialized(ServletContextEvent e);
public void contextDestroyed(ServletContextEvent e);

The same if want to listen for sessions. You have to additionally
implement the 'javax.servlet.http.HttpSessionListener'-Interface with

public void sessionCreated(HttpSessionEvent e);
public void sessionDestroyed(HttpSessionEvent e);

regards

Ronald

David G. Friedman wrote:
> In the MyFaces taglib, it has the listener declaration (which works in my 
> Tomcat 5.0.28 :
>
> <listener>
>     
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> </listener>
>
> Is there any way to override this other than:
>
> a) Edit the taglib file to change it.
>
> b) make my own 
> /WEB-INF/classes/org/apache/myfaces/webapp/StartupServletContextListener.java 
> file?
>
> Regards,
> David
>
>

Reply via email to