Publication_Create_Success.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:3k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.commoninfo.publication.value.*"%>
- <%@ page import="com.vnex.intranet.commoninfo.publication.proxy.*"%>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="com.vnex.intranet.upload.*"%>
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.*" %>
- <jsp:useBean id="publicationProxy" class="com.vnex.intranet.commoninfo.publication.proxy.PublicationProxyBean" scope="application" />
- <jsp:useBean id="publicationBean" class="com.vnex.intranet.commoninfo.publication.value.PublicationValueBean" scope="page" />
- <jsp:useBean id="myUpload" scope="page" class="com.vnex.intranet.upload.SmartUpload" />
- <%
- String root = ConfigParaLoader.getParameter("rootUrl");
- String attachURL = ConfigParaLoader.getParameter("publicationAttachmentUrl");
- String publicationName = "";
- String publicationDepartment = "";
- int publicationId = 0;
- // Initialization
- myUpload.initialize( pageContext );
- myUpload.setTotalMaxFileSize( Integer.parseInt(ConfigParaLoader.getParameter("attachmentSize")) );
- // SubPathGenerater
- attachURL += SubPathGenerater.getSubPath( root + SubPathGenerater.getSeperator() + attachURL);
- // Upload
- myUpload.upload();
- myUpload.save( root + attachURL );
- com.vnex.intranet.upload.Request multi = myUpload.getRequest();
- if(multi.getParameter("publicationName")!=null && !multi.getParameter("publicationName").equals(""))
- {
- publicationName = (String) multi.getParameter("publicationName");
- publicationBean.setPublicationName(publicationName);
- }
- if(multi.getParameter("publicationDepartment")!=null && !multi.getParameter("publicationDepartment").equals(""))
- {
- publicationDepartment = (String) multi.getParameter("publicationDepartment");
- publicationBean.setPublicationDepartment(publicationDepartment);
- }
- if(multi.getParameter("publicationId")!=null && !multi.getParameter("publicationId").equals(""))
- {
- publicationId = Integer.parseInt((String) multi.getParameter("publicationId"));
- publicationBean.setPublicationId(publicationId);
- }
- com.vnex.intranet.upload.File myFile = myUpload.getFiles().getFile(0);
- if (!myFile.isMissing())
- {
- String url = attachURL +SubPathGenerater.getSeperator()+ myFile.getFileName();
- publicationBean.setAttachmentUrl(url);
- }
- publicationProxy.createPublication(publicationBean);
- response.sendRedirect("/mainctrl/commoninfo/publication/getPublicationList");
- %>