Using tiles - servlet filter called multiple times

Hi I have an application in we have 7 filters defined.
Now in a jsp page, I have a loop that inserts a TILE. The loop iterates about 7000 times. Every time the tile insert is called, even my filters are called. So my 7 filters are called 7000 times. Now this makes my page rendering really slow.
setting flush="false" (in the tile insert) does not work
setting buffer="2700k" autoFlush="false" does not work.
I have to use tiles. I cant skip the filters. What do I do? Is there any way I can not call the filter when my tiles are inserted.

Hi
Yes,you are right. In iAS6.0 SP4 When multiple requests arrive,and the Servlet's init() method has not returned yet for the first request, the application server calls init()multiple times. This problem is resolved in iAS 6.5.
There is no kregedit magic that will solve this problem.
Right now the workaround is any of the solution you proposed. Or use iAS6.5. I have tested it with fortune.
Please download it and check with your application.
you can find free download at http://developer.iplanet.com/appserver/testdrive/testdrive_65.html
Thanks

Similar Messages

  • Custom tag library called multiple times

    Hi ppl ,
    I have a custom tag library which i use to populate some menu components. When i do call my custom tag library though , it is called multiple times, use case is as follows.
    I have menu tabs and menu bars which thanks to Mr.Brenden is working splendidly as so:-
    <af:menuTabs>
    <af:forEach var="menuTab" items="#{bindings.menu.vwUserMenuTabRenderer.rangeSet}">
    <af:commandMenuItem text="#{menuTab.MenuLabel}"
    shortDesc="#{menuTab.MenuHint}"
    rendered="true"
    immediate="true"
    selected="#{sessionScope.selectedMenuId == menuTab.MenuId }"
    onclick="fnSetSelectedValue('#{menuTab.MenuId}')" >
    </af:commandMenuItem>
    </af:forEach>
    </af:menuTabs>
    <af:menuBar>
    <af:forEach var="menuBar" items="#{bindings.menu.vwUserMenuBarRenderer.rangeSet}">
    <af:commandMenuItem onclick="return clickreturnvalue()"
    onmouseover="dropdownmenu(this, event,#{menuBar.MenuId}, '150px')"
    onmouseout="delayhidemenu()"
    text="#{menuBar.MenuLabel}"
    action="#{menuBar.MenuUri}"
    rendered="#{menuBar.ParentId == sessionScope.selectedMenuId}"
    immediate="true" />
    </af:forEach>
    </af:menuBar>
    </afc:cache>
    now all of this code is within a subview , and just directly below the subview tag , i have the call to my custom tag library:-
    <myCustomTagLib:menuCascade />
    only issue now is that assuming i have in all 7 menu bar components, the doStartTag is called 7 times. the relevant code within my custom tag class is as follows :-
    public int doStartTag() throws JspException {
    return (EVAL_BODY_INCLUDE);
    public int doEndTag() throws JspException {
    try {
    declareVariables();
    return EVAL_PAGE;
    }catch (Exception ioe) {
    throw new JspException(ioe.getMessage());
    and within my declareVariables method i do an out of the jscript ( out.print(jscript.toString()); ) which is a simple string generated based on certain conditions...
    now it seems to be working fine on the front end , but when i view the source of the page, i notice that the declaration is called multiple times, and this happens because the doStartTag method is called multiple times, i haven't even nested the call to the custom tag within the menu components , any clue as to whats going wrong ?
    Cheers
    K

    Hi,
    if you add the following print statement
    System.out.println("rendering "+FacesContext.getCurrentInstance().getViewRoot().getViewId());
    Then the output in my case is
    07/04/24 08:14:04 rendering /BrowsePage.jsp
    07/04/24 08:14:05 rendering /otn_logo_small.gif
    The image comes from the file system, which means it is rendered by the JSF lifecycle. If you reference the image with a URL then the lifecycle doesn't render the image but only refrences it.
    To avoid your prepare render code to be executed multiple times, just check for jsp and jspx file extensions, which will guarantee that your code only executes for JSF pages, not for loaded files.
    The reason why this happens is because the JSF filter is set to /faces , which means all files that are loaded through that path
    Frank

  • Finalize() method being called multiple times for same object?

    I got a dilly of a pickle here.
    Looks like according to the Tomcat output log file that the finalize method of class User is being called MANY more times than is being constructed.
    Here is the User class:
    package com.db.multi;
    import java.io.*;
    import com.db.ui.*;
    import java.util.*;
    * @author DBriscoe
    public class User implements Serializable {
        private String userName = null;
        private int score = 0;
        private SocketImage img = null;
        private boolean gflag = false;
        private Calendar timeStamp = Calendar.getInstance();
        private static int counter = 0;
        /** Creates a new instance of User */
        public User() { counter++;     
        public User(String userName) {
            this.userName = userName;
            counter++;
        public void setGflag(boolean gflag) {
            this.gflag = gflag;
        public boolean getGflag() {
            return gflag;
        public void setScore(int score) {
            this.score = score;
        public int getScore() {
            return score;
        public void setUserName(String userName) {
            this.userName = userName;
        public String getUserName() {
            return userName;
        public void setImage(SocketImage img) {
            this.img = img;
        public SocketImage getImage() {
            return img;
        public void setTimeStamp(Calendar c) {
            this.timeStamp = c;
        public Calendar getTimeStamp() {
            return this.timeStamp;
        public boolean equals(Object obj) {
            try {
                if (obj instanceof User) {
                    User comp = (User)obj;
                    return comp.getUserName().equals(userName);
                } else {
                    return false;
            } catch (NullPointerException npe) {
                return false;
        public void finalize() {
            if (userName != null && !userName.startsWith("OUTOFDATE"))
                System.out.println("User " + userName + " destroyed. " + counter);
        }As you can see...
    Every time a User object is created, a static counter variable is incremented and then when an object is destroyed it appends the current value of that static member to the Tomcat log file (via System.out.println being executed on server side).
    Below is the log file from an example run in my webapp.
    Dustin
    User Queue Empty, Adding User: com.db.multi.User@1a5af9f
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    Joe
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin pulled from Queue, Game created: Joe
    User Already Placed: Dustin with Joe
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    INSIDE METHOD: false
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    User Dustin destroyed. 9
    User Joe destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    INSIDE METHOD: true
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    INSIDE METHOD: true
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    It really does seem to me like finalize is being called multiple times for the same object.
    That number should incremement for every instantiated User, and finalize can only be called once for each User object.
    I thought this was impossible?
    Any help is appreciated!

    Thanks...
    I am already thinking of ideas to limit the number of threads.
    Unfortunately there are two threads of execution in the servlet handler, one handles requests and the other parses the collection of User objects to check for out of date timestamps, and then eliminates them if they are out of date.
    The collection parsing thread is currently a javax.swing.Timer thread (Bad design I know...) so I believe that I can routinely check for timestamps in another way and fix that problem.
    Just found out too that Tomcat was throwing me a ConcurrentModificationException as well, which may help explain the slew of mysterious behavior from my servlet!
    The Timer thread has to go. I got to think of a better way to routinely weed out User objects from the collection.
    Or perhaps, maybe I can attempt to make it thread safe???
    Eg. make my User collection volatile?
    Any opinions on the best approach are well appreciated.

  • Php include file getting called multiple times

    I have created a form in file career.php. To carry out the validation user_registration.php is called at the beginning of the file.
    user_registration.php in turn calls library.php. Issue is that library.php is getting called multiple times.
    I have attached phperror.log which confirms the same.
    career.php
    <?php
    session_start();
    require_once('phpScript/user_registration.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    user_registration.php
    <?php // This file is used for validating user form data. It calls process_upload.php to validate file uploaded by user
    $errors = array();  
    $messages = array();
    $testing = TRUE;
    error_log("Enter- user_registration.php. Testing mode $testing", 0);
    try {
              error_log("user_registration.php: Entered try catch block",0);
    require_once('library.php');
              error_log("Successfully called library.php",0);
              $public_key = '6LeDsNUSAAAAAIoaYuNhGm2zx_qgBECiybUWUkt6';
              $private_key = '6LeDsNUSAAAAACuvmJrec-_5seLdmhqUMngt8AiU';
              $recaptcha = new Zend_Service_ReCaptcha($public_key, $private_key);
              if(isset($_POST['submit'])) {          // Only execute if form is submitted by user
                error_log("user_registration.php. Submit button pressed by user", 0);
                require_once('Zend/Mail.php');
                $mail = new Zend_Mail('UTF-8');
                if (isset($_POST['name'])) {
                        $val = new Zend_Validate_Regex('/^\p{L}+[-\'\p{L} ]+$/u');
                        if (!$val->isValid($_POST['name'])) {
                          $errors['name'] = "Please enter your name, no numbers permitted";
    error_log("Exit- user_registration.php.", 0);
    library.php
    <?php
    error_log("Enter- library.php. Testing mode $testing", 0);
    if ($testing)  // If true then go to testing mode
              $library = '/Applications/MAMP/htdocs/mgtools-india/ZendFramework/library';
              set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    try {
    Zend_Loader_Autoloader::getInstance();
    error_log("Exit- library.php. Testing mode $testing", 0);
    phperror.log
    Marker - 12-Oct-2012 10:27:26 AM
    [12-Oct-2012 04:57:33 UTC] Enter- user_registration.php. Testing mode 1
    [12-Oct-2012 04:57:33 UTC] user_registration.php: Entered try catch block
    [12-Oct-2012 04:57:33 UTC] Enter- library.php. Testing mode 1
    [12-Oct-2012 04:57:33 UTC] Exit- library.php. Testing mode 1
    [12-Oct-2012 04:57:33 UTC] Successfully called library.php
    [12-Oct-2012 04:57:36 UTC] Enter- user_registration.php. Testing mode 1
    [12-Oct-2012 04:57:36 UTC] Entered try catch block
    [12-Oct-2012 04:57:36 UTC] Enter- library.php. Testing mode 1
    [12-Oct-2012 04:57:36 UTC] Exit- library.php. Testing mode 1
    [12-Oct-2012 04:57:36 UTC] Successfully called library.php
    [12-Oct-2012 04:58:38 UTC] Enter- user_registration.php. Testing mode 1
    [12-Oct-2012 04:58:38 UTC] Entered try catch block
    [12-Oct-2012 04:58:38 UTC] Enter- library.php. Testing mode 1
    [12-Oct-2012 04:58:38 UTC] Exit- library.php. Testing mode 1
    [12-Oct-2012 04:58:38 UTC] Successfully called library.php
    [12-Oct-2012 04:58:38 UTC] user_registration.php. Submit button pressed by user
    [12-Oct-2012 04:58:39 UTC] user_registration.php, Processing enquiry form
    [12-Oct-2012 04:58:39 UTC] Enter- process_upload.php. Testing mode 1
    [12-Oct-2012 04:59:01 UTC] Exit- user_registration.php.
    I am not able to understand why user_registration.php and library.php are executing again and again.
    I ran this test on local testing server MAMP.
    The results are the same on remote server also.
    Please guide.

    I'm not sure what's happening there. The important question is whether the code is executed successfully.
    Since you're using the Zend Framework, it might be better to ask in a dedicated ZF forum.

  • Oracle Object Type Constructor Called Multiple Times

    I have an object type with a custom constructor. In SQL, when I reference the attributes the constructor is called multiple times in Oracle 11.2.0.4.
    Why is the constructor called multiple times?
    How do I stop it?
    My current work around is to reference the attributes and use the /*+ materialize */ hint.
    Problem Setup
        create or replace type Foo as object
          Bar1 NUMBER,
          Bar2 NUMBER,
          Bar3 NUMBER,
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
        create or replace type body Foo is
          -- Member procedures and functions
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
          AS
          BEGIN
            SELF.Bar1 := p_Bar1;
            SELF.Bar2 := p_Bar2;
            SELF.Bar3 := p_Bar3;
            dbms_output.put_line('Foo Constructor Called');
            RETURN;
          END;
        end;
    Problem
        -- Constructor is called 6 times!
        -- Once for each column and once for each predicate in the where clause.
        SELECT x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3, f
        FROM (
          SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
          FROM dual d
        ) x
        WHERE x.f.bar1 = x.f.bar1 AND x.f.bar2 = x.f.bar2
    Output
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Workaround
        -- Work Around
        -- Constructor is called 3 times
        -- Once for each column in the inline view.
        -- Note, I removed column f (the object type) because it's not compatible with the materialize hint.
        WITH y AS (
          SELECT /*+ materialize */ x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3
          FROM (
            SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
            FROM dual d
          ) x
        SELECT y.bar1, y.bar2, y.bar3
        FROM y
        WHERE y.bar1 = y.bar1 AND y.bar2 = y.bar2

    Another work-around is described in this thread... Accessing fields of a custom object type... which makes use of a collection type combined with the TABLE operator, like so...
    create or replace type FooTable as table of Foo;
    SELECT x.bar1 AS bar1, x.bar2 AS bar2, x.bar3 AS bar3, value(x) f
        FROM table(FooTable(
          foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3)
        )) x
        WHERE x.bar1 = x.bar1 AND x.bar2 = x.bar2
    BAR1 BAR2 BAR2 F
    1    2    3    (1, 2, 3)
    Foo Constructor Called
    Hope that helps...
    Gerard

  • CommandLink Disabled called multiple times

    Hello,
    I'm developing a brief method to enable/disable af:commandLink on certain condition.
    The layout is simple: a table to the left and a panelTabbed to the right. PanelTabbed has a partialTrigger to the table.
    In a visible tab there is a commandLink with Disabled attribute bound to a backingBean method.
    In this method I placed a System.out.println and I can see that this method is called multiple times.
    On pagestart the method is called 2 times.
    On table current row change the method is called 3 times.
    On tab change out of first tab 1 time.
    On tab change to first tab 2 times.
    I wen through all the way from commandLink to top component and there are no additional partialTriggers.
    Could someone explain this to me, please?
    Thanks.
    ADF 11.1.1.4

    Ilya,
    Have you tried using the ADF logger (see [url http://blogs.oracle.com/groundside/entry/adventures_in_logging_index]this blog for lots of details, especially part 5)? Replace your System.out.println calls with calls to the logger, crank up the logging level and use the log analyser to see by ADF/JSF phase when things are called.
    John

  • ItemEditEnd called multiple times

    Hi.
    Am using a datagrid and using an item editor and item render for that. Item Renderer --> To give background color and Item Editor - to show a date picker. While implementing this, my need is to open a popup when we enter date. But, am getting the popup thrice , sometimes during "on change"  and sometimes, when I press "Enter" or "Tab out" . When analyzed further, I noticed that itemEditEnd event is called thrice. Can anyone let me know the alternative for this please ? Here is my code.          
    <mx:AdvancedDataGrid width="1000" height="300" horizontalScrollPolicy="auto"
            id="dProvider" creationComplete="init()" verticalScrollPolicy="auto" editable="true" itemEditBeginning="checkIfAllowed(event)" selectionMode="singleCell" itemEditEnd="onEditEnd(event)">
                                    private function onEditEnd(event:AdvancedDataGridEvent):void
                                         var oTaskPopupObj:TaskPopUp = new TaskPopUp();
                            PopUpManager.addPopUp(oTaskPopupObj,this,true);
                                                        //This part is called thrice !!!
    I have been struggling to get rid of this issue. Would be very happy if I get a help quickly !
    Thanks
    Bala

    Thanks for being patient and answering my questions.
    And yes, the itemEditEnd is called multiple times, even for other scenarios. Find below a sample code, where-in,  iam using date editor to validate the field entered. Here too, the itemEditEnd is called thrice( you can notice that the alert creeps up thrice). Let me know if you need anything else
    Main mxml
    [[ [Bindable] 
    private var compManDataDef:XML =<CompManData>
    <row>
    <Phase>Program Start</Phase>
    <Date>Plan</Date>
    <Gate>Enter Date</Gate>
    <WBP>TBD</WBP>
    </row>
    <row>
    <Phase></Phase>
    <Date>Actual</Date>
    <Gate>TBD</Gate>
    <WBP>TBD</WBP>
    </row>
    private function onEditEnd(event:AdvancedDataGridEvent):void
    Alert.show("in date validate");
     <mx:AdvancedDataGrid width="100%" height="72%" horizontalScrollPolicy="auto" id="
    dProvider" creationComplete="init()" dragEnabled="true" lockedColumnCount="5" editable="true" itemEditBeginning="checkIfAllowed(event)" selectionMode="singleCell" itemEditEnd="onEditEnd(event)">
     <mx:columns>
     <mx:AdvancedDataGridColumn dataField="
    Phase"headerText="" width="
    137" wordWrap="true" textAlign="center" itemRenderer="renderer.ColorwithLable" editable="false">
     </mx:AdvancedDataGridColumn>
     <mx:AdvancedDataGridColumn dataField="
    Date"headerText="" width="
    120" itemRenderer="renderer.ColorwithLable" editable="false"/>  
    <mx:AdvancedDataGridColumn id="
    Gate" dataField="Gate"headerText="
    Gate" width="120" editorDataField="newEmployeeType" labelFunction="dglfFormatDate" itemEditor="dateEditing" itemRenderer="renderer.ColorwithLable" />
     <mx:AdvancedDataGridColumn id="
    WBP" dataField="WBP"headerText="
    WBP" width="120" itemRenderer="renderer.ColorwithLable"/>
    </mx:AdvancedDataGrid>
    editingDate.mxml......
    <?xml version="1.0" encoding="utf-8"?><mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initMe()" >
    <mx:Script><![CDATA[
     import mx.managers.PopUpManager; 
    import mx.controls.dataGridClasses.DataGridColumn; 
    import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn; 
    import mx.controls.AdvancedDataGrid; 
    import mx.controls.advancedDataGridClasses.AdvancedDataGridListData; 
    Bindable] 
    public var tempVal:String = ""; 
    public var newEmployeeType:String = ""; 
    public var newEmployeeType1:String = ""; 
     private function dateChanged(date:Date):void {
     if (date == null)newEmployeeType =
    elsenewEmployeeType = (date.getMonth()+1).toString() +
    '/' + date.getDate().toString() + '/' + date.getFullYear().toString() ;}
    private function initMe():void{tempVal = data.Gate;
    if (tempVal != null) {dateField1.text =tempVal.toString();
    ]]>
    </mx:Script><mx:DateField id="dateField1" yearNavigationEnabled="true" change="dateChanged(DateField(event.target).selectedDate)"/></mx:HBox 
    >

  • Getter is called multiple times

    Hi All,
    I my JSF page i am using one foreach which will read elements from an ArrayList. ArrayList is present in one PagesFlowSope-Bean.
    I am facing problem that, the getter for ArrayList is called multiple times.I want to restrict that,is there any way for doing this.
    Thanks in advance,

    Your getter gets called every time the component/page gets rendered/refreshed. If you feel that it refreshes too many times, check the partial triggers on that component or its parent. Just a thought, to avoid any logic getting called in your getter multiple times, if possible, put a empty or null check on your attribute and initialize it only if it is null/empty. In that way even if it gets called multiple times your logic to populate your ArrayList doesn't fire everytime.
    Good luck !

  • Listener method is called multiple times

    why is a listener method called multiple times when the user interacted
    with the component just once?

    Because you have a bug in your code.
    If you want further help post a Short, Self Contained, Compilable and Executable, Example Program ([url http://homepage1.nifty.com/algafield/sscce.html]SSCCE) that demonstrates the problem.
    And don't forget to use [url http://forum.java.sun.com/help.jspa?sec=formatting]code formatting when posting code.

  • Firefox making same GET call multiple times

    Firefox is making the same AJAX call multiple times for a single event when it should really do it once. Actually, with each single click the number of calls multiplies. I have tested the application using Chromium and Eclipse's internal browser and I have no problems.
    I removed all add-ons and started Firefox in safe-mode, but the problem persists.
    Please advise,
    Arthur Nobrega

    Hi Arthur, do you have a page available that demonstrates this problem? If so, please post a link. Perhaps your test doesn't actually need to make a network request: for example, perhaps it could add a message to the page indicating that the relevant section of code was triggered.
    Since this site focuses on end user support, you might also consider taking this question to a more developer-oriented forum such as the unofficial [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board], or to StackExchange.

  • Weblogic.utils.NestedRuntimeException when using javax.servlet.Filter

    IDE: JDev 10gR3.4 & JDev 11gR2.3
    ViewController technology: JSF/ADF Faces
    Example code flow:
    Run page2.jsf
    MyFilter intercepts request, checks for parameter on session.
    If parameter not null, goto page2.jsf
    Else redirect to page1.jsf
    page1.jsf has a button that sets the value on the session scope after clicking.
    In jdev 11gR2.3, I get an weblogic.utils.NestedRuntimeException after clicking the button on page1.jsf. This error does not occur in jdev 10gR3.5. Although the application continues to execute and proper info is displayed, I’m wondering why this occurs and also if I should be concerned. Has anyone experienced a similar issue when using javax.servlet.Filter in 11g?
    MyFilter code snipet:
        public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) {
            try {
                HttpServletRequest httpRequest = (HttpServletRequest)servletRequest;
                HttpServletResponse httpResponse = (HttpServletResponse)servletResponse;
                String redirect = httpRequest.getContextPath() + "/faces/page1.jsf"; //only difference here is 11g uses jsf, 10g uses jsp.
                String uri = httpRequest.getRequestURI().toString();
                Boolean mySessionAttribute = (Boolean)httpRequest.getSession().getAttribute("MYSESSIONATTRIBUTE");
                if (uri.endsWith(redirect) || mySessionAttribute != null) {
                    filterChain.doFilter(servletRequest, servletResponse);
                } else {
                    httpResponse.sendRedirect(redirect);
                    return;
            } catch (IOException e) {
                e.printStackTrace();
            } catch (ServletException e) {
                e.printStackTrace();
    page1.jsf/jsp
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
        <h:form id="f1">
            <h:commandButton value="Submit" id="cb1" action="#{Page1Bean.clicked}" type="submit"/>
        </h:form>
    </f:view>page2.jsf/jsp
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <af:document title="main.jsf" id="d1">
            <af:form id="f1">
                <af:outputText value="This is the main content" id="ot1"/>
            </af:form>
        </af:document>
    </f:view>Page1Bean.java
    public class Page1Bean {
        public void clicked() {       
            FacesContext context = FacesContext.getCurrentInstance();
            ExternalContext externalContext = context.getExternalContext();
            externalContext.getSessionMap().put("MYSESSIONATTRIBUTE", Boolean.TRUE);
            try {
                externalContext.redirect("/11gFilterExample-ViewController-context-root/faces/page2.jsf");
            } catch (IOException e) {
                    e.printStackTrace();
    }Full exception
    weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/11gFilterExample-ViewController-context-root/faces/page1.jsf'
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2144)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:2024)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1918)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getParameter(ServletRequestImpl.java:1995)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.access$800(ServletRequestImpl.java:1817)
         at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:804)
         at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:169)
         at org.apache.myfaces.trinidadinternal.context.external.ServletRequestParameterMap.getAttribute(ServletRequestParameterMap.java:43)
         at org.apache.myfaces.trinidadinternal.context.external.ServletRequestParameterMap.getAttribute(ServletRequestParameterMap.java:31)
         at org.apache.myfaces.trinidadinternal.context.external.AbstractAttributeMap.get(AbstractAttributeMap.java:73)
         at oracle.adfinternal.controller.state.ControllerState.getRootViewPortFromRequest(ControllerState.java:788)
         at oracle.adfinternal.controller.state.AdfcContext.initialize(AdfcContext.java:185)
         at oracle.adfinternal.controller.state.AdfcContext.initialize(AdfcContext.java:79)
         at oracle.adfinternal.controller.application.AdfcConfigurator.beginRequest(AdfcConfigurator.java:53)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:562)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:212)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:174)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(SocketInputStream.java:168)
         at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:177)
         at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:228)
         at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2118)
         ... 39 more
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled

    I dont believe that solution pertains to my case. clicked() is invoked from standard jsf page and the adf controller is not acquired yet. i put a couple of print statements in the filter and it seems that the doFilter is called twice! This is not the case when running in 10g.
                if (uri.endsWith(redirect) || mySessionAttribute != null) {
                    System.out.println("URI dofilter: "+uri);
                    filterChain.doFilter(servletRequest, servletResponse);
                } else {
                    System.out.println("URI sendRedirect: "+uri);
                    httpResponse.sendRedirect(redirect);              
                }11g weblogic console log:
    URI sendRedirect: /11gFilterExample-ViewController-context-root/faces/page2
    URI dofilter: /11gFilterExample-ViewController-context-root/faces/page1.jsf
    URI dofilter: /11gFilterExample-ViewController-context-root/faces/page1.jsf
    10g oc4j console log:
    13/01/07 15:48:13 URI sendRedirect: /10gFilterExample-ViewController-context-root/faces/page2.jsp
    13/01/07 15:48:13 URI dofilter: /10gFilterExample-ViewController-context-root/faces/page1.jsp
    I believe whatever thats causing this occur could be why the exception is thrown...

  • Generic Data Source is calling multiple times in RSA3

    [color:red}<Moderator Message: This topic has alread been discussed a lot of times. Additionally there are weblogs related to it. Please search the forums and/or the blogs for this issue>
    Hi experts,
    I have the requirement to get data from Generic Data Sources with function Module,
    after finishing the FM I have checked in extact checker(RSA)
    in the internal table I_T_DATA is displays 281 records,
    but in RSA3 it shows 112560 records, I found that the FM is calling multiple time by executing one time in RSA3.
    1.what would be the problem
    2.where is the porblem is it in FM coding or any other places to check.
    <removed by moderator>
    Regards
    Vijay
    Edited by: Siegfried Szameitat on Feb 3, 2009 11:45 AM

    Hi Savita,
    I don't understand clearly from your reply regarding flow you transported and what all you transported.
    You need to first transport objects in R/3 and import them.
    Then transport Infoprovider, Datasource in BI assuming depenedent Infoare Infoobject, application component already transported.
    Then transport your Infosource, Update rule, Transfer rules, Infopackage.
    Hope you understood.
    Ravi

  • ADF Faces Tree - getChildren() called multiple times

    Hi,
    I have a simple tree based on the demo's 'tree.jspx'. Each time I click on a node in this tree, I see that TreeNodeImpl.getChildren() gets called multiple times for each node. This is not an issue in tree.jspx where the tree is static. However in a case where tree is constructed dynamically based on the back end state, it is going to hurt performance. Each getChildren() call then invokes backend methods which could be remote. So multiple getChildren() will invoke backend methods multiple times.
    Is this behavior of calling getChildren() multiple times per node a bug? Is there any way for me to avoid it?

    this is expected behaviour.
    Your tree model should cache data and prevent the multiple calls to the back end.

  • Backing  Bean constructor getting called multiple times

    I have a List of records in the Table with a link Add.
    When i click Add i show a popup dialog which is attached to the dialogListener.
    On clicking OK on the dialog i want to add a record in the List in the backing Bean, but the Bean constructor is getting called multiple times.
    and the list to which the table is attached is also getting called multiple times.
    is there a way in which the method gets called only once?
    Message was edited by:
    user607056

    Hi!
    af:table have property ContentDelivery. When <default> (lazy), the table "frame" iz rendered in first page cycle, and content (rows in table) are fetched lazy i.e. in second cycle. Thus, your backing bean is constructed twice.
    If you set ContentDelivery to immediate, the table including data rows is generated in single page cycle thus your backing bean is constructed only once.
    Hope this helps,
    PaKo

  • Validation Event getting called multiple times

    I am saving an eform after entering a wrong percentage in it.On opening the same eform it gives the validate message "Percentage not valid" pop up .This popup should come only once but its coming around 25-26 times.I checked and find that the validate event is getting called multiple times for the same field.Can someone tell why this is happening and how to resolve this

    Hi rupali Sri,
    Our forum here is for questions related to the LiveCycle Collaboration Service product.
    You might want to post your question to the Livecycle Forms forum:
    http://forums.adobe.com/community/livecycle/livecycle_es/forms_es
    If that's not the correct forum, start from here:
    http://forums.adobe.com/index.jspa?view=overview
    Hope this helps.
    Good luck,
    Julien
    LCCS Quality Engineering

Maybe you are looking for

  • Ipod Touch with strange Wi Fi network on the interstate

    Driving from Florida to Georgia this weekend I noticed in the top left corner of my Touch I had 3 blue bars. Since the Touch is not tethered and obviously is not an iPhone I was curious. So I went into settings and under the WiFi setting the network

  • FXO to FXO disconnect problem - Part1

    Hi, I have 2 sites connected through an hdlc leased line. Each site has router 1750 with one VIC - 2FXO. Once a call is placed both FXO are stuck in the off hook state. So there is no way to make another call unless I shut down and turn on the ViC ag

  • Delete fotos in iPhoto events not used in Foto Book

    the problem with this issue is that there is no "indicator" in or on the pictures in the event the foto book was made from which says: this was USED in the foto book/project and this was NOT USED in the foto book/project. So, how to delete those in t

  • BT admit that there IS a problem with downloading ...

    Unbelievable.  After submitting a formal complaint, I have just had a call from someone at BT admitting that there IS a problem with BT Net Protect Plus not downloading properly.  They are apparently "working on it" and I should get a call shortly wh

  • In first exan 1z0-007.

    Dear sir, In first exam(1z0-007) i fill up Registration form for sign up as First-name: Manoj Mid_name: K Last_name: Singh I got prometric id: ............. But in my OCA certificates my name printed as "Manoj Singh". Why midle name "k" absence/not p