Servlet Filter - for WL 5.1 (sp10) ?

Hello All,
we use WL 5.1 (sp10), on S.O. AIX.
We want to filter some JSP pages (depending on the user), like an "Servlet Filter"
(not present in WL 5.1, only 6.1 or superior) controling the "authorization".
We know the feature "UrlAcl", but is not good for us.
We recompiled the class JspBase (in package weblogic.servlet.jsp), including the
wanted aditional feature "Filter servlet"; We tested it and it is ok and no problens
ocorred.
Now we have three questions:
1- Does exits another solution to the problem above (filtering some JSP depending
on the user)?
2- My solution is good enought ? It´s normal to recompile the "internal classes
of the weblogic" ?
3- We want to send an email direct to BEA , but we don´t find a "contact" or web-form
to send this question to BEA; Anyone has this email / information ?

Hello All,
we use WL 5.1 (sp10), on S.O. AIX.
We want to filter some JSP pages (depending on the user), like an "Servlet Filter"
(not present in WL 5.1, only 6.1 or superior) controling the "authorization".
We know the feature "UrlAcl", but is not good for us.
We recompiled the class JspBase (in package weblogic.servlet.jsp), including the
wanted aditional feature "Filter servlet"; We tested it and it is ok and no problens
ocorred.
Now we have three questions:
1- Does exits another solution to the problem above (filtering some JSP depending
on the user)?
2- My solution is good enought ? It´s normal to recompile the "internal classes
of the weblogic" ?
3- We want to send an email direct to BEA , but we don´t find a "contact" or web-form
to send this question to BEA; Anyone has this email / information ?

