Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Infocenter web app: JBoss context-root breaks breadcrumbs
Infocenter web app: JBoss context-root breaks breadcrumbs [message #472416] Mon, 31 March 2008 12:25 Go to next message
David Porter is currently offline David Porter
Messages: 18
Registered: July 2009
Junior Member
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 #472417 is a reply to message #472416] Mon, 31 March 2008 13:34 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
Do you happen to know what version of Eclipse your web app is based on?
I recently fixed a bug relating to the war file and breadcrumbs. It
seems possible that this bug fix will fix your problem, its also
conceivable that it caused it.

Here's the bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215718
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #472419 is a reply to message #472417] Tue, 01 April 2008 11:42 Go to previous messageGo to next message
David Porter is currently offline David Porter
Messages: 18
Registered: July 2009
Junior Member
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 #472422 is a reply to message #472419] Tue, 01 April 2008 13:56 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 #472425 is a reply to message #472422] Wed, 02 April 2008 06:15 Go to previous messageGo to next message
David Porter is currently offline David Porter
Messages: 18
Registered: July 2009
Junior Member
Nothing in the JBoss server.log. Is there anywhere else I should look?
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #472435 is a reply to message #472422] Fri, 04 April 2008 10:09 Go to previous messageGo to next message
James Byrne is currently offline James Byrne
Messages: 4
Registered: July 2009
Junior Member
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 #472513 is a reply to message #472435] Fri, 04 April 2008 13:59 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 Go to previous message
James Byrne is currently offline James Byrne
Messages: 4
Registered: July 2009
Junior Member
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 #611082 is a reply to message #472416] Mon, 31 March 2008 13:34 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
Do you happen to know what version of Eclipse your web app is based on?
I recently fixed a bug relating to the war file and breadcrumbs. It
seems possible that this bug fix will fix your problem, its also
conceivable that it caused it.

Here's the bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215718
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #611086 is a reply to message #472417] Tue, 01 April 2008 11:42 Go to previous message
David Porter is currently offline David Porter
Messages: 18
Registered: July 2009
Junior Member
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 #611092 is a reply to message #472419] Tue, 01 April 2008 13:56 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 #611098 is a reply to message #472422] Wed, 02 April 2008 06:15 Go to previous message
David Porter is currently offline David Porter
Messages: 18
Registered: July 2009
Junior Member
Nothing in the JBoss server.log. Is there anywhere else I should look?
Re: Infocenter web app: JBoss context-root breaks breadcrumbs [message #611108 is a reply to message #472422] Fri, 04 April 2008 10:09 Go to previous message
James Byrne is currently offline James Byrne
Messages: 4
Registered: July 2009
Junior Member
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 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 Go to previous message
James Byrne is currently offline James Byrne
Messages: 4
Registered: July 2009
Junior Member
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.
Previous Topic:Infocenter Web app , Tomcat
Next Topic:Connecting web applications to standalone help
Goto Forum:
  


Current Time: Tue Jul 29 11:03:13 EDT 2014

Powered by FUDForum. Page generated in 0.03413 seconds