You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Oliver Strässer <ol...@getunik.com> on 2010/04/22 11:12:58 UTC
Redirect MainSite
Hello
it's possible to register an URL or an Bundle that the System automatically redirects to the bundle URL?
example: http://localhost:8080/ redirects to http://localhost:8080/admin/clips
If it isn't possible with registering or saving the url in the graph anywhere - what for an apache bundle I need to extend for me?
cheers
oli
--getunik ag-------------------------------------------
oliver straesser oliver.straesser@getunik.com<ma...@getunik.com>
hardturmstrasse 101 fon: +41 (0)44 388 55 88
ch-8005 zuerich fax: +41 (0)44 388 55 89
--aktuelles getunik projekt-------------------------
Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: www.geomarketing.com<http://www.geomarketing.com/>
--best of swiss web awards 2009------------------
Gold & Silber für Connect2Earth / Bronze für WWF UK
we make the web a better place - www.getunik.com<http://www.getunik.com/>
*****************************************************************
P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
*****************************************************************
Re: AW: Redirect MainSite
Posted by Manuel Innerhofer <ma...@trialox.org>.
The JAX-RS resource listing to "/" is TypeHandlerSpace in
org.apache.clerezza.platform.typehandelspace. If you stop this resource
then type handling no longer works. As a quickfix you could add a @GET
method in the TypeHandlerSpace which redirects to your page. But I
wouldn't do that, because it is really ugly :).
Manuel
On Thu, 2010-04-22 at 08:16 -0400, Oliver Strässer wrote:
> isn't there an easier way to replace the start page?
> normaly i only need to stop the resource wich is listening to the path "/"
> and install a bundle wich is listening to "/" and only takes a redirect.
>
> the idea with the TypeHandler is an good idea - but for the moment to much ;-)
>
> what did you think?
>
> oli
>
>
>
> --getunik ag-------------------------------------------
> oliver straesser oliver.straesser@getunik.com
> hardturmstrasse 101 fon: +41 (0)44 388 55 88
> ch-8005 zuerich fax: +41 (0)44 388 55 89
>
> --aktuelles getunik projekt-------------------------
> Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: www.geomarketing.com
>
> --best of swiss web awards 2009------------------
> Gold & Silber für Connect2Earth / Bronze für WWF UK
>
> we make the web a better place - www.getunik.com
>
>
>
>
> *****************************************************************
> Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
> *****************************************************************
>
> -----Ursprüngliche Nachricht-----
> Von: Manuel Innerhofer [mailto:manuel.innerhofer@trialox.org]
> Gesendet: Donnerstag, 22. April 2010 12:12
> An: clerezza-dev@incubator.apache.org
> Betreff: Re: Redirect MainSite
>
> Hi Oli,
>
> This is not possible at the moment.
> What you could do is implement a TypeHandler that handles a resource of
> (let's say) "RedirectResource". This redirect resource has a property
> "location" which specifies the location to redirect to. The TypeHandler
> would simply implement a @GET method which returns a SEE_OTHER (303)
> Response with the location header set to the location specified in the
> "location" property.
> In your case you would make http://localhost:8080 a redirect resource
> and set the location to http://localhost:8080/admin/clips . E.g.
>
> http://localhost:8080/ ------------------------------ http://localhost:8080/admin/clips
> | http://example.com/location
> |RDF:type
> |
> http://example.com/RedirectResource
>
>
> Cheers,
> Manuel
>
> On Thu, 2010-04-22 at 05:12 -0400, Oliver Strässer wrote:
> > Hello
> >
> > it's possible to register an URL or an Bundle that the System automatically redirects to the bundle URL?
> >
> > example: http://localhost:8080/ redirects to http://localhost:8080/admin/clips
> >
> > If it isn't possible with registering or saving the url in the graph anywhere - what for an apache bundle I need to extend for me?
> >
> >
> > cheers
> > oli
> >
> >
> > --getunik ag-------------------------------------------
> > oliver straesser oliver.straesser@getunik.com<ma...@getunik.com>
> > hardturmstrasse 101 fon: +41 (0)44 388 55 88
> > ch-8005 zuerich fax: +41 (0)44 388 55 89
> >
> > --aktuelles getunik projekt-------------------------
> > Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: www.geomarketing.com<http://www.geomarketing.com/>
> >
> > --best of swiss web awards 2009------------------
> > Gold & Silber für Connect2Earth / Bronze für WWF UK
> >
> > we make the web a better place - www.getunik.com<http://www.getunik.com/>
> >
> >
> >
> >
> > *****************************************************************
> > P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
> > *****************************************************************
> >
>
>
AW: Redirect MainSite
Posted by Oliver Strässer <ol...@getunik.com>.
isn't there an easier way to replace the start page?
normaly i only need to stop the resource wich is listening to the path "/"
and install a bundle wich is listening to "/" and only takes a redirect.
the idea with the TypeHandler is an good idea - but for the moment to much ;-)
what did you think?
oli
--getunik ag-------------------------------------------
oliver straesser oliver.straesser@getunik.com
hardturmstrasse 101 fon: +41 (0)44 388 55 88
ch-8005 zuerich fax: +41 (0)44 388 55 89
--aktuelles getunik projekt-------------------------
Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: www.geomarketing.com
--best of swiss web awards 2009------------------
Gold & Silber für Connect2Earth / Bronze für WWF UK
we make the web a better place - www.getunik.com
*****************************************************************
Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
*****************************************************************
-----Ursprüngliche Nachricht-----
Von: Manuel Innerhofer [mailto:manuel.innerhofer@trialox.org]
Gesendet: Donnerstag, 22. April 2010 12:12
An: clerezza-dev@incubator.apache.org
Betreff: Re: Redirect MainSite
Hi Oli,
This is not possible at the moment.
What you could do is implement a TypeHandler that handles a resource of
(let's say) "RedirectResource". This redirect resource has a property
"location" which specifies the location to redirect to. The TypeHandler
would simply implement a @GET method which returns a SEE_OTHER (303)
Response with the location header set to the location specified in the
"location" property.
In your case you would make http://localhost:8080 a redirect resource
and set the location to http://localhost:8080/admin/clips . E.g.
http://localhost:8080/ ------------------------------ http://localhost:8080/admin/clips
| http://example.com/location
|RDF:type
|
http://example.com/RedirectResource
Cheers,
Manuel
On Thu, 2010-04-22 at 05:12 -0400, Oliver Strässer wrote:
> Hello
>
> it's possible to register an URL or an Bundle that the System automatically redirects to the bundle URL?
>
> example: http://localhost:8080/ redirects to http://localhost:8080/admin/clips
>
> If it isn't possible with registering or saving the url in the graph anywhere - what for an apache bundle I need to extend for me?
>
>
> cheers
> oli
>
>
> --getunik ag-------------------------------------------
> oliver straesser oliver.straesser@getunik.com<ma...@getunik.com>
> hardturmstrasse 101 fon: +41 (0)44 388 55 88
> ch-8005 zuerich fax: +41 (0)44 388 55 89
>
> --aktuelles getunik projekt-------------------------
> Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: www.geomarketing.com<http://www.geomarketing.com/>
>
> --best of swiss web awards 2009------------------
> Gold & Silber für Connect2Earth / Bronze für WWF UK
>
> we make the web a better place - www.getunik.com<http://www.getunik.com/>
>
>
>
>
> *****************************************************************
> P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
> *****************************************************************
>
Re: Redirect MainSite
Posted by Manuel Innerhofer <ma...@trialox.org>.
Hi Oli,
This is not possible at the moment.
What you could do is implement a TypeHandler that handles a resource of
(let's say) "RedirectResource". This redirect resource has a property
"location" which specifies the location to redirect to. The TypeHandler
would simply implement a @GET method which returns a SEE_OTHER (303)
Response with the location header set to the location specified in the
"location" property.
In your case you would make http://localhost:8080 a redirect resource
and set the location to http://localhost:8080/admin/clips . E.g.
http://localhost:8080/ ------------------------------ http://localhost:8080/admin/clips
| http://example.com/location
|RDF:type
|
http://example.com/RedirectResource
Cheers,
Manuel
On Thu, 2010-04-22 at 05:12 -0400, Oliver Strässer wrote:
> Hello
>
> it's possible to register an URL or an Bundle that the System automatically redirects to the bundle URL?
>
> example: http://localhost:8080/ redirects to http://localhost:8080/admin/clips
>
> If it isn't possible with registering or saving the url in the graph anywhere - what for an apache bundle I need to extend for me?
>
>
> cheers
> oli
>
>
> --getunik ag-------------------------------------------
> oliver straesser oliver.straesser@getunik.com<ma...@getunik.com>
> hardturmstrasse 101 fon: +41 (0)44 388 55 88
> ch-8005 zuerich fax: +41 (0)44 388 55 89
>
> --aktuelles getunik projekt-------------------------
> Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: www.geomarketing.com<http://www.geomarketing.com/>
>
> --best of swiss web awards 2009------------------
> Gold & Silber für Connect2Earth / Bronze für WWF UK
>
> we make the web a better place - www.getunik.com<http://www.getunik.com/>
>
>
>
>
> *****************************************************************
> P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
> *****************************************************************
>