Migration Struts 1 to Struts 2 + Tiles 3 getting UI issues

341 views Asked by At

I am working on Struts 1 to 2 migration application. I have successfully migrated JSP, Action, POJO and XML too.

But when I integrated Tiles 3 in my Struts 2 application, suddenly it is showing some bigger font size on web page, compared to Struts 1 + Tiles.

I am not getting what exactly happening which is impacting on JSP as if I haven't changed anything w.r.t HTML, CSS?

2

There are 2 answers

0
Aniket On BEST ANSWER

Answering my own question.

Issue was resolved after adding below dtd in jsp,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Somehow I missed this to add in jsp.

0
Roman C On

Struts2 uses themes and templates when it renders UI tags using default theme which is xhtml.

You can read this answer to learn how Struts 2 renders UI tags.

To have a minimal change to the design of JSPs you should use simple theme which you can set globally for all JSPs in struts.xml:

<constant name="struts.ui.theme" value="simple"/>