A security-constraint question - Hopefully to get answered.

I have a security-constraint that protects URLs with pattern "/test/*". Now, the login page is defined as /login.jsp.
Now if i directly access the url say "/test/1.jsp" , I am redirected to /login.jsp.
Now, what i want is to find out what was the originally requested URL on the login jsp. In other words, I want to put a S.O.P statement in login.jsp that the originally requested URI was /test/1.jsp .
I tried searching Java sites and stuff nothing has come up. None of the request object's methods allude to it also.
Thanks for your help
Nikhil

You can use the HTTP referrer header for this.String referrer = request.getHeader("referer"); // Yes, with the legendaric misspelling in it.Only keep in mind that the client has full control over what it sends with the request, so it could also spoof the referrer value. But if you only use this to redirect back to the desired page after login, those users (hackers) won't take benefit from it.

Similar Messages

  • Tomcat security constraint question

    Hi all,
    we're using the following security constring for securing our servletts. Everything works fine so far.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Test</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    </security-constraint>
    Now the question: We've implemented some kind of password reminder which allows you to retrieve a new password, this servlett should be accessible by anybody.
    Do we have to list all the url-mappings except the one for the password reminder or is there a special tag to exclude an url-pattern from the wildcard-rule which we haven't yet? Any hints would be appreciated...
    Regards, Florian

    Using: Tomcat 5.5.20 on Windows Server 2003
    Couple Questions:
    1. How do I prevent users from entering a double
    quote in the INPUT field on the server side?use javascript
    Also, is
    it possible to replace the double quote with single
    quote on the server side? If yes, How? I don't want
    to use JavaScript because it can be disabled.yes,
    yourVarString.replaceAll("\"","\'");
    2. Where is the best place to ack Tomcat questions?http://tomcat.apache.org/findhelp.html
    I
    had some question on security-constraint. I have a
    folder that has sercurity-constraint on it, so when
    that folder is accessed tomcat asks for credentials.
    Once user provides proper Username and Password, it
    grants them the access. Now I want to know once the
    access is granted, how come it doesn't display
    index.jsp form that folder, It displays an image. I
    don't understand why?
    Please help....i have encountered that also on tomcat 3 intalled on linux machine.. the account that was being used to start the tomcat is root.. then the resolution was the owner account of the tomcat starts the server and it worked! hope that give you an idea

  • Web.xml - security constraint question

    I want to make a kind of inverted security constraint. I want to ALLOW access to one specific page over HTTP. All other pages should be HTTPS.
    Is that possible???

    Use the <security-role-ref> for the Faces Servlet to map the LDAP roles to the logical role names used by the managed bean to determine if links may be rendered.
    Bean code:
    this.isAdmin = context.getExternalContext().isUserInRole("admin");web.xml:
            <security-role>
              <role-name>Local Admin Group</role-name>
         </security-role>
         <security-role>
              <role-name>DBA Group</role-name>
         </security-role>
        <!-- Faces Servlet -->
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <security-role-ref>
                  <role-name>admin</role-name>
                  <role-link>DBA Group</role-link>
           </security-role-ref>
            <security-role-ref>
                  <role-name>admin</role-name>
                  <role-link>Local Admin Group</role-link>
           </security-role-ref>
        </servlet>

  • Reposting a question that didn't get answered in previous post: best preset to save mpeg project?

    So it took me a week or so to get to try out the answer I'd gotten, & I couldn't get that answer to work, and then my follow-up question didn't get answered, which makes me wonder if threads & discussions kinda die if they're not kept up? (I'm not very experienced in how these forums work, apologies).  In case that is the case, I'm starting this new one, but refer you back to the old (unfinished) one.  Just scroll down to the last few exchanges to get the gist of it.  Thanks . . .  Mark
    the previous discussion:   http://forums.adobe.com/message/4663058  

    Steve--Sorry if this approach wasn't the best--as I said, I'm not well-versed in forum protocol-- but I did post it last week to the end of that discussion as you recommended but didn't get a response, so I wasn't sure how best to proceed from there.  Anyway, hopefully this works ok for you.  Here's a copy of the relevant exchange. I'd written:  "I'm using a Lumix DMC-ZS7 which, on the small test I did, was set to 640x480 & is a MOV file, and while the "correct" preset choice isn't there, there is probably a best choice among the many choices that are there, and that is my question--which should I choose for this particular clip at this resolution?  Both for quality & cross-platform usability?  The camera also has AVCHD Lite", whose specs read: -- SH: 17Mbps /H:13Mbps /L:9Mbps ) / 30fps (Motion JPEG)   1280x720 pixels, NTSC Mode: NTSC model: 60p(CCD output is 30p)."
    You wrote back:  "Shoot in AVCHD Lite and, when you set up your Premiere Elements project, select the project settings for AVCHD Lite and you should get much better results.
    Obviously, your video is not going to look perfect at full screen on a computer no matter what output settings you use. Your monitor is likely larger than 1280x720. But you should then be able to output using Share/Disc/WMV setting your output for 1280x720 using the Advanced settings."
    And here's my follow-up, & hopefully final, question, from last week:
    "Hi Steve-- I just now had time to try out your recommendation--and I will in the future shoot in AVCHD Lite--but for the existing mpeg stuff--I could not find the settings you recommended.  ("Obviously, your video is not going to look perfect at full screen on a computer no matter what output settings you use. Your monitor is likely larger than 1280x720. But you should then be able to output using Share/Disc/WMV setting your output for 1280x720 using the Advanced settings.")  Firstly, I took this to be your answer to my question of how best to save mpegs, not AVCHD Lite, am I right there?  Under Share/Disc I couldn't find any WMV settings whatsoever in any of the choices, nor was there any Advanced option.  Under Share/Computer there is the Advanced option--but again, I couldn't find a WMV setting.   I did find 1280x720 under the Share/Computer/mpeg presets, as a couple HD 720 options & three HDTV 720 options.  If indeed one of those is the best choice--which one?  Or is your original suggestion still the one, with its non-obvious location to be revealed?  (by the way, I've got Premiere v10.0).
    Question 2-- when I do start using the AVCHD lite, is there any one preset you can advise as the best one to use?
    Thanks again--Mark
    and thanks again again--Mark

  • Why don't i get answers of security question to my email address ??

    Why don't i get answers of security question to my email address ??

    We wouldn't know that. They could be in your Junk email box, or the Rescue email address that you have on your account may not be what you think it is. Just FYI - the Rescue email (where that email would be sent to) is not the same as your Primary Apple ID email.
    If you are not seeing the email at your Rescue email address, contact Apple Support to get them reset:
    ACCOUNT SECURITY CONTACT NUMBERS
    Cheers,
    GB

  • How to get answers to my security questions w/o a rescue email??

    How??
    Is there any way for me to get answers/change my security questions when I don't have a rescue email?

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (102693)

  • HT5312 Your security questions do not match what I put in when I opened the account, why can't I get security questions that have my answers?

    Your security questions do not match what I put in when I opened the account, why can't I get security questions that have my answers?

    From a Kappy  post
    The Three Best Alternatives for Security Questions and Rescue Mail
       1. Use Apple's Express Lane.
    Go to https://expresslane.apple.com ; click 'See all products and services' at the
    bottom of the page. In the next page click 'More Products and Services, then
    'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
    ID security questions' and click 'Continue'. Please be patient waiting for the return
    phone call. It will come in time depending on how heavily the servers are being hit.
    2.  Call Apple Support in your country: Customer Service: Contact Apple support.
    3.  Rescue email address and how to reset Apple ID security questions.
    A substitute for using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • I for get answer  security questions

    i for get answer  security questions

    Alternatives for Help Resetting Security Questions and Rescue Mail
    Due to recent changes in how Apple handles this issue, the most successful
    option is #5, below.
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    How to Manage your Apple ID: Manage My Apple ID

  • I play game on my iphone and i want to buy stuff to pass the level so when i go to my apple id password no problem but the probem is verificcation required answer the securi questions! never get it right.so what can i do ? i can't remember my security ans

    forgotten my security answer.

    Go to https://expresslane.apple.com
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Forgotten Apple ID Security Questions'.

  • My itouch is asking me for answers to security questions that I never answered and it won't let me buy anything from the iTunes store.  I tried a hard reset to original settings but it still asks for answers.

    My daughter's itouch (registered to my apple account) is asking for answers to security questions that I never answered and it won't let her buy anything from the iTunes store.  I tried a hard reset to original settings but it still asks for answers.  How do I reset the security questions or get rid of them appearing altogether?  I can purchase apps on my phone (same apple account) and it doesn't ask me for security questions.

    See Kappy's previous discussion.
    HT5312 How to recover security...: Apple Support Communities

  • I forget my security question,how to get it back?

    i forget my security question,how to get it back?

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (108190)

  • Not able to get rid of security-related questions in runtime

    Hi,
    I am simply using NetBeans 6.0.1 and the emulator QwertyDevice and the emulator platform WTK 2.5.2 for CLDC.
    I have chosen Alias as trusted in the signing option in the project configuration page. however still I am getting security confirmation questions in runtime to access the local files for instance.
    Would anyone please advise me how to get rid of that?
    Also I have deployed the application on SonyEricsson k800i and would like to get rid of the security confirmations on that device as well. What is the guideline?
    Thank you

    Right clicking on it is not even an option, just hovering over it seems to induce a "nuclear" reset of the whole desktop and graphic card on the iMac.
    Have meanwhile found a possible solution by erasing the dock preference file in the user/library/preferences folder to reset the dock to it's default state. Will try this out through a Skype conversation with that Buddy.
    Was seen here :
    https://discussions.apple.com/message/16447109#16447109
    Thank you for stepping in. Good to know that people are still willing to help in this community.
    Greetz to the UK from France

  • HT201303 Hi, I forgot my security questions. how to get back.thx

    Hi, I forgot my security questions. how to get back.thx

    See this similar post.
    https://discussions.apple.com/thread/4205909?tstart=150
     Cheers, Tom

  • How can I avoid security questions I've never answered to begin with?

    How can I avoid security questions I've never answered to begin with?

    You need to contact Apple to get the questions reset. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (94848)

  • HT1711 Why do I get Security Info questions at purchase?  then get an error occured.  we coudln't save your changes

    I try to purchase, put in id and password, buy,then prompted at Security Info page - asked to provide answers to security questions (never asked before), answer questions and get "an error occured.  We coul not save your changes."  I cannot continue with purchase.  If I was asked these questions before and answers are located somewhere - where might I find them?

    Us too! We've answered the questions and then get "An error occurred. We couldn't save your changes". Now what? We have a balance in the itunes account that it seems cannot be transferred. What next?

Maybe you are looking for