Utilizing the Struts2 property tag to fetch the user's name, my code looks like this.
<div class="MyStyle">
<p> Hi! <s:property value="#session.firstName"/></p>
</div>
However, I am facing an issue where the div is not applying the MyStyle class as expected. How can I resolve this?
EDIT:
I am incorporating bootstrap css in my project. The class ="MyStyle"
was used for simplicity in the question. The actual html source code rendered for the page appears as follows
<ul class="nav navbar-nav navbar-right"> <li> Hi! Akash </li> <li><a href="/Project/logout.action"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> </ul>