webtier@glassfish.java.net

Re: Virtual Servers on GlassFish v1 and V2

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Tue, 02 Dec 2008 15:42:31 -0800

On 12/ 1/08 08:34 PM, glassfish_at_javadesktop.org wrote:
> I'll have to look into the jamwiki's source code.
>
> In the meantime, I have a custom JSF/JSP web application and it has same behavior ( or inconsistency between v1 and v2/v3). I am using the following to generate the links:
>
> ${pageContext.request.contextPath}
>

I'm unable to reproduce this (with the upcoming GlassFish v2.1):

1. I've created a virtual server ("abc.com") and a new http-listener
that uses "abc.com"
    as its default-virtual-server.

2. I've deployed a webapp that contains a JSP (test.jsp) with these
contents:

      ${pageContext.request.contextPath}

3. I've declared this webapp as the default-web-module of "abc.com".

4. When I access the webapp's test.jsp on the new http-listener at the
root context,
    I get an empty string. If I access it at its designated context
root, I get "/<context-root>",
    where <context-root> is the webapp's designated context root.

I'm not sure why you are getting different results.


Jan

> Here's a sample of the generated links:
>
> In v1:
>
> ${pageContext.request.contextPath}/en/StartingPoints = http://aaa.com/en/StartingPoints
> ${pageContext.request.contextPath}/en/Special:RecentChanges = http://aaa.com/en/Special:RecentChanges
> ${pageContext.request.contextPath}/en/Sandbox = http://aaa.com/en/Sandbox
>
> In v2/v3:
>
> ${pageContext.request.contextPath}/en/StartingPoints = http://aaa.com/jamwiki-war/en/StartingPoints
> ${pageContext.request.contextPath}/en/Special:RecentChanges = http://aaa.com/jamwiki-war/en/Special:RecentChanges
> ${pageContext.request.contextPath}/en/Sandbox = http://aaa.com/jamwiki-war/en/Sandbox
> [Message sent by forum member 'amerigo5' (amerigo5)]
>
> http://forums.java.net/jive/thread.jspa?messageID=319476
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>