FAQ
I have a subdirectory with an html file when I click on a link it
takes me to the html file.
A decorator with navigation links decorates the html page.

The navigation links are relative to the current directory instead of
the context path.
I didn't think it was suppose to du this with <s:url action=""/>

It renders the following <a class="sidelink" href="<s:url
action='products' includeParams='none'/>">Products</a> as

<a class="sidelink"
href="/agejsofts2/product/WinemakerTracker/docs/products.action">Products</a>

when I want:

<a class="sidelink" href="/agejsofts2/products.action">Products</a>

What am I doing wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Search Discussions

  • David Friedman at Sep 22, 2006 at 3:04 am
    You keep emailing copies to the SiteMesh list
    as well as Struts. Does this mean when you
    temporarily remove SiteMesh decorating that
    you see the proper path and when SiteMesh
    is enabled you see the incorrect path?

    Regards,
    David

    -----Original Message-----
    From: Garner Shawn
    Sent: Thursday, September 21, 2006 8:07 PM
    To: user@struts.apache.org; users@sitemesh.dev.java.net
    Subject: [Struts 2][Sitemesh] s:url in decorator file and html file


    I have a subdirectory with an html file when I click on a link it
    takes me to the html file.
    A decorator with navigation links decorates the html page.

    The navigation links are relative to the current directory instead of
    the context path.
    I didn't think it was suppose to du this with <s:url action=""/>

    It renders the following <a class="sidelink" href="<s:url
    action='products' includeParams='none'/>">Products</a> as

    <a class="sidelink"
    href="/agejsofts2/product/WinemakerTracker/docs/products.action">Products</a
    >

    when I want:

    <a class="sidelink" href="/agejsofts2/products.action">Products</a>

    What am I doing wrong?


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • Garner Shawn at Sep 26, 2006 at 12:41 am
    I'm still not sure why my decorator JSP has scriptlet values not
    evaluated when decorating a HTML file. I think it is the same reason
    the s:url doesn't render the context path too though.
    I'm not exactly sure how it can evaluate the decorator:applyDecorator
    but then the scriptlet doesn't know anything about a
    request.getContextPath().

    I thought maybe InstantiatingNullHandler or DefaultTextProvider might
    have something to do with it but I'm not quite sure what they do. I'm
    new to xwork and struts 2.

    Shawn

    09/25/2006 19:30:55 DEBUG
    com.opensymphony.module.sitemesh.filter.PageFilter.http-8080-Processor24
    - doFilter Request URL:
    http://localhost:8080/agejsofts2/product/WinemakerTracker/docs/index.html
    URI: /agejsofts2/product/WinemakerTracker/docs/index.html Context
    Path: /agejsofts2 Path Info: null
    09/25/2006 19:30:55 DEBUG
    com.opensymphony.module.sitemesh.filter.PageFilter.http-8080-Processor24
    - doFilter Request URL:
    http://localhost:8080/agejsofts2/product/WinemakerTracker/docs/index.html
    URI: /agejsofts2/product/WinemakerTracker/docs/index.html Context
    Path: /agejsofts2 Path Info: null
    09/25/2006 19:30:55 DEBUG
    com.opensymphony.xwork2.util.InstantiatingNullHandler.http-8080-Processor24
    - Entering nullPropertyValue
    [target=[com.opensymphony.xwork2.DefaultTextProvider@1429cb2],
    property=__sitemesh__filterapplied]
    09/25/2006 19:30:55 DEBUG
    com.opensymphony.xwork2.util.InstantiatingNullHandler.http-8080-Processor24
    - Entering nullPropertyValue
    [target=[com.opensymphony.xwork2.DefaultTextProvider@1429cb2],
    property=__sitemesh__filterapplied]
    09/25/2006 19:30:55 DEBUG
    com.opensymphony.xwork2.util.InstantiatingNullHandler.http-8080-Processor24
    - Entering nullPropertyValue
    [target=[com.opensymphony.xwork2.DefaultTextProvider@1429cb2],
    property=__sitemesh__page]
    09/25/2006 19:30:55 DEBUG
    com.opensymphony.xwork2.util.InstantiatingNullHandler.http-8080-Processor24
    - Entering nullPropertyValue
    [target=[com.opensymphony.xwork2.DefaultTextProvider@1429cb2],
    property=__sitemesh__page]

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedSep 22, '06 at 12:08a
activeSep 26, '06 at 12:41a
posts3
users2
websitestruts.apache.org
irc#struts

2 users in discussion

Garner Shawn: 2 posts David Friedman: 1 post

People

Translate

site design / logo © 2022 Grokbase