Similar Messages

  • Changing init-param value for servlet filter after deployment

    Is it possible to change the <param-value> of a servlet filter's <init-param> for a deployed app through Weblogic Console? Can't seem to find a place in the console where this is exposed.
    The <init-param> of course is specified in web.xml as:
    <filter>
    <filter-name>foo</filter-name>
    <filter-class>bar</filter-class>
    <init-param>
    <param-name>name</param-name>
    <param-value>value</param-value>
    </init-param>
    </filter>

    Hi,
    U can use "Plan.xml" feature provided by WLS to change the Deployment Descriptor values without Editing Physically inside your WAR or EAR or JAR application.
    Please refer to:
    http://forums.oracle.com/forums/thread.jspa?threadID=1107834
    http://weblogic-wonders.com/weblogic/2009/12/16/updating-cookiename-using-plan-xml/
    http://weblogic-wonders.com/weblogic/2010/03/14/adding-workmanager-using-plan-xml-to-a-war-file/
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com (Middleware Wonders Are Here)

  • Strange behavior when using servlet filter with simple index.htm

    I am new to J2EE development so please tolerate my ignorance. I have a web application that starts with a simple index.htm file. I am using a servlet filter throughout the website to check for session timeout, redirecting the user to a session expiration page if the session has timed out. When I do something as simple as loading the index.htm page in the browser, the .css file and one image file that are associated, or referenced in the file are somehow corrupted and not being rendered. How do I get the filter to ignore css and image files??? Thank you!!
    The servlet filter:
    import java.io.IOException;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class SessionTimeoutFilter implements Filter {
         String[] excludedPages = {"SessionExpired.jsp","index.htm","index.jsp"};
         String timeoutPage = "SessionExpired.jsp";
         public void destroy() {
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
              if ((request instanceof HttpServletRequest) && (response instanceof HttpServletResponse)) {
                   HttpServletRequest httpServletRequest = (HttpServletRequest) request;
                   HttpServletResponse httpServletResponse = (HttpServletResponse) response;
                   //httpServletResponse.setHeader("Cache-Control","no-cache");
                   //httpServletResponse.setHeader("Pragma","no-cache");
                   //httpServletResponse.setDateHeader ("Expires", 0);
                   String requestPath = httpServletRequest.getRequestURI();
                   boolean sessionInvalid = httpServletRequest.getSession().getAttribute("loginFlag") != "loggedIn";               
                   System.out.println(sessionInvalid);
                   boolean requestExcluded = false;
                   System.out.println(requestExcluded);
                   for (int i=0;i<excludedPages.length;i++){
                        if(requestPath.contains(excludedPages)){
                             requestExcluded = true;
                   if (sessionInvalid && !requestExcluded){
                        System.out.println("redirecting");
                        httpServletResponse.sendRedirect(timeoutPage);
              // pass the request along the filter chain
              chain.doFilter(request, response);
         public void init(FilterConfig arg0) throws ServletException {
              //System.out.println(arg0.getInitParameter("test-param"));
    The index.htm file (or the relevant portion)<HTML>
    <Head>
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="RTEStyleSheet.css" rel="stylesheet" type="text/css">
    <TITLE>Login</TITLE>
    </HEAD>
    <BODY>
    <FORM NAME="Login" METHOD="POST" ACTION="rte.ServletLDAP"><!-- Branding information -->
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
         <tr>
              <td width="30%" align="left"><img src="images/top_logo_new2.gif">
              </td>
              <td width="37%" align="center"></td>
              <td width="33%" align="right"></td>
         </tr>
    </table>
    My web.xml entry for the filter:     <filter>
              <description>
              Checks for a session timeout on each user request, redirects to logout if the session has expired.</description>
              <display-name>
              SessionTimeoutFilter</display-name>
              <filter-name>SessionTimeoutFilter</filter-name>
              <filter-class>SessionTimeoutFilter</filter-class>
              <init-param>
                   <param-name>test-param</param-name>
                   <param-value>this is a test parameter</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>SessionTimeoutFilter</filter-name>
              <url-pattern>/*</url-pattern>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
         </filter-mapping>

    Hi,
    Try adding CSS files and images to the excluded Pages.

  • ADF Bindings Servlet/Filter  not invoking  Faces Servlet

    I'm getting ADF Faces and Facelets working properly with pages written in jspx format, but the Faces Servlet being mapped to jsf format.
    The problem I'm getting is while displaying ADF Tables with data retrieved from the database using Toplink and bindings provided by ADF Databindings.
    The following is the Web.xml mappings for Faces Servlet and ADF bindings filter:
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    I'm getting the ADF tables displayed using ADF Bindings, if the faces servlet is mapped for jspx format;but, at the cost of losing Facelets...Facelets is not working with Faces Servlet mapped to jspx format(though written in jspx format, the faces servlet mappping has to be made for jsf format.On the other hand, if I use faces servlet mapping for jsf pages I'm getting Facelets working but ADF Databindings are not working ,(I guess) and hence ADF Faces Tables are not being displayed(I'm getting Access Denied message).
    I even tried to change the ADF binding filter mappings
    ---- from ---- jsp &jspx---- to ----- jsp and jsf ----
    But I got the same Access denied message.
    I read a similar post on this forum by Mr.Ashish Kumar who said he is using java script and automatic form submission, to refresh the page and that gave him the table working.
    as quoted in the post:
    af:table displays Access Denied
    Why should the page be refreshed at all. I Guess , the Faces Servlet is not being invoked by the ADF Bindings Filter/Servlet, and for this , I suppose , Mr.Ashish is using java script to provide the action required.
    And one more thing which that Automatic Refreshing of page using JavaScript cannot do.
    Suppose,
    I need customised display, rather than just a Table or Form,like:
    public String getEmp() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("findAllEmp");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    List<Emp> res=(List<Emp>)result;
    for(int i=0;i<res.size();i++)
    Emp myrec=res.get(i);
    System.out.println("Employee ["+myrec.getEname()+"], Salary ["+myrec.getSal()+"]");
    return "";
    where I do some customisation in the backing bean.
    and I call that method binded to a button as below:
    <af:commandButton
    text="findAllEmp"
    disabled="#{!bindings.findAllEmp.enabled}"
    binding="#{backing_Success.commandButton1}"
    id="commandButton1"
    action="#{backing_Success.getEmp}"/>
    What I'm getting is a disabled button.
    Why doesn't ADF bindings servlet invoke the faces Servlet?
    Can't we make ADF Bindings Servlet invoke Faces Servlet by configuring in the web.xml?
    Can't we get ADF Bindings filter mapped to work with jsf pages?
    Won't ADF Bindings work with jsf pages, will they work only with jspx pages?
    ADF Team,
    Please Help me.
    Thanking you,
    Samba

    Hi! Frank,
    Thankyou for your Reply.
    Yes, Mr.Adam Winer has contributed that library, I guess.
    But I already have that adf-facelets.jar in my lib folder ; and with out that the Facelets won't work with ADF faces , in the first place.
    I'm getting Facelets working excellently with ADF Faces but I'm not getting ADF Bindings working with Faceletpages.
    The thing is even in another application which does not have facelets in it, if we use mapping for jsf pages, ADF Bindings are not working.
    I think the ADF bindings filter is configured some where to work with jspx pages only.Could you tell me where to change that entry to make ADF Bindings work with jsf extension?
    Thanking you,
    Samba.

  • How to Add a Servlet Filter to Reports 11.1.1.2.0

    I am running Fusion Middleware 11g (Weblogic 10.3.2), with Oracle Forms/Reports 11.1.1.2.0. The installation is running the default managed servers WLS_FORMS and WLS_REPORTS.
    How can I add a Servlet Filter to the Reports 11.1.1.2.0 application which is running under the WLS_REPORTS managed server?
    I have read the Oracle Doc ID: 418366.1, which describes a process for adding a servlet filter to Reports Developer 10.1.2.2, but I am unclear as to which web.xml file I need to modify in weblogic and where to place the class file for the servlet filter.
    Thanks in advance for your help.

    I can provide some partial help.
    The set up I have was running it locally on Windows 7 (64 bit) laptop and running the reports server (version 11.1.1.4) in XP Mode as part of Windows 7 Professional.
    To find which web.xml file to change, I searched the directories for web.xml and then removed then renamed the web.xml files to something else to see which impacted the start up of the reports server.
    It turns out it was a web.xml file in web.war file in the following directory which impacted the start up:
    C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_REPORTS\tmp\_WL_user\reports_11.1.1.2.0\1ww4ab
    So used winzip to extract files, update web.xml file and and java class as a jar file in the WEB-INF\lib directory and zipped back up to a web.war and put it in the above directory and restarted the Reports Server.
    Note the url pattern I used was slightly different to that shown in the oracle note (forward slash before asterix):
    <url-pattern>/rwservlet/*</url-pattern>
    Have not investigated how to do in for a production environment, but hopefully this information is of use.
    Les.

  • Memory leak in Servlet Filter handling?

    In Sun Web Server 6.1, I'm finding a memory leak when using servlet filters. I've even created a "no op" servlet filter. When it's registered, every 10000 hits or so to filtered static content will eat up about 5 to 10 MB of RAM. The JVM heap size doesn't increase.
    When I remove the filter, I've hit the same static page on the server 50000 times without seeing an increase in memory usage by the process.
    This is on Windows 2000, and I think the Sun Web Server 6.1 is SP1. I haven't tried SP2 yet.
    For reference, here's the filter I put in:
    public class NoOpFilter implements Filter
    public void init(FilterConfig arg0) throws ServletException {}
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
    chain.doFilter(request, response);
    public void destroy() {}
    }

    I found the bug. I get the memory leak if magnus.conf has either or both of the following entries:
    AdminLanguage en
    DefaultLanguage en
    If I delete the entries, the memory leak goes away. I suppose this should get fixed by Sun sometime. Maybe I'll figure out how to officially report the bug later.

  • Servlet Filter uri-pattern

    Hello!
    I need to do the following:
    - apply a servlet-filter to all files in a directory
    - NOT apply that filter to the sub-derictories.
    I'm using Tomcat 5.5.
    What should be the uri-pattern of that filter? Is there some directive for "Exclude"?
    Thanks

    Read the spec. IIRC you can also specify extension-based criteria:
    <filter-mapping>
    <filter-name>servletstatfilter</filter-name>
    <url-pattern>*.html</url-pattern>
    </filter-mapping>

  • Servlet Filter - Reading Request Error

    I have a servlet filter that sits in front of a webservice servlet (AXIS) - what I want the filter to do is to look at the content of the ServletRequest and if a particular string is located in the request, I want to call another service. Everything works just fine except (isin't there always an execept) that when I execute the following code in the filter:
    BufferedReader inReader = request.getReader();
    String line = null;
    StringBuffer sbuf = new StringBuffer();
    // Read the current request into a buffer
    while((line = inReader.readLine()) != null) {
    sbuf.append(line);
    sbuf.append("\n\r");
    if (sbuf.toString().indexOf("mystring") > -1) {
    // I do some code
    } else {
    chain.doFilter(request, wrapper);
    When I execute this code, at the chain.doFilter I get an "java.lang.IllegalStateException: getReader() has already been called for this request"
    I know that this is because I obtained the Reader from the request. But my question is - How can I look at the request string so that I can evaluate it and not have this exception thrown..
    Thx in advance...

    My guess is that when you do the chain.doFilter you pass the request to another resource that then tries to access the request.getInputStream method.
    From the JavaDocs:
    getReader
    public java.io.BufferedReader getReader()
    throws java.io.IOException
    Retrieves the body of the request as character data using a BufferedReader. The reader translates the character data according to the character encoding used on the body. Either this method or getInputStream() may be called to read the body, not both.
    Returns:
    a BufferedReader containing the body of the request
    Throws:
    java.io.UnsupportedEncodingException - if the character set encoding used is not supported and the text cannot be decoded
    IllegalStateException - if getInputStream() method has been called on this request
    java.io.IOException - if an input or output exception occurred

  • Servlet Filter

    Hi, all
    I work on a web application running on a Jboss server and i would like to filter all the http request in order to save it in a database. (i save those informations for manage web stats).
    I suppose i may use servlet filter, but i don't know the operation of this
    Does anyone could help me giving some example and the protocol to set up this on the server (file server configuration as web.xml)

    Well here is what I know. I hope it helps.....
    First thing is to create a class that implements the "javax.servlet.Filter" interface. But there are also other Filter interfaces that you could use depending on what you want: Filter, FilterChain, and FilterConfig.
    You have to implement the init(), destroy() and doFilter() methods (I ommitted the arguments).
    But most of your work will be done in the doFilter () method. You could extract request information from one of the arguments in these method and have a datasource connection to save to your back-end.
    Something like :
    public void doFilter( ServletRequest request, ServletResponse responce, FilterChain chain ) throws  ServletException {
          HttpServletRequest httpRequest = (HttpServletRequest) request;
          backEndDelegate.saveInformation(  request.getRemoteAddr(),  request.getRemoteHost() );
          chain.doFilter( request, responce );
    }Second, you need to configure the Filter. In the web.xml file add the following tags:
    <filter>
         <filter-name>StatsFilter</filter-name>
          <description>Logs Web Stats to the back end</description>
         <filter-class>com.yourpackage.StatsFilter</filter-class>
         <!--  you can also pass parameters to the StatsFilter -->
          <!--
           <init-param>
                   <param-name>some parameter</param-name>
                   <param-value>some parameter</param-value>
            </init-param>
            -->
    </filter>
    <filter-mapping>
          <filter-name>StatsFilter</filter-name>
          <filter-pattern>*.jsp</filter-pattern>
    </filter-mapping>That is just a little example. You can associate a filter with a Servlet using the <filter-mapping> tags too. And you can also do filter chains, but I don't feel like going there.
    I sure hope that it was helpful. If not then "RTFM"

  • Servlet filter - ClassNotFoundException

    Hi,
    I am trying to create and deploy a servlet filter in portal irj.
    Here is what I have done:
    1. Created filter class(TestFilter.java).
    2. Created a jar file for the above TestFilter.class.
    3. Copied the jar file to C:\usr\sap\DW1\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\lib folder
    4. Modified the web.xml file under C:\usr\sap\DW1\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF folder with the following lines:
    <filter>
    <filter-name>TestFilter</filter-name>
    <display-name>TestFilter</display-name>
    <description>
    </description>
    <filter-class>com.test.TestFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>TestFilter</filter-name>
    <url-pattern>/irj/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>TestFilter</filter-name>
    <servlet-name>prt</servlet-name>
    </filter-mapping>
    5.  I did reference the library in Visual Admin:  library:TestFilter
    6.  Also created the directory under ext/TestFilter and copied the jar file here.
    7. Restarted the engine.
    Exception the logs
    Cannot load filter <TestFilter>  The error is java.lang.ClassNotFoundException:  com.test.TestFilter
    Loader Info----
    I don't see my .jar displayed in the loader info.  irj didn't like my .jar.
    Any additional changes for irj to make it understand the new .jar file for classloader. 
    Appreciate your response.
    Message was edited by:
            Anant

    Hi I was wondering if you had any luck with this issues.
    Thank you.

  • Servlet filter in JSP

    hi all,
    i am working with session and jsp, for session authentication i m using servlet filter , which work fine in IE but when i run it in WAP emulator it give null exception.
    i m using xhtml which run both in IE and WAP EMulator.
    i dont know y it is doing so.
    infact i m pushing a class in session, and when i access this class from session in 3rd page it give this null poitner exception.
    what could be reason behind it.
    Allah Hafiz

    Generally, the client used doesn't matter. In your case, however, it sorta does. Sessions are tracked via cookies. It your WAP client does not handle cookies then you will loose the session (regular web browsers like IE can be made to ignore cookies as well...).
    To fix it, use the String url = response.encodeURL("pagetogoto.html") method for ALL your links in the application. That is, everytime you send a redirect, do something like this:
    response.sendRedirect(response.encodeRedirectURL("someOtherPage.jsp"));When you create a link, use this:
    <a href="<%= response.encodeURL("someOtherPage.jsp")%>">Some Other Page</a>When you have a form, use:
    <form action="<%= response.encodeURL("someOtherPage.jsp")%>" ...>etc...
    This adds a session tracking id to the url if (and only if) the client does not allow cookies.

  • Servlet filter in portal irj?

    Hi,
    I am trying to create and deploy a servlet filter in portal irj.
    Here is what I have done:
    1. Created filter class(TestFilter.java).
    2. Created a jar file for the above TestFilter.class.
    3. Copied the jar file to C:\usr\sap\DW1\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\lib folder
    4. Modified the web.xml file under C:\usr\sap\DW1\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF folder with the following lines:
      <filter>
        <filter-name>TestFilter</filter-name>
        <display-name>TestFilter</display-name>
        <description>
        </description>
        <filter-class>com.test.TestFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>TestFilter</filter-name>
        <url-pattern>/irj/*</url-pattern>
      </filter-mapping>
      <filter-mapping>
        <filter-name>TestFilter</filter-name>
        <servlet-name>prt</servlet-name>
      </filter-mapping>
    5. Restarted the engine.
    But still my filter doesnot get called. Am I missing something?

    i am trying out the sample filter and did the same steps as you mentioned above. 
    I get the following exception.  Looks like the irj didn't recognize the .jar file placed inside the lib.
    I am using EP 6.0.
    Stack Trace
    ===========
    Cannot load filter < com.test.TestFilter > The error is: java.lang.ClassNotFoundException: com.test.TestFilter
    Any additional steps to be done for irj to recognize this library.  The exception also shows the other libraries used during loading the application.  I didn't find mine in the list.
    Appreciate ur help
    Message was edited by:
            Anant

  • Accessing Managed Session Bean in Servlet Filter

    I wrote a Servlet Filter to handle user authentication. Now I'm trying to access my Managed Session Bean in the filter in order to save the current user. Unfortunately the Session Bean is created after the Filter executes for the first time.
    I'm trying to access the Session Bean in this way:
    (SessionBean) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("sessionBean");
    In this case getExternalContext() is equals null.
    Is there any way to create the Session bean before the filter executes or any other ideas how to handle this?
    I already searched around the internet but couldnt figure out something.
    Thanks guys,
    Paul

    Ok, fixed it like this. Works perfect. JSF finds and uses the handmade Session Bean as well.
    if(request.getSession().getAttribute(BeanNames.SESSION_SCOPE_BEAN) == null) {
         SessionBean sessionBean = new SessionBean();
         request.getSession().setAttribute(BeanNames.SESSION_SCOPE_BEAN, sessionBean);
    }Thanks,
    Paul

  • Manipulating SOAP message in Servlet Filter

    I need to capture the client IP address and place it in the SOAP message to pass it to the underlying EJB.
    I am using a servlet filter to capture the IP Address but dont really know how to get the SOAP message from the HTTPServletRequest.
    Any clues ?

    Hello,
    The easiest way to call a Web Service is to use a Client Library instead of calling the SOAP call yourself.
    Can you for your project use a Web Service client stack (JAX-RPC, Axis, XFire, ...) this will create from the WSDL file a set of class and give you a very simple caller class that you can then integrate to your JSP.
    I am pointing you to the OracleAS Web Service Documentation section about Web Service proxy.
    And some simple how-tos that have specific tasks to create client:
    - Web Servics How Tos
    So you can see this specific ant target to create a WS proxy:
    <oracle:genProxy wsdl="[your URL to a WSDL]"
    output="${src.cli.dir}"
    packageName="bottomup.client.proxy"
    >
    <classpath>
    <pathelement path="${bld.cli.dir}"/>
    <pathelement location="${ORACLE_HOME}/webservices/lib/wsa.jar"/>
    </classpath>
    </oracle:genProxy>
    Regards
    Tugdual Grall

  • Managed session bean in servlet filter

    Hi,
    Is there a way to get hold of a managed bean with session scope in a servlet filter? The code below throws an error due to the fact that the faces context is null.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    System.out.println("facesContext: " + facesContext); // shows that facesContext is null
    ApplicationFactory appFactory = ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    Application app = appFactory.getApplication();
    Object obj = app.createValueBinding("user").getValue(facesContext); //throws the error due to the null parameter
    Object obj2 = app.createValueBinding("user"); //results in a valid ValueBindingHere is the faces-config snippet for the managed bean:
    <managed-bean>
        <managed-bean-name>user</managed-bean-name>
        <managed-bean-class>biz.libereco.skemo.info.asl.beans.User</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>For the record, I am using JSF 1.0 Final.
    Thank you,
    Marcel

    wynton_0 wrote:
    Yes, there is a way to get hold of a managed bean with session scope in a servlet filter.
    See here:
    [http://wiki.apache.org/myfaces/AccessFacesContextFromServlet]
    and here:
    [how to access faces context and backing beans in a servlet filter|http://www.thoughtsabout.net/blog/archives/000033.html]
    This makes no utter sense. A JSF session scoped managed bean is under the hood just put as a HttpSession attribute with the managed bean name as key. Guess what, you can just access the HttpSession in Filter by ((HttpServletRequest) request).getSession() and then just call getAttribute() on it. If it isn't there yet, then just do a setAttribute() with a new instance.
    After I get User bean in my Servlet filter, I populate value to this bean, for example:
    user.setLanguage(request.getParameter("locale"));
    The User bean is in session scope. The User bean's language attribute suppose to be same in the whole session scope, but later on, I got null. My question is:
    how to keep this value in session scope?The the session was apparently invalidated/renewed or you manually removed the bean or replaced it by null.
    In the future, please don't resurrect old topics, just start a new topic for each independent problem/question.

Maybe you are looking for

  • Error while trying to change payment infomation

    Hello, I've tried to update my billing information by adding a new credit card, because the current one has expired, and therefore I cannot make the payment with it. When I fill out the necessary form and press the button, the window displays a messa

  • Cfapplication troubleshooting help

    A little help for a rusty CF programmer. It's been a while since I created a site using CF (2 yrs.) and am currently working on a new project, where I thought I could just snag a bunch of code from an old site I did that was very similar. I'm on a re

  • How do I pin a website to the Firefox jumplist in Windows 8?

    How do I pin a website to the Firefox jumplist in Windows 8? I am using Firefox version 35. I have one pinned site on my Firefox taskbar jumplist, but can't figure out how to add additional sites. Thanks!

  • How to control button in struts

    Hi there! How do we control buttons in struts. eg: If I've multiple buttons in the jsp, such as "Save Record", "Update REcord", " Delete Record " etc... How do I know which button is clicked?. How to control it ? Any help pretty much appreciated. Tha

  • Problem with work repository

    Hi, If someone could help me, it would me much appreciated. So, I currently have an Oracle DB I'm using has my work repository and I'm currently working on ODI (so the DB is working fine). But when I try to run an interface one time out of two, somet