Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
- <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <c:if test="${requestScope.categories == null}">
- <c:redirect url="./ReadCategoriesController" />
- </c:if>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>File upload</title>
- <script type="text/javascript">
- function checkStatus(){
- param = window.location.search;
- if(param.indexOf("?") != -1){
- message = param.split("?");
- if(message == ",success"){
- document.getElementById("message").innerHTML = "File upload successful";
- }else{
- document.getElementById("message").innerHTML = "File upload failed";
- }
- }
- }
- </script>
- </head>
- <body>
- <center>
- <img alt="logo" src="ftn.jpg" width="150px" height="150px">
- <br/>
- <br><span id="message" style="color:red;font-size:20px"> </span>
- <form action="Upload" method="post" accept-charset="UTF-8" enctype="multipart/form-data">
- <table>
- <tr><td>Document</td><td><input type="file" name="doc"/></td></tr>
- <tr><td colspan="2"><input type="submit" value="Confirm"/></td></tr>
- <tr><td>Kategorije</td>
- <td>
- <select>
- <c:forEach items="${categories}" var="category">
- <option value="${category.id}">${category.name}</option>
- </c:forEach>
- </select>
- </td>
- </tr>
- </table>
- </form>
- </center>
- <script type="text/javascript">
- checkStatus();
- </script>
- Back to:
- <br><a href="search.jsp">search</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement