You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Chan, Tony" <to...@fmr.com> on 2007/05/01 15:00:13 UTC
RE: Jetspeed2 and traversing the site structure in velocity
David;
I do have velocimacro.library.autoreload set to true but it seems like
its check interval is not affected by the
file.resource.loader.modificationCheckInterval setting (which comes set
to at 10 by default). I often just restart Jetspeed to force changes in
jetspeed-macros to be picked up.
So we can redirect to an error psml on portlet errors and with the
changes you made, we can redirect 403s as well. But what about plain
404s and 5xx?
BTW, did you get a chance to look the structure we get back from
PortalSiteRequestContext.getMenu() and how we can determine if a given
node has a default page set or not?
Tony
-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com]
Sent: Thursday, April 26, 2007 3:03 PM
To: Jetspeed Users List
Subject: Re: Jetspeed2 and traversing the site structure in velocity
On Apr 26, 2007, at 7:57 AM, Chan, Tony wrote:
> David;
>
> Is this the "Modifying the Jetspeed Desktop" thread on the dev list?
>
Yes, this is the dev-list and this is the thread where we were
discussing "dropping" decorators
> I have no problem with going with a one-page solution; my header and
> footer templates are already just place holders that call macros
> defined
> else where.
I don't either. I think its time we consider alternatives to the
current layout system
Just want to make sure that we provide backward compatibility with
the existing approach
If it can be as simple as a configuration switch to use one or the
other, Im fine with that
>
> If anything I would suggest making a global user macros library that
> layouts can share to go along with this. I know there's
> jetspeed-macros.vm but I rather keep that 'original'; plus for some
> reason, changes to it doesn't seem to get picked up as readily as
> other
> templates.
>
Yes, there is a setting in the velocity.properties
velocimacro.library.autoreload = true
But Im not sure if that always works either
> Going back to my other question, is there a way of having Jetspeed
> serve
> the http error pages, complete with templating? For example, my
> layout
> themes all call the same header/branding macro defined in
> jetspeed-macros, I would want my error pages to call the same macro as
> well.
>
> Tony
>
I think I see what you are getting out.
I think it would be good to have Jetspeed redirect to an error page
whenever an error occurs
You can have your portlets do this by issuing a send redirect like:
response.sendRedirect("/jetspeed/portal/public/error-page.psml");
I have also extended the profiler valve to handle security access
exceptions and then redirect (with the servlet api) another portal page:
...
catch (PageNotFoundException pe)
{
String redirectPath = request.getRequest().getContextPath() +
"/
portal/public/reserved/noaccess.html";
request.getResponse().sendRedirect(redirectPath);
...
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Jetspeed2 and traversing the site structure in velocity
Posted by David Sean Taylor <da...@bluesunrise.com>.
On May 1, 2007, at 6:00 AM, Chan, Tony wrote:
> David;
>
> I do have velocimacro.library.autoreload set to true but it seems like
> its check interval is not affected by the
> file.resource.loader.modificationCheckInterval setting (which comes
> set
> to at 10 by default). I often just restart Jetspeed to force
> changes in
> jetspeed-macros to be picked up.
>
> So we can redirect to an error psml on portlet errors and with the
> changes you made, we can redirect 403s as well. But what about plain
> 404s and 5xx?
You are limited to handling errors that can be handled by servlets
The errors that occur inside the Jetspeed servlet can be handled as
described in the last email
You can also handle general servlet errors that do not go through
Jetspeed by configuring your web.xml
For example:
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
>
> BTW, did you get a chance to look the structure we get back from
> PortalSiteRequestContext.getMenu() and how we can determine if a given
> node has a default page set or not?
>
No. That one slipped through.
Im pretty backed up working through several other issues
Will look into that one this week
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org