Thanx.
Regards,
Edward Yakop
On 2/1/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Done.
>
> Eelco
>
>
> On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> > That's because I have my own implementation of servlet request.
> >
> > In my PaxWicketApplication.java
> > <code>
> > public class PaxWicketApplication extends WebApplication
> > {
> > ...
> >
> > @Override
> > protected final WebRequest newWebRequest( final HttpServletRequest
> > servletRequest )
> > {
> > return new PaxWicketRequest( m_mountPoint, servletRequest );
> > }
> > }
> > </code>
> >
> > and inside my PaxWicketRequest
> > <code>
> > /**
> > * @author Niclas Hedhman, Edward Yakop
> > *
> > * @since 1.0.0
> > */
> > final class PaxWicketRequest extends ServletWebRequest
> > {
> > ...
> > public final String getServletPath()
> > {
> > String contextPath = getHttpServletRequest().getContextPath();
> > if ( m_logger.isDebugEnabled() )
> > {
> > m_logger.debug( "getServletPath() : " + contextPath );
> > }
> > if ( !contextPath.endsWith( "/" ) )
> > {
> > contextPath += "/";
> > }
> >
> > return contextPath;
> > }
> >
> > // ContextPath pretty much similar to servlet path the diff is,
> > // getHttpServletRequest().getServletPath()
> > }
> > </code>
> >
> > Because I override both getServletPath() and getContextPath() to
> > return the right values for OSGi cases. I would need getRelativeURL()
> > to use ServletWebRequest#getServletPath() instead of
> > httpServletRequest.getServletPath().
> >
> > Hope this clear.
> >
> > Regards,
> > Edward Yakop
> >
> >
> > On 1/31/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > so to get this correctly
> > > you just changed the line:
> > >
> > > String url = httpServletRequest.getServletPath();
> > >
> > > to
> > >
> > > String url = getServletPath();
> > >
> > > how can that help?
> > >
> > > because this is getServletPath() on ServletWebRequest
> > >
> > >
> > > return httpServletRequest.getServletPath();
> > >
> > >
> > > so thats exactly the same code
> > >
> > > johan
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I have a small bug to fix for
> > > ServletWebRequest#getRelativeURL(). For
> > > > some odd reason, for resources (images, css etcs) to be displayed for
> > > > Felix http service, ServletWebRequest#getServletPath()
> > > and
> > > > #getContextPath() must be swapped. Due to getRelativeURL() uses
> > > > httpServletRequest.getServletPath() to initialize the
> > > url variable
> > > > instead of calling ServletWebRequest#getServletPath(),
> > > the returned
> > > > string is invalid in this setup.
> > > >
> > > > Can we change the implementation of getRelativeURL()
> > > > from
> > > > <code>
> > > > public String getRelativeURL()
> > > > {
> > > > ...
> > > > String url = httpServletRequest.getServletPath();
> > > > final String pathInfo = httpServletRequest.getPathInfo();
> > > >
> > > > ...
> > > > return url;
> > > > }
> > > > </code>
> > > >
> > > > to
> > > > <code>
> > > > public String getRelativeURL()
> > > > {
> > > > ...
> > > > String url = getServletPath(); // Modified line
> > > > final String pathInfo = httpServletRequest.getPathInfo();
> > > >
> > > > ...
> > > > return url;
> > > > }
> > > > </code>
> > > >
> > > > The use case why this is a bug when we have a login page that does not
> > > > have redirection pages, getRelativeURL() returns
> > > > "/mountPoint/mountPoint/", instead of only "/mountPoint/".
> > > >
> > > > Regards,
> > > > Edward Yakop
> > > >
> > > >
> > > -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > > your
> > > > opinions on IT & business topics through brief surveys - and earn cash
> > > >
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > > your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user