Hi folks, I'm here facing a problem with a Java web project. The project I'm working on has been made with standard jsp mixed up with jsf pages. The main page of the application, called main.jsp is a standard jsp page that needs to access a managed bean with session scope created within a servlet filter used to check the authentication of the user. In my web.xml I have set up that faces engine must respond to .jsf and /faces/* request
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
If I open my application with http//myserver/myapp/faces/main.jsp
everything works fine.
If I open my application with http://myserver/myapp/main.jsp
I'll get an error beacause the faces context hasn't been created yet.
Neither setting the welcome page nor setting the apache redirect I'm able to let the application open the right page (main.jsp within the faces context) when the users simply type h**p://myserver/myapp on their browsers: that's beacause the page /faces/main.jsp phisically doesn't exist.
I guess there could be 2 solution: being able to let the faces context start even outside the /faces/* pattern, or find a way to let tomcat redirect to /faces/main.jsp even if the page doesn't exist... but I failed everything I tried.
Anyone can help? Thanks in advance