Null query string in servlet filter with OC4J 10.1.3.1.0

I have a strange problem with OC4J 10.1.3.1.0. In the servlet filter, while requesting the querystring with HttpServletRequest.getQueryString the result is null, even if it is verified with a sniffer that that query string is there. This happens only with certain requests. The query string is long but nothing very special otherwise.
Any ideas what might be wrong?
Thanks,
Mika

I got the same problem. I tried in others application servers alternatives and it works. By now i have to change links like this "http://localhost:8888/SIVIUQ/LoadIndex.portal?test=1" for forms using javaScript to send the parameters corresponding to the button pressed. To use buttons instead links is not the better solution due to usability. Any suggestion to solve this problem?
Thanks
Javier Murcia
Yo tengo el mismo problema. He intentado con otros servidores de aplicaciones y funciona. Por ahora tengo que cambiar links como "http://localhost:8888/SIVIUQ/LoadIndex.portal?test=1" por formularios, usando javaScript para enviar los parametros correspondientes al boton presionado. Usar botones en vez de links no es la mejor solucion debido a usabilidad. ¿Alguna sugerencia para resolver este problema?
Gracias
Javier Murcia

Similar Messages

  • 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.

  • Servlet filter with the dispatcher set in the filter-mapping

    Hi all,
    I am porting an application from Tomcat to OC4J
    I am running on OC4J 10.1.3, it supports servlet 2.4 spec.
    They are some new features here, where you can decide how you servlet filters act when you use the request despatcher.
    This does not seem to work for me.
    I have an AccessFilter and a NoCacheFilter.
    The Access Filter just defines what you can access.
    The NoCacheFilter helps us with caching problems for example when I want a file
    called Test.js IE thinks its downloading Test_[MN899].js but really in the filter we fix the URL and forward it to Test.js .
    Its in this forwarding that we have the problem as when we forward OC4J applies the filters again. And so we enter an infinite loop.
    I have a bad work around, that works on some ocasions not in others so I need a better solution...
    I am new to Oracle.
    Is there there a bug database that I can search?
    Has anyone seen this problem before?
    Thanks for your time,
    Cormac

    If you are using a sessions.xml file, you can get your project from your session. Ensure that when you access your session from the SessionManager, that you do not have it login.
    Session session = SessionManager.getManager().getSession("my-session", false);
    session.getProject().setConnector(...);
    session.login();
    If not using a sessions.xml, you can either read your Project from the XMLProjectReader, or instantiate your Project class directly.

  • Question to Proxy in Reading Query String

    Hi, our team have a problem, and let me state below:
    We use reverse proxy in machine A to redirect to machine B.
    Machine A is SJWS 6.1, and it has customized SAF.
    The SAF has one mission, which is to retrieve query string from each requests.
    The question is:
    When the SAF read the query string in body data( with netbuf_getc() ), the application in AP SRV cannot read anything about query string.
    In the contract way, if we let AP SRV to process data through query string first, and then we try to get body data( with netbuf_getc() ), NSAPI gets nothing.
    Any suggestion?!
    thanx.
    environment:
    ================
    machine A:
    Windows 2003 Server Enterprise (32 bits)
    Sun Java System Web Server 6.1 SP5 with Reverse Pxory Plug-in
    machine B:
    Windows 2003 Server Enterprise (32 bits)
    Sun Java System Application Server 8.1 (Enterprise, Platform both have been tried.)
    ================
    Message was edited by:
    potai.tsou

    The query string is part of the request URI. It is never part of the request body.
    I assume you mean that your SAF reads the request body to extract form data. If your SAF consumes the request body, that request body will not be available to other SAFs.
    It sounds like you should consider writing an input filter, not a SAF, that will process the request body. There's information on input filters in the NSAPI Programmer's Guide at http://docs.sun.com/source/817-1835-10/npgcfltr.html.

  • A weird query string error?

    hi, everybody
    recently, I found that a particular user always has the request in the query string "Get \Servlet\com.ec.ercbroker.servlets.PingServlet". The user send the request almost every day. In each day, it sends the request very few minutes.
    the status code of the �GET� is 302 Which means the uri has been removed. the error message in our log file is:
    �404;http://66.151.158.177:80/servlet/co...Servlet�however, "66.151.158.177" is NOT our ip address. the question is: why the GET errors for another web site (66.151.158.177) are sent to us? are they trying to hack our system? how to prevent this?
    thank you! looking forward to your answer.
    louis

    organization class has a transient attribute called localAddresses
    The instance is saved into the session. Could these be related in some way shape or form?
    Transient attributes are not saved when the bean is serialized. So if the bean gets serialized/unserialized that attribute would not be available.
    I don't recognise the exception - is it a custom one you have? What is the full stack trace?
    What does your "getLocalAddresses" method look like?

  • SharePoint 2013 List View with query string filter stops working after editing view from browser

    I have created one list definition in which I have added one list view which will filter data from query string paramater
    So when I am creating list from my list definition, view with query string filter is working fine.
    But when I am modifying view from UI(I am not changing any thing , just opening "Modify View" page and then click on "Save" button), view gets stop working means it's not filtering data based on query string
    Any suggestion what I am missing?
    Below is my list view schema
    <View BaseViewID="11" Type="HTML" TabularView="FALSE" WebPartZoneID="Main" DisplayName="$Resources:OIPLBScoreCard,viewFilterTasksByTarget;" MobileView="True" MobileDefaultView="False" Url="FilteredTasks.aspx" SetupPath="pages\viewpage.aspx" DefaultView="FALSE" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
    <Toolbar Type="Standard" />
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    <ParameterBinding Name="TargetId" Location="QueryString(TargetId)" />
    </ParameterBindings>
    <JSLink>hierarchytaskslist.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <JSLink>clienttemplates.js</JSLink>
    <RowLimit Paged="TRUE">100</RowLimit>
    <ViewFields>
    <FieldRef Name="Body"></FieldRef>
    <FieldRef Name="Title"></FieldRef>
    <FieldRef Name="StartDate"></FieldRef>
    <FieldRef Name="DueDate"></FieldRef>
    </ViewFields>
    <ViewData>
    <FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete"></FieldRef>
    <FieldRef Name="DueDate" Type="TimelineDueDate"></FieldRef>
    </ViewData>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="oipscTargetLookup" LookupId="TRUE"/>
    <Value Type="Lookup">{TargetId}</Value>
    </Eq>
    </Where>
    </Query>
    </View>
    I have one lookup field from "Target List" in my source list and I want to filter data based on that lookup field.

    Hi JayJT,
    The Miscellaneous is located in the contact list that you used for the connection.
    So , you need to edit the page, then edit the contact list that you used, in the web part properties of the contact list, you will find Miscellaneous, then expand it and select ‘Server Render’ .
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • QSUF (Query string url filter) and SQL Server reporting services report viewer parameters

    Hi,
    this is my issue:
    I have a SQL Server reporting services web part on a page with a report with 1 parameter, lets say it's a client list
    Then i have a QSUF that will be used to filter the clients list through the URL
    However, once i connect the filter and the report viewer web part, the parameter goes away and is no longer accessible
    I'd like to somehow keep the parameter visible, in case there is no parameter sent through the URL, i would like the user to be able to choose a client from the parameter drop down list
    I saw that there is a "send empty if no values are passed" option, but i can't seem to get this working properly and i don't know if this option will make the parameter visible again
    Any help would be appreciated
    Thanks.

    Hi,
    According to your post, my understanding is that the query string url filter web part not worked well with SQL server reproting services web part.
    Did you use the Wiki page layout in your environment?
    You can change the page to a web part page, then check whether it work.
    There is a similar thread for your reference.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/4d7584e3-8e1a-48bf-9346-32f8cb480dd1/query-string-url-filter-web-part?forum=sharepointgeneralprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part

    Hi,
    I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
    http://server/pages/Default.aspx?Title=Arup&Title=Ratan
    But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
    I have followed the
    http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
    Please suggest me.
    Thanks | Arup
    THanks! Arup R(MCTS)
    SucCeSS DoEs NOT MatTer.

    Hi DH, sorry for not being clear.
    It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
    (or a Performance Point Dashboard etc.) and you insert it into your page and add
    a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
    with multiple values for one parameter. If you have any more questions let me know. See you, Ingo

  • Servlet filters work with OC4J 9.0.2, but not JDeveloper 9.0.2

    I spent a day or so last week building a servlet filter and testing it in OC4J 9.0.2. It works fine. I didn't bother loading it into JDeveloper because there weren't any complicated debugging issues.
    I just tried loading it into JDeveloper 9.0.2 this morning, and I discovered that even though OC4J 9.0.2 has no problem with servlet filters, apparently JDeveloper 9.0.2 does. It complains about validation of the "web.xml", saying that "filter" is not a valid element of "web-app". I was specifying the 2.3 dtd.
    Is this a problem that I can easily work around in JDeveloper 9.0.2?
    If I load the JDeveloper 9.0.3 developer preview, can I get it to use 9.0.2 for its embedded OC4J, and not produce any new problems?

    For JDev 9.0.2, this issue is documented in the release notes at
    http://otn.oracle.com/products/jdev/htdocs/readme_902.html#vmoption

  • How can I use today's date as default value in query string filter web part in SharePoint

    I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...

    Hi,
    Per my understanding, you might want to set a default value to the Query String Filter Web Part.
    It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
    By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
    of browser.
    If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
    URL into the address bar:
    http://sharepoint/SitePages/Page1.aspx?t=value1
    Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
    page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
    About how to redirect user to other page with an URL:
    http://www.tizag.com/javascriptT/javascriptredirect.php
    How to get today’s date using JavaScript:
    http://www.w3schools.com/js/js_dates.asp
    Best regards      
    Patrick Liang
    TechNet Community Support

  • Using Query String Parameters with Session Scoped bean

    I would like to pass query string parameters from a product page (user clicks on a specific product commandLink) that is request scope to a details page that is session scoped.
    The problem is that the session scoped page only handles the first request. If you view the details of a product and then navigate back to the product page and choose another product ... the details page will not handle the new query string parameters and display the details for the first product chosen.
    Is there a way to make the session scoped bean recognize the query string parameters past the first request?

    I was able to replicate this problem with a very simple app that performs a redirection... just like the real app. Here's the simple app that I put together:
    From request scope page:
    <f:view>
             <h:form>
               <h:commandButton value="Link 1" action="#{reqbean.Link1}"/>
               <br/><br/>
              <h:commandButton value="Link 2" action="#{reqbean.Link2}"/>
            </h:form>
           </f:view>
    From request scope bean:
    public String Link1() throws IOException
        // Add event code here...
        //redirect the user
        FacesContext.getCurrentInstance().getExternalContext().redirect("untitled2.jspx?p=1");
        return null;
      public String Link2() throws IOException
        // Add event code here...
        //redirect the user
        FacesContext.getCurrentInstance().getExternalContext().redirect("untitled2.jspx?p=2");
        return null;
      }At this point... I put a println in the constructor of the session scoped bean because this is where I want to get the query string params. The constructor only gets called the first time a redirect is performed.

  • Query String parameter with # in its value

    Hi,
    When I send a parameter in a query string with value that has the hash symbol (i.e #) that parameter when fetched returns null. Why so?
    Eg :
    Page 1 :
    String strTest = "1#2";
    <a href="test.jsp?test=<%=strTest%>">Page 2: test.jsp
    String strTest=request.getParameter("test");
    System.out.println("strTest : "+strTest); // Prints null
    Thanks</a>

    Hi,
    When I send a parameter in a query string with value
    that has the hash symbol (i.e #) that parameter when
    fetched returns null. Why so?
    Its a special character and the url has to be 'rewritten properly.
    >
    Page 1 :
    String strTest = "1#2";
    <a href="test.jsp?test=<%=strTest%>">>
    </a>
    try this
    <%
      String strTest = java.net.URLEncoder.encode("1#2");
    %>
      <a href = "test.jsp?test=<%=strTest%>">test</a>and check the output in your next jsp :)
    ram.

  • Query string is null while dispatching the request in Websphere for Endeca pages

    Hi,
    When AssemblerPipelineServlet forward the request with dispatcher the query string is missing from the request in Websphere 7.0 only(works fine in JBOSS).
    This is happening only for the pages those are created in the Experience Manager.
    Ex: /store/us/detail?A=1204455 - This URL will render the /cartridges/ProductDetail/ProductDetail.jsp page. When we access the /OriginatingRequest.queryString in the JSP, it is giving null.
    Please help us to resolve this issue.
    Regards,
    Ravinder P

    Got the solution to this problem . I was using wlClient.jar & WlfullClient.jar in my classpath . removed wlClient.jar from java client app and now i am able to get the IWorkflowContext object.
    Hope this helps for the coming generations :)
    Thanks

  • SharePoint 2013 Query String FIlter cannot edit

    Hello,
    I am trying to add a Query String (URL) filter web part to a page, but when I do, it's just shows as what looks like a blank textbox and I have no options to edit it or anything, there is no checkbox or dropdown menu.
    I'm working in IE 10 and have tried both with Compatibility on and off.
    Is there some kind of setting I am missing?
    Thanks!

    Hi Ruby, this sometimes happens. You can do one of two things: select another webpart and edit it (this will make the controls for your QS web part show up), or highlight the QS webpart and select "web part properties" in your ribbon (which will
    open up the web part editor).
    cameron rautmann

  • Set whole Query string to null or ""

    Good morning!
    Is there a way to set the whole query string to null or ""?
    so that request.getQueryString() = "" ?
    I've been trying something like this
    String body = "";
    request.setAttribute(???, body);
    what would go in the ???
    thanks,
    Alex

    Thats not good. I'm having a problem when the session times out. When a person times out , the system forwards them to the login screen. When they login, they are authenticated by siteminder and the last action they requested is sent (whatever is in the querystring) The querystring tries to go to our controllerservlet (in the querystring), and bypasses the login servlet! I figured if you set toe querystring to "", it would have to go to the loginservlet

Maybe you are looking for

  • HT1660 How do I run itunes from external Hard drive?

    How do I run itunes from external hard drive. I only have ssd on PC and media is too large to fit

  • Need help with scenario BPM Http-RFC Sync/async bridge

    hi all! i've got the following scenario: HTTP-BPM(XI)-RFC synchronous both of them. for that, i'm using S/A bridge in the BPM, but i'm getting the error 'Timeout condition of pipeline reached'. i think the problem is that the process gets lost in the

  • Help I forgot my first Apple ID.

         Please help me. I restores my frozen iPad on the computer and now it is aasking fo an activation ID. In the text it says k^^^^^@k^^^^^.com. I wouln't let me skip this if I don;t get past this I woulnt be able to use my iPad at all. I tried reset

  • FI FLOW(URGENT)

    Dear all, Can anyone tell the FI flow? For ex: In SD the flow is Enquire-Quotation-Sales order-Delivery-invoice-payment. Thanks in advance. I will award good points. Regards, A.Anandarajan.

  • Message says I'm not allowed to post?

    I've been trying to post a question to the iPhoto community about backing up iPhoto, and when I try to submit the post I get the message "you are not allowed to create or update this content".  I've tried several times, logging out after each failure