⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addtolist.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page import="com.vnex.intranet.util.TimeStamp" %>
<%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
<%@ page import="com.vnex.intranet.upload.*"%>
<%@ page import="com.vnex.intranet.util.SubPathGenerater" %>
<%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>

<jsp:useBean id="mySmartUpload" scope="request" class="com.vnex.intranet.upload.SmartUpload" />
<jsp:useBean id="aavb" scope="request" class="com.vnex.intranet.archives.value.ArchiveAttachmentValueBean" />
<jsp:useBean id="archiveProxy" scope="application" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" />

<%
    String root = ConfigParaLoader.getParameter("rootUrl");
    String seperator = SubPathGenerater.getSeperator();
    aavb.setSendDate(TimeStamp.convertTimestampToCalendar(BaseJdbcDAO.getDBSystemDate()));

    mySmartUpload.initialize( pageContext );
    mySmartUpload.setTotalMaxFileSize(ConfigParaLoader.getParameterByInt("attachmentSize"));
    mySmartUpload.upload();

    String attachURL = ConfigParaLoader.getParameter("archiveAttachmentUrl");
    attachURL += seperator+ SubPathGenerater.getSubPath( root + seperator + attachURL);
    String ext = mySmartUpload.getFiles().getFile(0).getFileName();
    if(ext.indexOf(".") != -1)
       ext = ext.substring(ext.indexOf("."));
    else
       ext = "";
    String fileFullName = root+seperator+attachURL+seperator+mySmartUpload.getRequest().getParameter("fileName")+ext;
    aavb.setFileName(fileFullName);
    aavb.setFileTitle(mySmartUpload.getRequest().getParameter("fileTitle"));
    aavb.setFileSummary(mySmartUpload.getRequest().getParameter("fileSummary"));
    aavb.setOthers(mySmartUpload.getRequest().getParameter("others"));
    aavb.setArchiveId(Integer.parseInt(request.getParameter("archiveId")));
    com.vnex.intranet.upload.File myFile = mySmartUpload.getFiles().getFile(0);
    myFile.saveAs(fileFullName);
    archiveProxy.addAttachment(aavb);
%>

<html>
<head>
<script language=javascript>
function forward()
{
	document.location = "/mainctrl/archive/archiveDetail?archiveId=<%=aavb.getArchiveId()%>";
}
</script>
</head>
<body onload="javascript:forward()">
</body>
<html>

⌨️ 快捷键说明

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