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

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

I did a few experiments with Wiki.jsp, and mapping the URL binding to Wiki.jsp, 
combined with moving the top-level stuff into the template files, works fine. 
So that's dandy, and it means approach #2 will work.

HOWEVER, there is one little wrinkle we need to iron out. It is not a 
technology issue, but a policy/strategy decision regarding the mapping of 
ActionBeans to JSPs. At the core: it's the fact that one URL can only 
correspond to one ActionBean.

Background: as you know, each ActionBean maps to one URL binding. Each 
ActionBean can have multiple events, which do things like forward users to the 
display JSPs. When we bind /Wiki.jsp to ViewActionBean, it means GETting 
Wiki.jsp will locate ViewActionBean, identify the default event ("view"), and 
call it. The view event in turn forwards to ${templates}/Wiki.jsp in our new 
scheme. That's great, right?

But we have other "tabs" associated with viewing wiki pages that use *other* 
JSPs: for example, PageInfo.jsp. With our new scheme, we would have to create a 
separate ActionBean (PageInfoActionBean) to handle this so that it could be 
bound to its own URL, /PageInfo.jsp. Right now, the "info" event handler in 
ViewActionBean does this. 

So here's our choice:
- *Keep the events together, but lose the URLs for PageInfo.jsp and 
Attachments.jsp.* If we keep the other logical page-view events -- "info()" and 
"attachments()" -- in ViewActionBean, we must bind them to Wiki.jsp. That 
means, in our new scheme, PageInfo.jsp and Attachments.jsp URLs would go away. 
I am not bothered by that, but maybe you are?
- *Create separate PageInfo and Attachments ActionBeans.* This would enable us 
to bind them to /PageInfo.jsp and /Attachments.jsp, but at the cost of creating 
separate ActionBeans, probably with a bunch of redundant code. Subclassing 
ViewActionBean might lessen the issue, but it is a bit inelegant.

The key decision is how much we care about keeping the PageInfo.jsp URL. The 
Attachments.jsp URL doesn't matter because we didn't have it in 2.8, so we can 
change it without issues. I do agree that we ought to have an ironclad 
guarantee that Wiki.jsp URLs will continue to work. I'm less persuaded that we 
need to do that for PageInfo.jsp.  

One more thought, if we do proceed with option #2, what's stopping us from 
moving the template JSPs inside of WEB-INF?

> 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