hide special pages ...

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

hide special pages ...

Juan M Garrido de Paz
Hello, I'm using Tapestry with Spring Boot and embedded tomcat (jar
packaging).

Is it posible to hide certain pages like for example errors 403, 404, 500;
or the pages for propertyblocks... so that the user can't type their url
and get them?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: hide special pages ...

Chris Poulsen
Just return something from you activate, e.g:

Object onActivate()
{
    return new HttpError( 404, "Resource not found");
}


On Tue, Aug 30, 2016 at 1:25 AM, Juan M Garrido de Paz <
[hidden email]> wrote:

> Hello, I'm using Tapestry with Spring Boot and embedded tomcat (jar
> packaging).
>
> Is it posible to hide certain pages like for example errors 403, 404, 500;
> or the pages for propertyblocks... so that the user can't type their url
> and get them?
>
> Thank you.
>
Reply | Threaded
Open this post in threaded view
|

Re: hide special pages ...

Juan M Garrido de Paz
Hi, yes , I do return that in my activate already. It is for telling
tapestry not to consider the text following the index page name as context
param, and instead of that throw 404 error. It works ok.

But what I am asking is about error page location. How to put it under
web-inf folder? I think it is a best practice to hide it. I mean not just
error pages... also propertyblocks pages should be hidden from users to
type their url shouldnt they?

But as my project is jar packaging with embedded tomcat, I dont have webapp
source folder with web-inf .

Thank you.
El 30/8/2016 8:53, "Chris Poulsen" <[hidden email]> escribió:

> Just return something from you activate, e.g:
>
> Object onActivate()
> {
>     return new HttpError( 404, "Resource not found");
> }
>
>
> On Tue, Aug 30, 2016 at 1:25 AM, Juan M Garrido de Paz <
> [hidden email]> wrote:
>
> > Hello, I'm using Tapestry with Spring Boot and embedded tomcat (jar
> > packaging).
> >
> > Is it posible to hide certain pages like for example errors 403, 404,
> 500;
> > or the pages for propertyblocks... so that the user can't type their url
> > and get them?
> >
> > Thank you.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: hide special pages ...

Chris Poulsen
The code pasted is from one of our property block pages. The activate
ensures that the page cannot be accessed as a "normal page"

--
Chris

On Tue, Aug 30, 2016 at 10:56 AM, Juan M Garrido de Paz <
[hidden email]> wrote:

> Hi, yes , I do return that in my activate already. It is for telling
> tapestry not to consider the text following the index page name as context
> param, and instead of that throw 404 error. It works ok.
>
> But what I am asking is about error page location. How to put it under
> web-inf folder? I think it is a best practice to hide it. I mean not just
> error pages... also propertyblocks pages should be hidden from users to
> type their url shouldnt they?
>
> But as my project is jar packaging with embedded tomcat, I dont have webapp
> source folder with web-inf .
>
> Thank you.
> El 30/8/2016 8:53, "Chris Poulsen" <[hidden email]> escribió:
>
> > Just return something from you activate, e.g:
> >
> > Object onActivate()
> > {
> >     return new HttpError( 404, "Resource not found");
> > }
> >
> >
> > On Tue, Aug 30, 2016 at 1:25 AM, Juan M Garrido de Paz <
> > [hidden email]> wrote:
> >
> > > Hello, I'm using Tapestry with Spring Boot and embedded tomcat (jar
> > > packaging).
> > >
> > > Is it posible to hide certain pages like for example errors 403, 404,
> > 500;
> > > or the pages for propertyblocks... so that the user can't type their
> url
> > > and get them?
> > >
> > > Thank you.
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: hide special pages ...

Juan M Garrido de Paz
Oh yes, sorry, I didn't realize onActivate had no args.

Same approach that index page, but with no args, in every page I wanna
"hide".

It's ok... thank you very much!


2016-08-30 13:09 GMT+02:00 Chris Poulsen [via Apache Tapestry Mailing List
Archives] <[hidden email]>:

