0

I have a main JSP what is including another JSP with code like:

<div class="titulo" data-role="header" data-theme="a">
   <h1><span class="header-title"><span><%=titleHeader%></span></span></h1>
</div> 

Like you can see, titleHeader is a variable what I have declared on my main JSP (because it depends of each main JSP) and I am doing a include of another JSP where I am using it.

Eclipse shows up an error. How can I face this problem?

Thank you.

I have found the answer: Java variable across multiple include blocks - variable cannot be resolved

Community
  • 1
  • 1

2 Answers2

0

Try with

<c:out value="${titleHeader}" />

rpax
  • 4,468
  • 7
  • 33
  • 57
0
<% String titleHeader= "Some title " ;  %>

use your code

<div class="titulo" data-role="header" data-theme="a">
 <h1><span class="header-title"><span><%=titleHeader%></span></span></h1>
</div>

it will work

iamsuman
  • 1,413
  • 19
  • 32