addlink_pro.jsp

来自「配置JSP环境」· JSP 代码 · 共 47 行

JSP
47
字号
<%@ page contentType="text/html; charset=GBK" import="java.sql.*"%>
<%@ page errorPage="index_error.jsp" %>
<%@ page import="com.msg.bean.Link" %>
<html>
<head>
<title>
addLink_pro
</title>
</head>
<body bgcolor="#ffffff">
<h1>
JBuilder Generated JSP
</h1>
<%!
public String codeString(String s){
	String str=s;
        try{
        	byte b[]=str.getBytes("ISO-8859-1");
                str=new String(b);
                return str;
        }
        catch(Exception e){
        	return str;
        }
}
%>
<jsp:useBean id="link" scope="request" class="com.msg.bean.Link">
</jsp:useBean>
<%
	String intro=request.getParameter("intro");
        intro=codeString(intro);
        String www=request.getParameter("www");
        www=codeString(www);
        String img=request.getParameter("img");
        img=codeString(img);
%>
<jsp:setProperty name="link" property="intro" value="<%=intro%>"/>
<jsp:setProperty name="link" property="www" value="<%=www%>"/>
<jsp:setProperty name="link" property="img" value="<%=img%>"/>
<%
 	link.addLink();
        response.sendRedirect("addLink.jsp");
%>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?