Reputation: 5118
I have two values in JSP. For 1 I defined a=http://
and for 2nd I defined b=google.com
Currently I am using concat_urls= "<%=a%><%=b%>"
. Can I join them as concat_urls= "<%=ab%>"
Upvotes: 0
Views: 54
Reputation: 55856
ab
will be interpreted as new variable. You can do this <%= a+b %>
Upvotes: 0
Reputation: 242686
No. However, expression in <%= ... %>
is a normal Java expression, so you can write
<%= a + b %>
Also note that in general use of scriptlets is discouraged.
Upvotes: 2