I'm basically trying to assign my model attribute value to a Java string variable. I googled some things and I used this method below:
<input type="hidden" id="businessNameId" name="businessNameId" value="${business.business.name}">
<% String businessName = request.getParameter("businessNameId");
if(businessName.contains("- [")){ %>
<p class="industry-title">Restaurant Location</p>
<%}%>
I also tried the attribute method which is:
<% String businessName = (String) request.getAttribute("business.business.name");
if((businessName).contains("- [")){ %>
<p class="industry-title">${business.business.address.city}</p>
<}%>
Still doesn't work.
Although this does not seem to work, basically the variable business Name is not being initialized. I need to use Java in this case.