Bug 38957 - Missing internal links not validated in Tomcat
Summary: Missing internal links not validated in Tomcat
Status: NEW
Alias: None
Product: Lenya
Classification: Unclassified
Component: Publisher (show other bugs)
Version: 1.2.5
Hardware: Other Linux
: P2 normal
Target Milestone: 1.2.6
Assignee: Lenya Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-13 22:20 UTC by Richard Frovarp
Modified: 2007-04-23 02:21 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Frovarp 2006-03-13 22:20:43 UTC
Using latest 1.2.5-dev (Cocoon 2.1.8, Tomcat 5.5.12) build under Tomcat results
in different behavior than running as Jetty. After build and install, log in as
lenya and submit the index page of the default publication, then publish it as
alice. The links in the page are all internal and pointing to pages that are not
yet published. Under Jetty the  anchor tags for the links are not put in,
leaving the text however. When running under Tomcat the anchor tags are inserted
resulting in dead links. The Jetty behavior is the one that is desired.
Comment 1 Josias Thoeny 2006-03-14 07:46:18 UTC
The problem probably is that internal links in Lenya 1.2 contain the context
path of the servlet container.
That means if Lenya runs with an empty context path (like with Jetty), a correct
internal link looks like this (as stored in the XML file):
<a href="/default/authoring/features.html">Features section</a>

But in Tomcat, where Lenya is normally deployed under the /lenya context, and
internal link would look like this:
<a href="/lenya/default/authoring/features.html">Features section</a>

The internal links of the default publication contain no context path, so they
don't work with Tomcat. 
However, if you create new links when running in Tomcat, they will contain the
/lenya prefix and everything should be working.

This means one has to migrate the content when moving it from Jetty to Tomcat or
vice versa. This is bad, but it is unlikely to be fixed in Lenya 1.2.x. It has
been fixed already in Lenya 1.4-dev (links don't contain the context prefix
anymore).