incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Holeczek <flor...@holeczek.de>
Subject Re: integration of JavaScript libraries in default template
Date Fri, 21 Aug 2009 16:06:11 GMT
Hi Kris,

thanks for your reply! Yes I've tried that, see the discussion at
https://issues.apache.org/jira/browse/JSPWIKI-590

best regards
 Florian

Urspr√ľngliche Nachricht vom 21.08.2009 um 16:48:
> It is my understanding that the context path should be in the tag as you
> mention below :

> <script type='text/javascript'
> src='/my-context-path/scripts/jspwiki-edit.js'></script>
> <script type='text/javascript'
> src='/my-context-path/scripts/posteditor.js'></script>

> Under normal circumstances you would want "/my-context-path" in the "src"
> attribute or else the script would fail because tomcat would not have anyway
> to determine which webapp you were pointing to. In your case it sounds like
> your doing some mapping through apache where you no longer want
> "/my-context-path".

> Have you tried just removing it from plain.jsp ?

> TemplateManager.addResourceRequest( context, "script",
> "/scripts/jspwiki-edit.js" );
> TemplateManager.addResourceRequest( context, "script",
> "/scripts/posteditor.js" );




> On Fri, Aug 21, 2009 at 4:43 AM, Florian Holeczek <florian@holeczek.de>wrote:

>> No thoughts on this one?
>> Generally speaking it's something basic on how to refer to resources
>> in JSPWiki JSPs.
>>
>> regards
>>  Florian
>>
>> Urspr√ľngliche Nachricht vom 19.08.2009 um 16:36:
>> > Hi all, especially Dirk,
>>
>> > I've just configured JSPWiki to run on a Tomcat 6 behind an Apache 2.2
>> > web server, connected via mod_proxy_ajp.
>> > The client URL is https://wiki.somewhere.com/ and the real URL on
>> > Tomcat is ajp://my.intra.com:8009/my-context-path/
>>
>> > Everything is running fine, there's just one little problem left:
>> > On the Edit page, two JavaScript libraries can't be loaded because the
>> > browser is searching for them under /my-context-path/scripts/xyz.js
>> > instead of /scripts/xyz.js:
>>
>> > <script type='text/javascript'
>> > src='/my-context-path/scripts/jspwiki-edit.js'></script>
>> > <script type='text/javascript'
>> > src='/my-context-path/scripts/posteditor.js'></script>
>>
>> > This is because of the following lines in
>> > templates/default/editors/plain.jsp:
>>
>> > TemplateManager.addResourceRequest( context, "script",  contextPath +
>> "/scripts/jspwiki-edit.js" );
>> > TemplateManager.addResourceRequest( context, "script",  contextPath +
>> "/scripts/posteditor.js" );
>>
>> > Now I'm not sure whether this is a bug in JSPWiki or I have to
>> > configure anything more in Tomcat.
>> > WDYT?
>>
>> > best regards
>> >  Florian
>>

Mime
View raw message