Package javax.portlet

Examples of javax.portlet.RenderResponse.encodeURL()


                name = name.substring(PREFIX_RESOURCE.length());
                if (name.length() == 0 || name.charAt(0) != '/') {
                    String uri = request.getContextPath() + "/" + request.getServletPath();
                    name = NetUtils.absolutize(uri, name);
                }
                return renderResponse.encodeURL(name);
            } else if (name.startsWith(PREFIX_ACTION)) {
                url = renderResponse.createActionURL();
                name = name.substring(PREFIX_ACTION.length());
                if (name.length() > 0 && name.charAt(0) == '/') {
                    name = name.substring(1);
View Full Code Here


        return encodeUrl(sb, req);
    }

    protected String encodeUrl( StringBuffer sb, PortletRequest req ) {
        RenderResponse resp = PortletActionContext.getRenderResponse();
        return resp.encodeURL(req.getContextPath() + sb.toString());
    }

    /**
     * Will ensure that all entries in <code>params</code> are String arrays,
     * as requried by the setParameters on the PortletURL.
View Full Code Here

                name = name.substring(PREFIX_RESOURCE.length());
                if (name.length() == 0 || name.charAt(0) != '/') {
                    String uri = request.getContextPath() + "/" + request.getServletPath();
                    name = NetUtils.absolutize(uri, name);
                }
                return renderResponse.encodeURL(name);
            } else if (name.startsWith(PREFIX_ACTION)) {
                url = renderResponse.createActionURL();
                name = name.substring(PREFIX_ACTION.length());
                if (name.length() > 0 && name.charAt(0) == '/') {
                    name = name.substring(1);
View Full Code Here

                name = name.substring(PREFIX_RESOURCE.length());
                if (name.length() == 0 || name.charAt(0) != '/') {
                    String uri = request.getContextPath() + "/" + request.getServletPath();
                    name = NetUtils.absolutize(uri, name);
                }
                return renderResponse.encodeURL(name);
            } else if (name.startsWith(PREFIX_ACTION)) {
                url = renderResponse.createActionURL();
                name = name.substring(PREFIX_ACTION.length());
                if (name.length() > 0 && name.charAt(0) == '/') {
                    name = name.substring(1);
View Full Code Here

        return encodeUrl(sb, req);
    }

    protected String encodeUrl( StringBuffer sb, PortletRequest req ) {
        RenderResponse resp = PortletActionContext.getRenderResponse();
        return resp.encodeURL(req.getContextPath() + sb.toString());
    }

    /**
     * Will ensure that all entries in <code>params</code> are String arrays,
     * as requried by the setParameters on the PortletURL.
View Full Code Here

            assertEquals(portletResponse.isCommitted(), response.isCommitted());
            //TODO: How to check if its the same behaviour as in PR? Its not the same object.
            assertNotNull(response.getOutputStream());
            //Cannot invoke both writer and outputstream in single request
            //assertEquals(portletResponse.getWriter(), response.getWriter());
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeURL("http://www.jboss.com/"));
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeUrl("http://www.jboss.com/"));


            //SPEC:118
            assertEquals(false, response.containsHeader("blah"));
View Full Code Here

            //TODO: How to check if its the same behaviour as in PR? Its not the same object.
            assertNotNull(response.getOutputStream());
            //Cannot invoke both writer and outputstream in single request
            //assertEquals(portletResponse.getWriter(), response.getWriter());
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeURL("http://www.jboss.com/"));
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeUrl("http://www.jboss.com/"));


            //SPEC:118
            assertEquals(false, response.containsHeader("blah"));
View Full Code Here

            //TODO: How to check if its the same behaviour as in PR? Its not the same object.
            //and btw. if line below is failing this means that HSResponse.setContentType is not impl ok
            assertNotNull(response.getOutputStream());
            //Cannot invoke both writer and outputstream in single request
            //assertEquals(portletResponse.getWriter(), response.getWriter());
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeURL("http://www.jboss.com/"));
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeUrl("http://www.jboss.com/"));


            //SPEC:276
            assertEquals(false, response.containsHeader("blah"));
View Full Code Here

            //and btw. if line below is failing this means that HSResponse.setContentType is not impl ok
            assertNotNull(response.getOutputStream());
            //Cannot invoke both writer and outputstream in single request
            //assertEquals(portletResponse.getWriter(), response.getWriter());
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeURL("http://www.jboss.com/"));
            assertEquals(portletResponse.encodeURL("http://www.jboss.com/"), response.encodeUrl("http://www.jboss.com/"));


            //SPEC:276
            assertEquals(false, response.containsHeader("blah"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.