Skip to content

Instantly share code, notes, and snippets.

<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="admin" password="password" roles="manager-gui,manager-script" />
</tomcat-users>
<settings >
<servers>
<server>
<id>TomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
</servers>
</settings>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Liquor Store</title>
</head>
<body>
<center>
<h1>
Select the type of Liquor
package com.sample;
import com.sample.model.LiquorType;
import java.util.ArrayList;
import java.util.List;
/**
* Created by kasun on 5/24/17.
*/
package com.sample;
import com.sample.model.LiquorType;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
<%@ page import ="java.util.*" %>
<!DOCTYPE html>
<html>
<body>
<center>
<h1>
Available Brands
</h1>
<%
List result= (List) request.getAttribute("brands");
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sample</groupId>
<artifactId>LiquorStoreApp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
package com.sample.model;
/**
* Created by kasun on 5/24/17.
*/
public enum LiquorType {
WINE,BEER,WHISKY
}
import org.apache.commons.codec.binary.Hex;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
/**
* This is the Main class.