Hi Pablo,
DSpaceWebappServletFilter is part of dspace-services, which is a different
layer than JSPUI. So, if you wanted to create a Java class, or servlet to
match a custom url, then follow Tim's advice, customize web.xml in
https://github.com/DSpace/DSpace/blob/master/dspace-jspui/src/main/webapp/WEB-INF/web.xml
You could add a regex at the root, but you'll have to filter out all of the
legitimate/necessary functions of JSPUI, it might be easier to add a
prefix, such as domain.com/featureA/1234-5678, then your pattern can be:
<servlet-mapping>
<servlet-name>featureA</servlet-name>
<url-pattern>/featureA/*</url-pattern>
</servlet-mapping>
And declare your featureA servlet:
<servlet>
<servlet-name>featureA</servlet-name>
<servlet-class>org.dspace.app.webui.servlet.FeatureAServlet</servlet-class>
</servlet>
And create a Java class
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/FeatureAServlet.java
I would copy something like HandleServlet, and see how it has method
doDSGet, and it gets the requested url through request.getPathInfo(), which
will be the users secret code.
Also, keep in mind, you could always use rewrite rules in nginx or apache,
to bounce traffic around to where you want it, and that might be easier to
manage too. i.e. regex to bounce domain.com/1234-5678 to
domain.com/code/1234-5678
________________
Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809
On Tue, Mar 17, 2015 at 7:33 AM, Pablo Buenaposada <
pablo.buenapos...@csuc.cat> wrote:
> up
>
>
>
> --
> View this message in context:
> http://dspace.2283337.n4.nabble.com/main-servlet-for-url-pattern-dspaceurl-com-tp4676559p4677050.html
> Sent from the DSpace - Tech mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette