# JSP problem

**URL:** <https://boards.straightdope.com/t/jsp-problem/433933>\
**Category:** Factual Questions\
**Created:** [January 17, 2008, 9:08pm UTC](https://boards.straightdope.com/t/jsp-problem/433933 "2008-01-17T21:08:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweeteviljesus](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sweeteviljesus](https://boards.straightdope.com/u/sweeteviljesus)\
**Post date:** [January 17, 2008, 9:08pm UTC](https://boards.straightdope.com/t/jsp-problem/433933/1 "2008-01-17T21:08:18Z")

</div>

Is it illegal to have more than one jsp expression within a custom tag attribute? I have a case sort of like this:

\<myTags:tag1 attr1="\<%= val1 %\>" attr2=“blahblah\<%= attr2 %\>foobar\<%= attr3 %\>” /\>

which renders as

… blahblah\<%= attr2 %\>foobar\<%= attr3 %\> …

I solved the problem by doing this instead

\<myTags:tag1 attr1="\<%= val1 %\>" attr2="\<%= “blahblah” + attr2 + “foobar” + attr3 %\>" /\>

But I don’t know why that one works.

Any ideas?

Thanks,  
Rob
