Re: jspwiki reveals Main page without login

2018-03-29 Thread Juan Pablo Santos Rodríguez
thanks for spotting it, Motohiko :-)

I've pushed 2.10.4-03 with a fix for this; instead of just returning
there's also a sendRedirect so the request can be routed to the Login.jsp
page, with the appropiate redirect parameter (I was getting a blank page
with the return alone). I'm also deploying a snapshot right now, so it
should be available in ~45 minutes.


best regards,
juan pablo

On Thu, Mar 29, 2018 at 3:01 PM, Motohiko Matsuda  wrote:

> Hi,
>
> First of all, thank you, developers of JSPWIKI.
> We are using JSPWIKI very nicely as an internal wiki for a long time.
>
> But, we needed to apply a fix before using JSPWIKI.
> It reveals the content of the "Main" page without login,
> when we omit the arguments to a JSP page.
> For example, just "https://xxx/xxx/Edit.jsp; shows the Main page
> (omitting the following "?page=xxx").
> I have checked in 2.10.3, but it is not fixed.
>
> We are happy if it will contribute to JSPWIKI.
>
> Regards,
> Motohiko Matsuda
>
> Files need a fix:
>
> Comment.jsp
> Delete.jsp
> Diff.jsp
> Edit.jsp
> PageInfo.jsp
> PageModified.jsp
> Preview.jsp
> Rename.jsp
>
> The diff (all files need the same fix):
>
> --- Edit.jsp.orgTue Feb 16 22:11:28 2016
> +++ Edit.jspTue Oct 17 11:47:04 2017
> @@ -54,6 +54,8 @@
>  // Create wiki context and check for authorization
>  WikiContext wikiContext = wiki.createContext( request,
> WikiContext.EDIT );
>  if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response
> )) return;
> +if (wikiContext.getCommand().getTarget() == null) {return;}
>  String pagereq = wikiContext.getName();
>
>  WikiSession wikiSession = wikiContext.getWikiSession();
>


Re: Can jspwiki be used for large deployment

2018-03-29 Thread Juan Pablo Santos Rodríguez
Hi,

a little late to chime in, but did wanted to note a couple things:

- there's a contributed jdbc provider ([#1], referenced at [#2]), so it is
possible to store your wiki pages on a database

- if I'm not mistaken, all pages aren't stored on memory, references, both
ingoing and outgoing, to them are ([#3]). Those references are Strings
(page names), so references should be on the order of hundreds of bytes, as
opposed to whole pages. These references are used to perform searches like
top ten lists, unreferenced pages, etc. which otherwise would be expensive
to make. There's also the lucene index which IIRC is backed by a file, and
ehcache if you're have caching turned on, which you can customize too. I've
never tried to see where the upper limit on pages would be, so I'm not
really sure how many pages JSPWiki can handle on an standard installation.

Out of curiosity, I've done an mvn tomcat7:run-war with latest JSPWiki and
the default set of pages and the amount of memory it takes is ~60MB, on a
JDK 1.8.0_121, no memory parametrization at all. Would anyone mind sharing
the amount of pages vs JDK - memory settings vs memory consumed on JSPWiki
instances?

Last, @V.Fedorov, ELWiki looks really interesting! is there any link we
could use to refer to it at
https://jspwiki-wiki.apache.org/Wiki.jsp?page=JSPWikiApplications ?


best regards,
juan pablo


#1]: https://github.com/djemerson01/jspwiki-jdbcprovider
[#2]: https://jspwiki-wiki.apache.org/Wiki.jsp?page=ContributedProviders
[#3]:
https://github.com/apache/jspwiki/blob/master/jspwiki-war/src/main/java/org/apache/wiki/ReferenceManager.java

On Thu, Mar 22, 2018 at 7:16 PM, V. Fedorov  wrote:

> Believe it or not, but the JSPwiki code is already ported on components
> - OSGi of a bandles, and...:
>  - the layer of visualization has produced with use of Eclipse RAP;
>  - data are submitted by EMF model;
>  - the persistence of data is carried out by means of CDO.
>
> Screenshot of the functioning wiki - see https://yadi.sk/i/UezpmVo63Tf4
> 2g
> (in the picture: at the left - IDE; on the right - the browser with
> ElWiki).
>
> There is a one change in syntax of a wiki-marking - for references
> between pages it is required to specify the page identifier.
> For example: [Sample page | @218]
> Because of it the name wiki is: ElWiki (Enhanced links wiki).
> The data model of these pages is organized hierarchically, references
> between them are based on identifiers of pages.
> So existence of pages with identical names, for example in different
> branches of wiki is possible.
>
> Used data model is presented here - https://yadi.sk/i/jaljk1m23Tf3zw
>
> In the presented realization there is no need to load all pages, for
> processing of communications between them.
>
> Work on the project is continued. (changes has been started and
> continuing by me)
>
> PS: In general, I use JSPwiki for logging of my practices, notes from
> books, articles.
> Though in my option - the pages of JSPwiki are stored in the database,
> not on a disk,
>  but in general, loading all pages in memory, impossibility to set the
> any name of page, and etc. -- doesn't suit me now.
>
> On Чт, 2018-03-22 at 08:26 +0100, Jürgen Weber wrote:
> > guess not, on startup JSPWiki loads all pages into memory to parse
> > intra-page links.
> >
> > 2018-03-22 5:24 GMT+01:00 dagarwa...@gmail.com 
> > :
> > >
> > > JspWiki uses filesystem instead of a conventional database. Would
> > > you suggest using jspwiki if it were to cater to 1billion page ?
> > > (Provided, a solid backup mechanism ). Would it scale that much
> > > with both performance and data-integrity perspective ?
>