在包含页的方法中能不能嵌入 html
我做了2个JSP文件,其中 a.jsp 包含 b.jsp
a.jsp--------------->
<%@ include file=b.jsp%>
b.jsp-------------->
<%!
String ttt="ttt";
public String lilili() throws Exception{
//我想在这里嵌入HTML 却提示出错~
%>
<img src="abc.gif">
<%
return "1";
}
----------------------------------错误提示如下:
Note: sun.tools.javac.Main has been deprecated.
/test2.jsp:3: '}' expected.
public String lilili() throws Exception{
^
/test2.jsp:7: Statement expected.
public void
^
/test2.jsp:11: 'try' without 'catch' or 'finally'.
pageContext.write(_jsp_string1, 0, _jsp_string1.length);
^
c:\wwwroot\test.jsp:7: Type expected.
} catch (java.lang.Throwable _jsp_e) {
^
4 errors, 1 warning
---------------------------------我想实现这样的功能的话有什么好的方法吗?