cancel
Showing results for 
Search instead for 
Did you mean: 

DOCTYPE in Portal Component

Former Member
0 Kudos

Hi Everyone,

I need to include the !DOCTYPE sentence at the top of an iView output in order for customer's CSS to work correctly in IE. Has anyone accomplished this?

Best regards,

Andrés Acero

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I just wrote the sentence to the servlet response in the doContent method like this:

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

try {

request.getServletResponse(false).getWriter().write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");

} catch (IOException e) {

e.printStackTrace();

}

....

}