import java.io.*;import java.sql.*;public final class Dokum extends java.lang.Object implements Serializable{ public Dokum() throws SQLException, FileNotFoundException, IOException { code of constructor } public String[] getFile(int userid) throws SQLException { code of method 1 } public void setFile(int userid, String[] filename) throws SQLException, FileNotFoundException, IOException { code of method 2 }}
<%@page contentType="text/html"%><%@ page import="java.lang.reflect.*" %><%@ page import="java.lang.*" %><%@ page import="java.util.*" %><%@ page import="da.dokumanagement1.Dokum" %><jsp:useBeanid="dokum"class="da.dokumanagement1.Dokum"/><%! String filename[] = new String[100]; %><%! int userid = 23; %><html><head><title>Dokumentenmanagement</title></head><body><%filename = dokum.getFile(userid);int laenge = Array.getLength(filename);dokum.toFile(userid, filename);for (int i = 0; laenge < i ; i ++){ %> Datei: <%=filename[i]%> <%}%><%-- <jsp:getProperty name="beanInstanceName" property="propertyName"/> --%></body></html>