Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 494495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:30:07+00:00 2026-05-13T05:30:07+00:00

I am trying out a simple implementation of a URL shortener such as tinyurl.com

  • 0

I am trying out a simple implementation of a URL shortener such as tinyurl.com or bit.ly. Currently I do a response.sendRedirect(targetURL) in my servlet – which works fine for http/ftp target URLs.

However, I’m having problems redirecting to targets such as file:///c:/temp (where c:\temp is of course on the local/client system).

Typing file:///c:/temp on the Firefox address bar works, but a redirection from a server seems to do nothing.

Is this not possible for some security reason? Or am I doing something wrong here?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:30:07+00:00Added an answer on May 13, 2026 at 5:30 am

    Don’t want to ruin the beauty of my first answer, by explaining the thing. Therefore, I decided, explanation should go here, instead.

    Well, how can you think to access a local drive of your client, in the first place. Its a security concern, indeed. You don’t have access to your client’s filesystem, just like that.

    It seems that you have no requirement to do that. If you have to, for some weired reason, then you can think of a signed applet or something, I believe.

    As far as your confusion goes, that it is working on your firefox. It is because you have the access to your own machine and URL is just fine for firefox to understand. However, inside a servlet, you can’t just do that. Read the docs for sendRedirect(), it says

    If the location is relative without a
    leading ‘/’ the container interprets
    it as relative to the current request
    URI. If the location is relative with
    a leading ‘/’ the container interprets
    it as relative to the servlet
    container root.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out the best way to save a simple one-to-many relationship
I'm just starting out writing trying to write a simple program in C and
I'm trying to strip all punctuation out of a string using a simple regular
I'm currently trying out db4o (the java version) and I pretty much like what
I'm trying out Linq for the first time and having a bit of difficult
I am currently working on a simple Scrabble implementation for a college project. I
I'm trying to use Simple Savant within my application, to use SimpleDB I currently
Pardon the simple question, but I am pulling my hair out trying to get
Hi guys i am trying to figure out a simple regEx from the given
I am trying to work out a code sample to demonstrate the debugging functionality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.