[
http://jira.dspace.org/jira/browse/DS-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11742#action_11742
]
Kim Shepherd commented on DS-690:
---------------------------------
This is not looking easy/possible to achieve just with web.xml url mapping
and/or URI inspection, because:
- /handle/* requests are handled by HandleServlet
- If HandleServlet detects more text in the path after the handle, it forwards
back to a dispatcher so the servlet (eg. browse, statistics, etc.) can handle
the request, but at that stage the request URI is set back to the original
mapping (eg. /displaystats, not handle/xxx/xxx/displaystats)
- It's not a given that every repository wants to map '/handle*' to their
HandleServlet (this is probably a minor issue but still worth mentioning)
So I'm thinking it's best to insert a quick check in HandleServlet just after
the handle has been resolved to a DSO, and the DSO has been checked for
validity, but before it checks what type of item it is looking at (or we'll end
up firing a usage event by looking at the *stats* page for an item, which we
want to avoid!)
This seems messy in principle, but perhaps that's just because it's easy to
think of HandleServlet as the "item/community/collection display servlet", but
if it's handling all /handle/* requests, then I guess a primary job is simply
resolving handles and forwarding requests to appropriate servlets.
This way, we avoid double-checks on handle/dso validity as well, and
HandleServlet can inject the dso *and* the handle into the request, so
DisplayStatisticsServlet doesn't need to call HandleManager.resolveToObject
We should be able to use this sort of approach for other 'extra path' requests
like /handle/123/456/browse, as well.
Am I barking up the wrong tree, here? Should I use a filter instead? Am I just
too used to Cocoon's sitemaps for URL mapping, and so I've missed a really
obvious way of using web.xml for most of this? Will our heroes escape from
their predicament and save the planet in time for dinner? Stay tuned, gentle
viewer.
> Tidy up URL mapping for DisplayStatisticsServlet (JSPUI servlet that handles
> solr statistics)
> ---------------------------------------------------------------------------------------------
>
> Key: DS-690
> URL: http://jira.dspace.org/jira/browse/DS-690
> Project: DSpace 1.x
> Issue Type: Improvement
> Components: JSPUI
> Reporter: Kim Shepherd
> Assignee: Kim Shepherd
> Priority: Minor
> Fix For: 1.7.0
>
>
> The XMLUI URL mapping for solr statistics is nice and tidy, eg.
> ${contextPath}/handle/123456789/1/statistics
> Whereas the JSPUI URL mapping is not as nice to look at, nor is it as
> functional:
> ${contextPath}/displaystats?handle=123456789/1
> It would help with crawler/sitemap maintenance, path-based authZ, DSO
> resolution, etc. if it was in line with the XMLUI version. My fault. (Mark
> did point this out to me at one stage, too..)
> I'd like to submit a patch for this in time for 1.7, but I wonder whether
> there could be some fallout with researchers, admins, users who have already
> bookmarked older stats pages -- either way, it's better to get the change in
> earlier then later, but I should also make a note in the documentation and
> maybe advertise the change in mailing lists ahead of time.
> I'll put 1.7.0 as a fix version and will work on a patch, but will wait for
> IRC vote/comments before committing code or resolving this issue.
> Cheers,
> Kim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel