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" session ="true"%>
- <%@ page session="true" %>
- <%String brisaca= "1", frizbi = "1", deznik = "1", obesek = "1"; %>
- <html>
- <%@ include file="header.jsp" %>
- <body>
- <h1>Spletna trgovina Rio</h1>
- <table border = "1">
- <br/>
- <tr>
- <th>IZDELEK</th>
- <th>CENA</th>
- <th>KOŠARICA</th>
- <th>STANJE</th>
- </tr>
- <tr>
- <td>brisača</td>
- <td>4€</td>
- <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="brisaca" value="dodaj"></form>
- <form action="seja_izdelki.jsp"><input type="submit" name="brisaca" value="odstrani"></form></td>
- <td></td>
- </tr>
- <tr>
- <td>frizbi</td>
- <td>3,2€</td>
- <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="frizbi" value="dodaj"></form>
- <form action="seja_izdelki.jsp"><input type="submit" name="frizbi" value="odstrani"></form></td>
- <td></td>
- </tr>
- <tr>
- <td>dežnik</td>
- <td>5,64€</td>
- <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="deznik" value="dodaj"></form>
- <form action="seja_izdelki.jsp"><input type="submit" name="deznik" value="odstrani"></form></td>
- <td></td>
- </tr>
- <tr>
- <td>obesek</td>
- <td>3,2€</td>
- <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="obesek" value="dodaj"></form>
- <form action="seja_izdelki.jsp"><input type="submit" name="obesek" value="odstrani"></form></td>
- <td></td>
- </tr>
- </table>
- Izdelki v košarici: <br />
- <% if (session.getAttribute("brisaca") == null ){}
- else{
- out.println("Brisaca");
- }
- if (session.getAttribute("obesek") == null ){}
- else{
- out.println("obesek");
- }
- if (session.getAttribute("frizbi") == null ){}
- else{
- out.println("Frizbi");
- }
- if (session.getAttribute("deznik") == null ){}
- else{
- out.println("Deznik");
- }%>
- </body>
- </html>
Add Comment
Please, Sign In to add comment