I have <a href> tag in html My model has a java list list1 as model attribute. I am trying to construct
<a href="pathvalue/namevalue">
<c:forEach var="obj" items="${list}">
<a href="${obj.path}+"/"+${obj.name}".../>
</c:forEach>
I want to know how can I insert "/". I can directly concate two El value ${obj.path}${obj.name} but how to get that "/"
is below line correct to get a output "pathvalue/namevalue"?
<c:out value="${obj.path+'/'+obj.name}" />
You can't concatenate it because "+" sign is used for arithmetic addition.
You should use
or do it in servlet to expose a bean property with already concatenated value.