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

Simon Kitching commented on JSPWIKI-139:
----------------------------------------

Firstly, I don't really like setting baseURL. It's not possible to give someone 
a warfile with a jspwiki.properties file preconfigured if it has to have the 
absolute url at which that person will be deploying it. AFAIK, jspwiki mostly 
works without baseURL, and I think it is better not to force people to set it.

And anyway, I don't think it is always possible to deduce basePath from 
baseURL. Suppose
  http://somehost/somedept/webapp
references a webapp, and jspwiki is then deployed at
  /thewiki
relative to that webapp.

Now baseURL is "http://somehost/somedept/webapp/thewiki";.

So how would jspwiki know whether
(a) the webapp is at "/somedept", and jspwiki basePath is "/webapp/thewiki", or
(b) the webapp is at "/somedept/webapp" and jspwiki basePath is "/thewiki".

Hmm...a servlet can use pathInfo to find the path from itself to the webapp 
root: I guess that applies to Wiki.jsp to (which is effectively a servlet)?
Or does the servlet engine's jsp-handling code stuff that up for jsps? If 
pathInfo is possible, then maybe the basePath can be deduced by assuming the 
"controller" for the request is at basePath. In that case, that info would need 
to be communicated from Wiki.jsp through to the other bits: maybe by putting a 
basePath in the PageContext rather than the WikiEngine?

Maybe this discussion should be on the list rather than in the issue tracker? 
I'll leave that decision to you...

> Allow jspwiki pages to be at locations other than webapp root (for embedding)
> -----------------------------------------------------------------------------
>
>                 Key: JSPWIKI-139
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-139
>             Project: JSPWiki
>          Issue Type: Improvement
>    Affects Versions: 2.6.1
>            Reporter: Simon Kitching
>            Priority: Minor
>         Attachments: TemplateManager.patch, WikiEngine.patch
>
>
> The attached patches allow jspwiki pages to be deployed anywhere within a 
> webapp. In particular, the jspwiki engine can now be embedded within another 
> webapp and the pages placed in a subdirectory while still rendering in the 
> normal manner (http://host/webapp/somesubdir/Wiki.jsp?page=Foo).
> Note that embedded jspwiki usage has not been extensively tested; there may 
> be more patches required to allow full functionality. However this gets the 
> basics working at least.
> Patches are against cvs trunk as of about 15 Jan 2008.

-- 
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