Martin Grigorov schrieb:

it should return http://www.serverurl.com
((WebRequest) getRequest()).getHttpServletRequest().getServerHost()
or something like that

pass the httpServletRequest to

    public static StringBuffer getContextUrl(final HttpServletRequest req)
    {
        String protocol = req.isSecure() ? "https://"; : "http://";;
        String hostname = req.getServerName();
        int port = req.getServerPort();
        StringBuffer url = new StringBuffer(128);
        url.append(protocol);
        url.append(hostname);
        if ((port != 80) && (port != 443))
        {
            url.append(":");
            url.append(port);
        }
        String ctx = req.getSession().getServletContext().getContextPath();
        if (!ctx.startsWith("/"))
        {
        url.append('/');
        }
        url.append(ctx);
        if (!ctx.endsWith("/"))
        {
        url.append('/');
        }
        return url;
    }

cu uwe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to