Skip to Content
In a previous blog I wrote about the W3C compliance of the portal (W3C compliance of the SAP Portal). As the portal isn’t offering compliance, you might ask how you can at least write a XHTML compliant portal application. The standard way of generating the HTML output is to use JSP or Dynpage. In the code this is realized by including the JSP page:

ur_system = {doc}; Using an HTML validator, this will give 3 errors: image To write an portal application and have full control over the HTML code, you can substitute the response. Instead of using IPortalComponentResponse, use HttpServletResponse. | | | HttpServletResponse servletResponse = request.getServletResponse(*true*); PrintWriter out = servletResponse.getWriter(); out.print(yourData);  Example: | | public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) { try { | *HttpServletResponse servletResponse = request.getServletResponse(true);* *  PrintWriter out = servletResponse.getWriter();* *out.write*(“”);   out.write(“”);   out.write(” “);                   out.write(“”);   out.write(“”);   out.write(“”);   out.write(“”);                  out.write(“”);   out.write(” “);   out.write(” “);   out.write(“Nam vel quam mauris, congue rhoncus dui. Morbi lacinia cursus turpis eu aliquam. Quisque sodales sapien in orci faucibus luctus. Donec urna turpis, luctus vel tempus et, habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.”);   out.write(” “);   out.write(” “);   out.write(” “);   } *  *catch (IOException e) {} } Result: image image

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply