[ 
https://issues.apache.org/jira/browse/JSPWIKI-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802561#action_12802561
 ] 

Andrew Jaquith commented on JSPWIKI-578:
----------------------------------------

Sure -- give it a try!

Short term: put @UrlBindings into the ActionBeans (for simplicity's sake). 
Longer term, once they are determined to work we can externalize the URL 
bindings into a properties file.

Re: keeping the default pages separate from the top-level JSPs. Have you *seen* 
the top-level JSPs lately? They are all about 5 lines long. ;) There's just not 
much to 'em. Really, all the top-level JSPs do these days is call the 
DefaultLayout template and substitute in the page content via an include. That, 
and make sure the correct ActionBean is wired up. That's why it makes sense to 
combine the top-level and default template JSPs together.

If you buy that logic, then there are two approaches.

1)  Incorporate the default template contents into the top-level JSPs (my 
suggestion).
2) Move the top-level JSP contents into the default templates (the reverse), 
and delete the top-level JSPs entirely. The TemplateForwardResolution would 
"figure out" where to actually forward to the user to, based on the presence 
(absence) of the correct template JSP.

The advantages of (1) are as described in my previous comment. Another 
advantage is that there will always be a "fallback" binding to JSPs, even if a 
custom (short-URLish) scheme is used. For example, if the URL binding to 
ViewActionBean was /view/${page}, that page would still be addressable via 
/Wiki.jsp?page=${page}.

The advantage of (2) is that there would only ever be one way to address a 
page. For example, if the URL binding to ViewActionBean was /Wiki.jsp, then 
/Wiki.jsp?page=${page} would be the only way to retrieve a page. If the admin 
wanted to use /view/${page}, then THAT would be the only way, and the 
"fallback" binding of /Wiki.jsp?page=${page} would 404.

> Get rid of *.action URLs.
> -------------------------
>
>                 Key: JSPWIKI-578
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-578
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Core & storage, Default template
>            Reporter: Janne Jalkanen
>             Fix For: 3.0
>
>
> We currently have two URLs for each ActionBean - both the Wiki.jsp and 
> Wiki.action are available. Now, since the URLs are different, it has some 
> nasty side-effects:
> * Users don't know which URL to bookmark, or they end up bookmarking both 
> pages
> * Browsers don't know which pages are equal, and therefore both caching and 
> page highlights work inconsistently
> * Bots will index both pages, therefore giving odd results
> Since one of the design maxims of 3.0 is that URLs should not change, we 
> should figure out a way to get rid of the Stripes-induced *.action URLs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to