Я пытаюсь включить страницу listusers.jsp
, на которой просто написано "Hello World". Я читаю имя listusers.jsp из параметра, как показано ниже, из profile.jsp.
<!-- profile.jsp -->
<table width="100%" border="0px">
<tr><td>
<table border="0px">
<tr>
<td>
<dsp:a page="profile.jsp">List Users
<dsp:param name="includepage" value="listusers.jsp"/>
</dsp:a>
<dsp:a page="profile.jsp">Shop
<dsp:param name="includepage" value="shop.jsp"/>
</dsp:a>
</td>
</tr>
</table>
</td>
<td>
<dsp:getvalueof param="includepage" id="subpage" >
<dsp:include page="<%= subpage %>" />
</dsp:getvalueof>
</td></tr>
</table>
Это дает мне следующую ошибку, когда я пытаюсь открыть profile.jsp
A:\Tomcat\apache-tomcat-7.0.37\atgbases\ATG\work\Catalina\localhost\MyStore\org\apache\jsp\profile_jsp.java:168: error: method setPage in class IncludeTag cannot be applied to given types;
_jspx_th_dsp_005finclude_005f1.setPage( subpage );
^
required: String
found: Object
reason: actual argument Object cannot be converted to String by method invocation conversion
1 error
1 warning
Пожалуйста, дайте мне знать, как правильно включить динамическую страницу, используя