[Building Sakai] custom 403 and 404 pages
mizematr at notes.udayton.edu
mizematr at notes.udayton.edu
Thu Aug 5 08:05:34 PDT 2010
I did this a while back thanks to this thread: http://tinyurl.com/d9f5en
---------------------------------------------------------------------------
Matt Mize, Systems Administrator
- Pay no attention to the man in the back office....
Matt.Mize at notes.udayton.edu
(937) 229-1024
UDit Department, University of Dayton
300 College Park, Dayton, OH, 45469-1302
[Building Sakai] custom 403 and 404 pages
Nicola Monat-Jacobs
to:
sakai-dev List
08/04/10 11:52 AM
Sent by:
sakai-dev-bounces at collab.sakaiproject.org
Cc:
John Ansorge
I did a little bit of googling and wasn't able to find anything, so I
thought I'd post to the list.
We'd like to implement custom 403 and 404 pages in a Sakai 2.6 instance to
make the user experience a little bit better. Tomcat allows you to specify
these custom pages in the main web.xml, however, it appears that if you
configure this, you don't capture all the 403 and 404 possibilities.
The following url will bring up the custom 404 page:
https://sakai.longsight.com/blarg
But these urls will default to the standard 404 page:
https://sakai.longsight.com/access/blarg
https://sakai.longsight.com/library/blarg
To quote from John Ansorge of OHSU who has also been working on the issue:
The Sakai tools are looking for the 404 and 403 pages within their own
webapp contexts. So, if you've configured conf/web.xml like this:
404
/404.htm
Then /library/ will look for the file in /webapps/library/404.htm. I
put the 404.htm file in /webapps/library/404.htm on our test server and
it worked.
However, if you visit
/access/blarg, it will look for the error page in Sakai's resources. I
tweaked the /webapps/access/WEB-INF/web.xml like so,
404
/content/public/error404.htm
restarted, and uploaded an "error404.htm" page into the public folder in
the admin panel, and the error404.htm page showed when I went to
/access/blarg in my browser.
I looked, but didn't find any way to configure the parameter
in web.xml to use the absolute root of the host instead of the webapp
root. That makes customizing the 404 and 403 messages kinda ugly,
really, since it would mean strewing 404.htm files in each and every
tool.
Anyone have any recommendations on how to address this? Otherwise, I'll
make a feature request JIRA that this be a configurable setting.
Thanks,
Nicola_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
TO UNSUBSCRIBE: send email to
sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
"unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100805/ce329b4e/attachment.html
More information about the sakai-dev
mailing list