Infocenter web app: JBoss context-root breaks breadcrumbs [message #472416] |
Mon, 31 March 2008 12:25  |
Eclipse User |
|
|
|
I am running an Eclipse infocenter as a web application on JBoss 4.0.5,
having followed the instructions in the Eclipse 3.4 M5 help.
Everything was working perfectly until I added a jboss-web.xml to the WAR
file. The jboss-web.xml includes a context-root element that creates a
more meaningful URL for the infocenter within the documentation area of my
company's web site.
The context-root looks something like this:
<jboss-web>
<context-root>/support/doc/product_name/version_number/help </context-root>
</jboss-web>
The problem is that now the breadcrumbs at the top of each help topic are
broken.
In an infocenter that does not use the JBoss context-root, breadcrumbs
work as they should. The HTML source looks like this:
<div class="help_breadcrumbs"><a href="../../../nav/0"
In an infocenter that uses the context-root, the source looks like this:
<div class="help_breadcrumbs"><a href="../../../../../../../nav/0"
In other words, the href is incorrect, having walked too far up the
directory tree.
Has anyone else come across this problem? Is there a workaround?
Thanks
|
|
|
|
|
|
|
|
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #472513 is a reply to message #472435] |
Fri, 04 April 2008 13:59   |
Eclipse User |
|
|
|
Something along those lines might well be the solution although I think
you may need to change it slightly, you may be off by one - I would have
to try out the change to determine exactly what the new variant should
be. Can you open a bug report and include in the bug report your
original description as well as this suggestion? I am not set up to test
on JBoss, are you able to test out a patch on your system? If so and if
we can turn this around quickly I could probably get this into Eclipse 3.4.
James Byrne wrote:
> Hi Chris,
>
> I've had a quick look at the code for the BreadcrumbsFilter class.
>
> I think the cause of the issue is that the path being passed into the
> getBackpath() method is the full path (incl. servlet path) rather than
> the path after the servlet path. For example a path like this:
>
> /support/docs/artix/5.1/help/topic/com.iona.bpel.doc/html/va r-4.html
>
> should be
>
> /topic/com.iona.bpel.doc/html/var-4.html
>
> The simple fix would be to change this line:
>
> String bodyContent = getBodyContent(path, getBackpath(uri), isNarrow,
> locale);
>
> to this:
>
> String bodyContent = getBodyContent(path, getBackpath(pathInfo),
> isNarrow, locale);
>
> Do you think this will fix the issue?
>
> cheers,
>
> James B.
>
|
|
|
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #472514 is a reply to message #472513] |
Mon, 07 April 2008 06:36  |
Eclipse User |
|
|
|
I've created a new bug for this issue, 225947.
I've no problem testing a patch for this issue so send me the patch when
it's ready and I'll deploy it in our test instance. Thanks.
Chris Goldthorpe wrote:
> Something along those lines might well be the solution although I think
> you may need to change it slightly, you may be off by one - I would have
> to try out the change to determine exactly what the new variant should
> be. Can you open a bug report and include in the bug report your
> original description as well as this suggestion? I am not set up to test
> on JBoss, are you able to test out a patch on your system? If so and if
> we can turn this around quickly I could probably get this into Eclipse 3.4.
|
|
|
|
|
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #611092 is a reply to message #472419] |
Tue, 01 April 2008 13:56  |
Eclipse User |
|
|
|
That was after the fix for Bug 215718. I'm not sure exactly what would
cause this. Do you see any errors in the log that might give clues?
David Porter wrote:
> Chris
>
> I am running Eclipse 3.4, Build id: I20080207-1530.
>
> Everything looks fine when running under the name of the WAR file (minus
> the .war extension), in my case "help51".
> David
>
>
>
|
|
|
|
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #611108 is a reply to message #472422] |
Fri, 04 April 2008 10:09  |
Eclipse User |
|
|
|
Hi Chris,
I've had a quick look at the code for the BreadcrumbsFilter class.
I think the cause of the issue is that the path being passed into the
getBackpath() method is the full path (incl. servlet path) rather than the
path after the servlet path. For example a path like this:
/support/docs/artix/5.1/help/topic/com.iona.bpel.doc/html/va r-4.html
should be
/topic/com.iona.bpel.doc/html/var-4.html
The simple fix would be to change this line:
String bodyContent = getBodyContent(path, getBackpath(uri), isNarrow,
locale);
to this:
String bodyContent = getBodyContent(path, getBackpath(pathInfo),
isNarrow, locale);
Do you think this will fix the issue?
cheers,
James B.
|
|
|
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #611125 is a reply to message #472435] |
Fri, 04 April 2008 13:59  |
Eclipse User |
|
|
|
Something along those lines might well be the solution although I think
you may need to change it slightly, you may be off by one - I would have
to try out the change to determine exactly what the new variant should
be. Can you open a bug report and include in the bug report your
original description as well as this suggestion? I am not set up to test
on JBoss, are you able to test out a patch on your system? If so and if
we can turn this around quickly I could probably get this into Eclipse 3.4.
James Byrne wrote:
> Hi Chris,
>
> I've had a quick look at the code for the BreadcrumbsFilter class.
>
> I think the cause of the issue is that the path being passed into the
> getBackpath() method is the full path (incl. servlet path) rather than
> the path after the servlet path. For example a path like this:
>
> /support/docs/artix/5.1/help/topic/com.iona.bpel.doc/html/va r-4.html
>
> should be
>
> /topic/com.iona.bpel.doc/html/var-4.html
>
> The simple fix would be to change this line:
>
> String bodyContent = getBodyContent(path, getBackpath(uri), isNarrow,
> locale);
>
> to this:
>
> String bodyContent = getBodyContent(path, getBackpath(pathInfo),
> isNarrow, locale);
>
> Do you think this will fix the issue?
>
> cheers,
>
> James B.
>
|
|
|
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #611128 is a reply to message #472513] |
Mon, 07 April 2008 06:36  |
Eclipse User |
|
|
|
I've created a new bug for this issue, 225947.
I've no problem testing a patch for this issue so send me the patch when
it's ready and I'll deploy it in our test instance. Thanks.
Chris Goldthorpe wrote:
> Something along those lines might well be the solution although I think
> you may need to change it slightly, you may be off by one - I would have
> to try out the change to determine exactly what the new variant should
> be. Can you open a bug report and include in the bug report your
> original description as well as this suggestion? I am not set up to test
> on JBoss, are you able to test out a patch on your system? If so and if
> we can turn this around quickly I could probably get this into Eclipse 3.4.
|
|
|
Powered by
FUDForum. Page generated in 0.04969 seconds