File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes redirect without http:// or http: ecc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "redirect without http:// or http: ecc" Watch "redirect without http:// or http: ecc" New topic

redirect without http:// or http: ecc

fabio fabios

Joined: Jun 13, 2011
Posts: 4
Hi everyone,
this is my first post i have a question for you.
I would like to make a type deirect
I tried this code but does not work.

the result is http://mysite/mycontext/
if I use the same code work.

How can I fix, I need to redirect a direct non-face-frame config.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Welcome to the JavaRanch, Fabio!

URLs come in 2 forms: Absolute and Relative.

An Absolute URL contains all the components of the actual URL. For example:

A Relative URL omits components. However, since an Absolute URL is required to make an actual HTTP request, the client will supply the missing information in order to build an Absolute URL from the relative URL. Relative URLs are relative to the URL of the requesting page, so if you place a URL link in the form 'href=""' on the page you served from "", the client (browser) would build the absolute URL of "".

Which is why your request didn't work.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: redirect without http:// or http: ecc
It's not a secret anymore!