Skip to content

Instantly share code, notes, and snippets.

@enujo
enujo / pom.xml
Created February 11, 2017 15:29
Java Servlet API, mysql connect
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp/jsp-api -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
@enujo
enujo / web.xml
Created February 11, 2017 15:16
[JAVA] Servlet DTD(2.2 ~ 3.1)
<!-- Servlet 3.1 -->
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
<!-- Servlet 3.0 -->
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@enujo
enujo / web.xml
Created February 11, 2017 15:09
[JAVA] Servlet 2.2 DTD
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app />
@enujo
enujo / web.xml
Last active February 11, 2017 15:09
[JAVA] Servlet 2.3 DTD
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app />
@enujo
enujo / web.xml
Last active February 11, 2017 15:09
[JAVA] Servlet 2.4 DTD
<web-app id="servlet-2_4" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
</web-app>
@enujo
enujo / web.xml
Created February 11, 2017 15:06
[JAVA] Servlet 2.5 DTD
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="servlet-2_5" version="2.5">
</web-app>
@enujo
enujo / web.xml
Created February 11, 2017 15:05
[JAVA] Servlet 3.0 DTD
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
@enujo
enujo / web.xml
Created February 11, 2017 15:03
[JAVA] Servlet 3.1 DTD
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
@enujo
enujo / procedure.sql
Last active February 7, 2017 03:33
mySql make procedure
DELIMITER $$
DROP PROCEDURE IF EXISTS insertRent$$
CREATE PROCEDURE insertRent(libmemberNo INT(11), bookNo INT(11), payTotal INT(30),bookState VARCHAR(5))
BEGIN
INSERT INTO book_rent(
libmember_no,
book_no,
brent_start
) VALUES (
libmemberNo,
@enujo
enujo / lastInsert.sql
Created February 7, 2017 00:31
mysql return auto_increment
INSERT INTO TEST_A (
B
) VALUES (
'HI'
);
INSERT INTO TEST_B (
C,
D
) VALUES (