Res.getPathTranslated() does not return correct URL of the page requested

Hi,
The res.getPathTranslated() statement in the below code (in doFilter method) does not return the correct URL of the requested webpage.
Whenever a web page is accessed using a return statement (eg : return "nextPage"; ) inside a button's action method or a hyperlink's action method, the res.getPathTranslated() returns the URL of the current webpage instead of returning the URL of the webpage that is actually requested.
For example if there is a button on the page http://localhost:29080/MyJaas/faces/firstPage.jsp
And the button_action() is as follows
button_action()
return "nextPage";
The res.getPageTranslaged() returns "http://localhost:29080/MyJaas/faces/firstPage.jsp" instead of "http://localhost:29080/MyJaas/faces/nextPage.jsp"
However, if the webpage is requested by populating the URL property of the hyerlink in creator IDE, the res.getPathTranslated() returns the correct (requested) web page.
How to make res.getPathTranslagted() return the correct URL when the webpage is accessed from hyperlink's / button's action method?
I know that the explation is not very clear, so please bear with me. Let me know if you need more clarificatons. Thanks in advance for showing interest in this issue.
And by the way, the code below is the same as that used in Jaas Authentication tutorial :- http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/jaas_authentication.html
package jaasauthentication;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class SecurityFilter implements Filter{
    /** Creates a new instance of SecurityFilter */
    private final static String FILTER_APPLIED = "_security_filter_applied";
    public SecurityFilter() {
    public void init(FilterConfig filterConfig) {
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException{
        HttpServletRequest req = (HttpServletRequest)request;
        HttpServletResponse res = (HttpServletResponse)response;
        HttpSession session = req.getSession();
        String requestedPage = req.getPathTranslated();
        String user=null;
        //We dont want to filter certain pages which include the Login.jsp/Register.jsp/Help.jsp
        if(request.getAttribute(FILTER_APPLIED) == null) {
            //check if the page requested is the login page or register page
            if((!requestedPage.endsWith("Login.jsp")) && (!requestedPage.endsWith("Register.jsp")) && (!requestedPage.endsWith("Help.jsp"))){
                //Requested page is not login.jsp or register.jsp therefore check for user logged in..
                //set the FILTER_APPLIED attribute to true
                request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
                //Check that the session bean is not null and get the session bean property username.
                if(((jaasauthentication.SessionBean1)session.getAttribute("SessionBean1"))!=null) {
                    user = ((jaasauthentication.SessionBean1)session.getAttribute("SessionBean1")).getUsername();
                if((user==null)||(user.equals(""))) {
                    res.sendRedirect("Login.jsp");
                    return;
        //deliver request to next filter
        chain.doFilter(request, response);
    public void destroy(){
}

Guys any solution for the above problem?
Right answer fetches 10 duke dollars..

Similar Messages

  • MessageChoice does not return correct value

    Hi
    I am problem with MessgeChoiceBean's improver beharior
    For the first time it retunrs blank and subsequently In one page if I select Yes, it returns No.
    In another page it does not return any thing for the first two selections. And I reciev flip values.
    I ran VO outside, VO is returning correct values.
    MessageChoice attributes and associated PPR:
    Data Type: Varchar2
    Initial Value: N
    Pick List view Definition: oracle.apps.xxx.docs.common.lov.server.YesNoVO
    Pick List View Instance: YesNoVO3
    Pick List Display Attribute: Meaning
    Pick List Value AttributeL LookupCode
    ActionType: firePartialAction
    Event: handleNewLocationFlagChange
    Parameter Name: newLocationFlag
    Parameter Value: ${oa.CustomerInfoVO1.NewShipToLocationFlag}
    ProcessParameterForm Code:
    if ("handleNewLocationFlagChange".equals(event))
    String newLocationFlag = pageContext.getParameter("newLocationFlag");
    Serializable[] parameters = { ""+newLocationFlag};
    Class[] paramTypes = { String.class};
    am.invokeMethod("handleNewLocationFlagChange", parameters, paramTypes);
    VO definition:
    select LOOKUP_CODE,MEANING
    FROM ONLINE_DOCS_LOOKUPS
    WHERE ONLINE_DOCUMENT_CODE = 'ALL'
    AND LOOKUP_TYPE = 'YESNO'
    ORDER BY ATTRIBUTE1
    View output:
    LOOKUP_CODE     MEANING
    N     No
    Y     Yes
    I have quite a bit number of columns to change render property.
    Any help will be appreciated.
    Thanks
    Prasad

    Your question is not clear, are you saying the values in the messageChoiceBean is not displayed properly. As far as I can see from the definition the poplist picks the values from a lookup(Yes, No) values and has a PPR action associated with it. Did you check what this method handleNewLocationFlagChange is doing in the AM ?

  • Fsbtodb macro in ufs_fs.h does not return correct disk address

    I'm using fsbtodb to translate the file inode block address to file system block address.
    What I've observed is fsbtodb returns corretct disk address for all the files if file system size < 1 TB.
    But, if ufs file system size is greater than 1 TB then for some files, the macro fsbtodb does not return correct value, it returns -ve value
    Is this a known issue and is this been resolved in new versions
    Thanks in advance,
    dhd

    returns corretct disk address for all the files if file system size < 1 TB.and
    if ufs file system size is greater than 1 TB then for some files, the macro fsbtodb does not return correct value, it returns -ve valueI seem to (very) vaguely recall that you shouldn't be surprised at this example of a functional filesize limitation.
    Solaris 9 was first shipped in May 2002 and though it was the first release of that OS to have extended file attributes I do not think the developers had intended the OS to use raw filesystems larger than 1TB natively.
    That operating environment is just too old to do exactly as you hope.
    Perhaps others can describe this at greater length.

  • Database does not contain a URL for the file

    How do I find out what file/update this is:
    The file digest/hash does not exist in the SUSDB, but I have no idea looking at the windowsupdate or softwaredistribution.log what file it is referring to.
    SELECT  [FileDigest]
          ,[DigestAlgorithm]
          ,[AdditionalHash]
      FROM [SUSDB].[dbo].[tbFileHash] fh
      WHERE fh.FileDigest =0x15B82F101E79C1E2181E43CC8A3CC137CBFDC91D
      or fh.AdditionalHash =0x15B82F101E79C1E2181E43CC8A3CC137CBFDC91D
    0 rows found
    Softwaredistribution.log
    2014-10-07 23:07:04.319 UTC    Error    w3wp.5    ClientImplementation.GetExtendedUpdateInfo    System.ArgumentException: The database does not contain a URL for the file 15B82F101E79C1E2181E43CC8A3CC137CBFDC91D.
    Parameter name: fileDigests
       at Microsoft.UpdateServices.Internal.DataAccess.ExecuteSpGetFileLocations(Byte[][] fileDigests)
       at Microsoft.UpdateServices.Internal.DataAccessCache.GetFileLocations(Byte[][] fileDigests, DataAccess da)
       at Microsoft.UpdateServices.Internal.ClientImplementation.GetExtendedUpdateInfo(Cookie cookie, Int32[] revisionIds, XmlUpdateFragmentType[] fragmentTypes, String[] locales)
       at Microsoft.UpdateServices.Internal.ClientImplementation.GetExtendedUpdateInfo(Cookie cookie, Int32[] revisionIds, XmlUpdateFragmentType[] fragmentTypes, String[] locales)
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
       at System.Web.Services.Protocols.WebServiceHandler.Invoke()
       at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
       at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
       at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
       at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
       at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

    How do I find out what file/update this is:
    Hows about.. rather than chasing a rabbit down the hole doing whatever you think you're doing...
    We start with this: What problem is it that you're actually trying to solve?
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Server does not return query metadata check the query

    hi,
    i want know how to  use bex query designer,
    when i  insert a data provider,the message is appear "server does not return query metadata check the query",
    who can help me ?
    thanks a lot !
    addition: my current entironment is: gui710 with sp4,bi710 with sp2.

    Hi,
    All the yellow and red lights will have an effect on query performance or execution.  Read up on them as there are too many to explain via this forum.
    There is a document on SDN on query performance.  Some useful links:
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9f4a452b-0301-0010-8ca6-ef25a095834a]
    [http://help.sap.com/saphelp_nw70/helpdata/en/41/b987eb1443534ba78a793f4beed9d5/frameset.htm]
    [http://help.sap.com/saphelp_nw70/helpdata/en/d9/31363dc992752de10000000a114084/frameset.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/2e/caceae8dd08e48a63c2da60c8ffa5e/frameset.htm]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0501cb9-d51c-2a10-239c-c141a22c45a6]
    Cheers...

  • I have a manual that contains headings and index entries that contain less than and greater than characters, and . The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the C

    I have a manual that contains headings and index entries that contain less than and greater than characters, < and >. The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the Contents or the Index of the generated HTML. In the Contents the words are completely missing and in the index entries the '\' characters that are required in the markers remain in the entry but the leading less than symbol and the first character of the word is deleted; hence what should appear as <dataseries> appears as \ataseries\>. I believe this is a FMv12 bug. Has anyone else experienced this? Is the FM team aware and working on a fix. Any suggestions for a workaround?

    The Index issue is more complicated since in order to get the < and > into the index requires the entry itself to be escaped. So, in order to index '<x2settings>' you have to key '\<x2settings\>'. Looking at the generated index entry in the .js file we see '<key name=\"\\2settings\\&gt;\">. This is a bit of a mess and produces an index entry of '\2settings\>'. This ought to be '<key name=\"&amp;lt;x2settings&amp;gt;\" >'. I have tested this fix and it works - but the worst of it is that the first character of the index entry has been stripped out. Consequently I cannot fix this with a few global changes - and I have a lot of index entries of this type. I'm looking forward to a response to this since I cannot publish this document in its current state.  

  • Why this candlestick Chart does not returns an URL as a link ?

    Hi,
    I have done a nice Candlestick Flash Chart. But The problem is that the link does not work. When I click on a point - the cross -, nothing happens, which means the URL is not displayed in the URL zone of the navigator - I am under Firefox. I have been using this technique on other charts (2D Column) and it was working nicely. I don't see why it is not working in the Candlestick type chart. I have been outputting the result of the PL/SQL into an item to check if the SLQ generated by the PL/SQL function was coorect and tested it under SQL Developper and I do get good results and nices URLS under SQL Developper. Thus is why i don't understand why this is not working here.
    DECLARE
    X VARCHAR2 (4000);
    BEGIN
    x := 'SELECT
    ''f?p=&APP_ID.:8:&SESSION.:GET_DETAIL_MONTH:NO::P8_MONTH:''
    ||TO_CHAR(TRUNC(DATE1, ''MM''), ''MM/YY'') LINK,
      TO_CHAR(TRUNC(DATE1, ''MM''), ''MM/YY'') LABEL,
      AVG(VALEUR) OPEN,
      MAX(VALEUR) HIGH,
      MIN(VALEUR) LOW,
      AVG(VALEUR) CLOSE FROM EVV_'|| UPPER (:p184_ename) ||
    ' WHERE CLEF_VAR = (SELECT CLEF_VAR FROM SITE_ECHELLE WHERE SITE = '''
    || UPPER (:p184_ename) ||
    ''') AND DATE1 BETWEEN TO_DATE (''01/01/'
    ||:P8_YEAR||'000000'', ''DD/MM/YYYYHH24MISS'') AND TO_DATE (''31/12/'
    ||:P8_YEAR||'235959'', ''DD/MM/YYYYHH24MISS'')
    GROUP BY TRUNC(DATE1, ''MM'')
    ORDER BY TRUNC(DATE1, ''MM'')';
    RETURN (X);
    END;Example of SQL generated by the above function :
    SELECT 'f?p=12400:8:1473118156348570:GET_DETAIL_MONTH:NO::P8_MONTH:'
    ||TO_CHAR(TRUNC(DATE1, 'MM'), 'MM/YY') LINK,
    TO_CHAR(TRUNC(DATE1, 'MM'), 'MM/YY') LABEL ,
    AVG(VALEUR) OPEN,
    MAX(VALEUR) HIGH,
    MIN(VALEUR) LOW,
    AVG(VALEUR) CLOSE
    FROM EVV_E007
    WHERE CLEF_VAR =
    (SELECT CLEF_VAR FROM SITE_ECHELLE WHERE SITE = 'E007'
    AND DATE1 BETWEEN TO_DATE ('01/01/2006000000', 'DD/MM/YYYYHH24MISS') AND TO_DATE ('31/12/2006235959', 'DD/MM/YYYYHH24MISS')
    GROUP BY TRUNC(DATE1, 'MM')
    ORDER BY TRUNC(DATE1, 'MM')
    Example of output of the link :
    f?p=12400:8:1473118156348570:GET_DETAIL_MONTH:NO::P8_MONTH:01/06     f?p=12400:8:1473118156348570:GET_DETAIL_MONTH:NO::P8_MONTH:02/06     
    Thank you for your kind answers !

    Hello Christian,
    I first thought that your url shouldn't contain / (in your month format - better to use a dash -).
    But then I remembered the Candlestick chart that is standard in APEX is having a bug.
    I did a quick test here: http://anychart.apex-evangelists.com/pls/apex/f?p=454:8:0::NO:::
    On the left you see the default chart in APEX (based on Anychart 3.3), if you click on the candle it doesn't show hello. If you click on the right chart it does.
    The right chart is based on Anychart 5 and makes use of our integration kit.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • FDM for PBCS - Drill Thru does not return any records in landing page

    This is referring to the Data Management functionality in PBCS, not on-premise FDMEE.
    I loaded in a file, for example:
    Region|Product|Account|Amount
    10|100|1000|9,000
    10|100|1000|1,000
    In FDM, I am using a multi dimensional map to derive another field. For example, if Region is 10 and Product is 100, than Department = 555.
    so in FDM, I would end up with
    10|100|1000|555|9,000
    10|100|1000|555|1,000
    Once loaded to PBCS, that loads in as:
    10|100|1000|555|10,000
    I built a form that shows this intersection, and then 'drilled to source'. When I get to the FDM landing page, there are no records shown. Is this because the derived field (department) does not exist in the source, or am I doing something wrong?
    Appreciate any help.

    Do you have access to the server logs by any chance?
    Can you check the dimension class for your Scenario dimension in your target application? is it set to SCENARIO?
    not showing source records is typically related to FDMEE not finding values in TDATASEG table.
    HTH

  • Safari does not show correct format of web page

    I belong to Butterfly Conservation's Upper Thames Branch. They have recently set up a new website, but I cannot get two of their pages to display properly (although they are quite ok in Netscape). They should include a list of butterflies and moths, with photos, but none of the photos show at all, while the lists go off the page at the right-hand side. Can anyone tell me what is wrong? The URLs concerned are:
    http://www.upperthames-butterflies.org.uk/utb_butterflies.html
    http://www.upperthames-butterflies.org.uk/utb_moths.htm

    It looks like they need to add a new line after line 139: the new line just needs to contain <td>. That's for the butterflies page. I'm getting 404s on the moths page, so I can't tell what's up there.
    eMac Combo 1GHz/1GB/60GB   Mac OS X (10.4.8)   CanoScan D646U, Canon iP1600, CrossFire 120GB, DSL, D-Link DI-624

  • Urlconnection does not execute any javascripts at the page?

    Hello,
    i got a problem when i try to connect to a webpage using
    HttpURLConnection uc = (HttpURLConnection)url.openConnection();
    uc.connect();
    it doesn't execute the javascripts ?
    Any ideas on how i can execute them?
    thanks in advance!

    well it starts a counter but that doesn't matter,
       <script type="text/javascript" src="http://site.com/scripts/script.js"></script>
         <script type="text/javascript"> is included in the page where i try to connect;
    this should start the counter, it does when i browse to it, so no problems
    that function is in the file http://site.com/scripts/script.js, like i said
    <script type="text/javascript">initCounter();</script> that function will offcourse call other functions inside that file.
    So that is it :p

  • NSV w/RT FIFO Read does not return correct value

    I have a cRIO which is hosting a NSV w/ RT FIFO enabled.  I can observe its value in the DSM.
    I have a LabVIEW exe that reads this NSV with a SV node on the diagram.  This read value is incorrect.
    If a run the same vi from the development environment then the correct value is read.  If I remove the RT FIFO option then 
    the exe version will work correctly.  According to the NI SV white paper, each reader of a NSV w RT FIFO recieves its own
    client side buffer so there should not be any interference.  It should be mentioned that I am also creating a SV reference to this same NSV on the cRIO
    for read only use.

    Hello,
    Have you tried using a Network Published shared variable to communicate between the host and target? This architecture would use a Network Published Shared Variable in a normal priority loop to pass data to a Single Process RT FIFO enabled shared variable on the target to move data to the time critical loop. Is the cRIO that you are accessing the only one present on the network? Also,. if you slow down your loop speeds, do you get correct values?
    -Zach
    Certified LabVIEW Developer

  • Custom Integrator - Date Picker/LOV does not return a value to the cell

    Hi,
    I have configured a webADI template with a date picker in it. Though the picker is rendered when i double-click on the cell, the selected date is not populated back. Same happens for any other list of values may render in the integrator. Any suggestions on debugging this issue.
    Regards,
    Vinayaka

    I have got the LOV working now. The issue was that I had not provided the table-select-column with the interface column name. It was set to the table column name.
    Regards,
    Vinayaka

  • Print does not work correctly for this web page

    When I print this, part of the bottom of the text is dropped (2-3 paragraphs). If I set it to landscape mode, even more of it is dropped.

    Just adding an image of a PDF I created using landscape mode.

  • HP LaserJet 400 MFP M425dn does not print 1/4" of the page when using the feeder

    Hello,
    When using the feeder to make a copy I lose about 1/4" of my copy along one side. 
    We copy a lot of full page sheets with little or no margins.
    Any suggestions on how to correct this?
    Thank you

    Most (if not all) commonly available laser printers have 'unprintable margins' on each edge.
    On most LaserJet printers, these margins are about 4 mm (0.167"), although on some devices I believe that smaller unprintable area margins (of about 2 mm) can be selected when printing (although possibly not when copying).
    When printing with PCL5 drivers, there is also the minimum logical page margin to be taken into account - this is about 6 mm (0.24") by default, although the printing options mentioned above (on some models) can reduce this slightly. 
    See also http://h30434.www3.hp.com/t5/Other-Printing-Questions/printable-area-cm6030/m-p/4863083/

  • Curser does not seem to stay on the page

    When I am typing, in various applications, the curser seems to fall off the page.  I get a beep that indicates I have to click on the page or app in order to keep typing

    Hi James,
    What browser are you using?  Do you have any settings that restrict cookies from being saved?  Have you tried any other browsers?
    -David

Maybe you are looking for

  • How do i reset my passcode to my ipod touch

    how to reset passcode on ipod touch

  • Order to Cash scenario

    Dear  Friends, Am a technical resource and have some good exposure to SD order to cash flow and transactions! But cannot put them in a sequence since am not in touch with SD or any logistics for quite time now! Can some one please get me info. about

  • For the Attention of BTCare Staff. Assistance requ...

    Hi there help is required immediately. Where do i start. Basically we have had problems with our broadband since we got it in a bit back and recently it got even worse. We reported this all to BT the same engineer has had too visit twice even though

  • Problems with distributed applications.

    I m' working on a application that will allow a computer(client) to communicate with an other computer(server). So, i want the client to receive an interface of my application(not in html but in java) that is all ready present in a class on the serve

  • Problem with $$Last_Extract_Date

    Hi, We're running our execution plan in full load. Since we are doing full load, the $$LAST_EXTRACT_DATE is null and it is null in the workflow log. Why does it default to 1/1/1753 in the query? Thanks in advance.