> The code pasted is from one of our property block pages. The activate
> ensures that the page cannot be accessed as a "normal page"
>
> --
> Chris
>
> On Tue, Aug 30, 2016 at 10:56 AM, Juan M Garrido de Paz <
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5732930&i=0>>
> wrote:
>
> > Hi, yes , I do return that in my activate already. It is for telling
> > tapestry not to consider the text following the index page name as
> context
> > param, and instead of that throw 404 error. It works ok.
> >
> > But what I am asking is about error page location. How to put it under
> > web-inf folder? I think it is a best practice to hide it. I mean not
> just
> > error pages... also propertyblocks pages should be hidden from users to
> > type their url shouldnt they?
> >
> > But as my project is jar packaging with embedded tomcat, I dont have
> webapp
> > source folder with web-inf .
> >
> > Thank you.
> > El 30/8/2016 8:53, "Chris Poulsen" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5732930&i=1>> escribió:
> >
> > > Just return something from you activate, e.g:
> > >
> > > Object onActivate()
> > > {
> > >     return new HttpError( 404, "Resource not found");
> > > }
> > >
> > >
> > > On Tue, Aug 30, 2016 at 1:25 AM, Juan M Garrido de Paz <
> > > [hidden email] <http:///user/SendEmail.jtp?type=node&node=5732930&i=2>>
> wrote:
> > >
> > > > Hello, I'm using Tapestry with Spring Boot and embedded tomcat (jar
> > > > packaging).
> > > >
> > > > Is it posible to hide certain pages like for example errors 403,
> 404,
> > > 500;
> > > > or the pages for propertyblocks... so that the user can't type their
> > url
> > > > and get them?
> > > >
> > > > Thank you.
> > > >
> > >
> >
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-tapestry-mailing-list-archives.1045711.
> n5.nabble.com/hide-special-pages-tp5732923p5732930.html
> To unsubscribe from Apache Tapestry Mailing List Archives, click here
> <
> .
> NAML
> <
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
Reply | Threaded
Open this post in threaded view
|

Re: hide special pages ...

Juan M Garrido de Paz
It doesn't work for me though in some cases, for example when Spring
Security sends a 403 response in its default behaviour, and the 403 page is
a "hidden" one.

I will have to see in detail.

Thank you.


2016-08-30 13:21 GMT+02:00 Juan M Garrido de Paz <
[hidden email]>:

> Oh yes, sorry, I didn't realize onActivate had no args.
>
> Same approach that index page, but with no args, in every page I wanna
> "hide".
>
> It's ok... thank you very much!
>
>
> 2016-08-30 13:09 GMT+02:00 Chris Poulsen [via Apache Tapestry Mailing List
> Archives] <[hidden email]>:
>
>> The code pasted is from one of our property block pages. The activate
>> ensures that the page cannot be accessed as a "normal page"
>>
>> --
>> Chris
>>
>> On Tue, Aug 30, 2016 at 10:56 AM, Juan M Garrido de Paz <
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5732930&i=0>>
>> wrote:
>>
>> > Hi, yes , I do return that in my activate already. It is for telling
>> > tapestry not to consider the text following the index page name as
>> context
>> > param, and instead of that throw 404 error. It works ok.
>> >
>> > But what I am asking is about error page location. How to put it under
>> > web-inf folder? I think it is a best practice to hide it. I mean not
>> just
>> > error pages... also propertyblocks pages should be hidden from users to
>> > type their url shouldnt they?
>> >
>> > But as my project is jar packaging with embedded tomcat, I dont have
>> webapp
>> > source folder with web-inf .
>> >
>> > Thank you.
>> > El 30/8/2016 8:53, "Chris Poulsen" <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5732930&i=1>> escribió:
>> >
>> > > Just return something from you activate, e.g:
>> > >
>> > > Object onActivate()
>> > > {
>> > >     return new HttpError( 404, "Resource not found");
>> > > }
>> > >
>> > >
>> > > On Tue, Aug 30, 2016 at 1:25 AM, Juan M Garrido de Paz <
>> > > [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5732930&i=2>> wrote:
>> > >
>> > > > Hello, I'm using Tapestry with Spring Boot and embedded tomcat (jar
>> > > > packaging).
>> > > >
>> > > > Is it posible to hide certain pages like for example errors 403,
>> 404,
>> > > 500;
>> > > > or the pages for propertyblocks... so that the user can't type
>> their
>> > url
>> > > > and get them?
>> > > >
>> > > > Thank you.
>> > > >
>> > >
>> >
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://apache-tapestry-mailing-list-archives.1045711.n5.
>> nabble.com/hide-special-pages-tp5732923p5732930.html
>> To unsubscribe from Apache Tapestry Mailing List Archives, click here
>> <
>> .
>> NAML
>> <
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>