<% @ Page contenttype = "text/html; charset = iso8859_1" Language = "Java" %>
<% @ Page import = "Java. util. *" %>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = iso8859_1">
<Title> learning content </title>
<Style type = "text/CSS">
<! --
Body {
Background-image: URL (.../../images/wgypx/background.gif );
}
-->
</Style> <%
List list = (list) request. getattribute ("contentlist ");
Map map = new hashmap ();
If (list. isempty ()){
String url = "/show/wgypx/right_jiecontent_err.jsp ";
Response. sendredirect (URL );
} Else {
Map = (MAP) list. Get (0 );
}
%>
<Body topmargin = "0" leftmargin = "0">
<Table width = "582" border = "0" cellspacing = "0">
<Tr>
<TD> <% = (string) map. Get ("content") %> </TD>
</Tr>
</Table>
</Body>
</Html>
If you want to disable the content after response. sendredirect (URL);, add
Return; statement, but directly add return; sometimes an error is reported. How can this problem be solved?
You can change the Syntax:
If (1 = 1 ){
Return;
}
OK. The problem is solved !! [Understanding: directly using the content after the return statement to report an error because it is impossible to execute the statement. The addition of a permanent condition seems to have eased the conflict, and the result is almost passed]