Compare commits
18 Commits
0abd323e89
...
3099e70c30
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3099e70c30 | ||
|
|
b52d626664 | ||
|
|
97e390ec97 | ||
|
|
41528bac25 | ||
|
|
cfa12c5c49 | ||
|
|
6b98a83f5f | ||
|
|
64eb38b00f | ||
|
|
28293bb58b | ||
|
|
b1dbea6a7a | ||
|
|
96df49e0c9 | ||
|
|
3d7c2c8660 | ||
|
|
fcc5fd0c1f | ||
|
|
665b419bb7 | ||
|
|
035e0619d4 | ||
|
|
09ade67d92 | ||
|
|
efe9ca50e4 | ||
|
|
8616b2fa3d | ||
|
|
71d6a5538b |
81
.gitlab-ci.yml
Normal file
81
.gitlab-ci.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
# This file is a template, and might need editing before it works on your project.
|
||||
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
||||
# https://docs.gitlab.com/development/cicd/templates/
|
||||
# This specific template is located at:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Maven.gitlab-ci.yml
|
||||
|
||||
# Build JAVA applications using Apache Maven (http://maven.apache.org)
|
||||
# For docker image tags see https://hub.docker.com/_/maven/
|
||||
#
|
||||
# For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
|
||||
|
||||
# This template will build and test your projects
|
||||
# * Caches downloaded dependencies and plugins between invocation.
|
||||
# * Verify but don't deploy merge requests.
|
||||
# * Deploy built artifacts from master branch only.
|
||||
|
||||
variables:
|
||||
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
|
||||
MAVEN_OPTS: >-
|
||||
-Dhttps.protocols=TLSv1.2
|
||||
-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository
|
||||
-Dorg.slf4j.simpleLogger.showDateTime=true
|
||||
-Djava.awt.headless=true
|
||||
|
||||
# As of Maven 3.3.0 instead of this you MAY define these options in `.mvn/maven.config` so the same config is used
|
||||
# when running from the command line.
|
||||
# As of Maven 3.6.1, the use of `--no-tranfer-progress` (or `-ntp`) suppresses download and upload messages. The use
|
||||
# of the `Slf4jMavenTransferListener` is no longer necessary.
|
||||
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
|
||||
MAVEN_CLI_OPTS: >-
|
||||
--batch-mode
|
||||
--errors
|
||||
--fail-at-end
|
||||
--show-version
|
||||
--no-transfer-progress
|
||||
-DinstallAtEnd=true
|
||||
-DdeployAtEnd=true
|
||||
|
||||
# This template uses the latest Maven 3 release, e.g., 3.8.6, and OpenJDK 8 (LTS)
|
||||
# for verifying and deploying images
|
||||
# Maven 3.8.x REQUIRES HTTPS repositories.
|
||||
# See https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked for more.
|
||||
image: maven:3-openjdk-8
|
||||
|
||||
# Cache downloaded dependencies and plugins between builds.
|
||||
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
|
||||
# Be aware that `mvn deploy` will install the built jar into this repository. If you notice your cache size
|
||||
# increasing, consider adding `-Dmaven.install.skip=true` to `MAVEN_OPTS` or in `.mvn/maven.config`
|
||||
cache:
|
||||
paths:
|
||||
- .m2/repository
|
||||
|
||||
# For merge requests do not `deploy` but only run `verify`.
|
||||
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
|
||||
.verify:
|
||||
stage: test
|
||||
script:
|
||||
- 'mvn $MAVEN_CLI_OPTS verify'
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
# Verify merge requests using JDK8
|
||||
verify:jdk8:
|
||||
extends:
|
||||
- .verify
|
||||
|
||||
# To deploy packages from CI, create a `ci_settings.xml` file
|
||||
# For deploying packages to GitLab's Maven Repository: See https://docs.gitlab.com/ee/user/packages/maven_repository/#create-maven-packages-with-gitlab-cicd for more details.
|
||||
# Please note: The GitLab Maven Repository is currently only available in GitLab Premium / Ultimate.
|
||||
# For `master` or `main` branch run `mvn deploy` automatically.
|
||||
deploy:jdk8:
|
||||
stage: deploy
|
||||
script:
|
||||
- if [ ! -f ci_settings.xml ]; then
|
||||
echo "CI settings missing\! If deploying to GitLab Maven Repository, please see https://docs.gitlab.com/ee/user/packages/maven_repository/#create-maven-packages-with-gitlab-cicd for instructions.";
|
||||
fi
|
||||
- 'mvn $MAVEN_CLI_OPTS deploy --settings ci_settings.xml'
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
92
README.md
Normal file
92
README.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# acc-webapp
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.com/jwkim6/acc-webapp.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.com/jwkim6/acc-webapp/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
||||
19
ci_settings.xml
Normal file
19
ci_settings.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
||||
https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
|
||||
<servers>
|
||||
<server>
|
||||
<id>gitlab</id>
|
||||
<username>gitlab-ci-token</username>
|
||||
<password>${env.CI_JOB_TOKEN}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>gitlab-maven</id>
|
||||
<username>gitlab-ci-token</username>
|
||||
<password>${env.CI_JOB_TOKEN}</password>
|
||||
</server>
|
||||
</servers>
|
||||
|
||||
</settings>
|
||||
11
pom.xml
11
pom.xml
@@ -6,6 +6,7 @@
|
||||
<artifactId>acc-webapp-mvn</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>acc-webapp-mvn</name>
|
||||
<packaging>war</packaging>
|
||||
<description>Maven Accordion Webapp Test</description>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -47,6 +48,16 @@
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>gitlab</id>
|
||||
<url>https://gitlab.com/api/v4/projects/33469338/packages/maven</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>gitlab-maven</id>
|
||||
<url>https://gitlab.com/api/v4/projects/33469338/packages/maven</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
7
src/main/webapp/WEB-INF/beans.xml
Normal file
7
src/main/webapp/WEB-INF/beans.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans 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/beans_2_0.xsd"
|
||||
version="2.0" bean-discovery-mode="annotated">
|
||||
|
||||
</beans>
|
||||
@@ -9,5 +9,4 @@
|
||||
<welcome-file>default.htm</welcome-file>
|
||||
<welcome-file>default.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
<distributable/>
|
||||
</web-app>
|
||||
@@ -4,7 +4,7 @@
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<ul>
|
||||
<c:set var="contextPath" value="<%= request.getContextPath()%>"></c:set>
|
||||
<li><a href="${contextPath}/pages/1.jsp">기본페이지 호출</a></li >
|
||||
<li><a href="${contextPath}/pages/default.jsp">기본페이지 호출(표준출력테스트)</a></li >
|
||||
|
||||
<li> F01 : 클라이언트 분리 호출(이미지/JSP) </li>
|
||||
<ul>
|
||||
@@ -49,7 +49,13 @@
|
||||
<li><a href="${contextPath}/pages/thread-sleep.jsp"> Thread : Thread 무한 대기 </a></li>
|
||||
<li><a href="${contextPath}/pages/thread-sleep-3.jsp"> Thread : Thread 3초 대기 </a></li>
|
||||
<li><a href="${contextPath}/pages/thread-sleep-1.jsp"> Thread : Thread 1초 대기 </a></li>
|
||||
</ul>
|
||||
<li><a href="${contextPath}/pages/thread-sleep-random.jsp"> Thread : Thread 4초 램덤대기 </a></li>
|
||||
</ul>
|
||||
|
||||
<li>error</li>
|
||||
<ul>
|
||||
<li><a href="${contextPath}/pages/error.jsp"> 에러발생 </a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
20
src/main/webapp/jsp/error.jsp
Normal file
20
src/main/webapp/jsp/error.jsp
Normal file
@@ -0,0 +1,20 @@
|
||||
<%@page import="java.util.Calendar"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@ page import="java.util.Date" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
|
||||
<%
|
||||
|
||||
int temp = 100/0;
|
||||
|
||||
|
||||
%>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -9,8 +9,24 @@
|
||||
<body>
|
||||
|
||||
|
||||
<h1 style=" padding:10px;" width=100%> APM BMT !!</h1>
|
||||
<h1 style=" padding:10px;" width=100%> 샘플 페이지 기본출력) !!</h1>
|
||||
|
||||
<%
|
||||
|
||||
System.out.println("=========================");
|
||||
System.out.println("= =");
|
||||
System.out.println("= =");
|
||||
System.out.println("= =");
|
||||
System.out.println("= =");
|
||||
System.out.println("= 표준출력 =");
|
||||
System.out.println("= =");
|
||||
System.out.println("= =");
|
||||
System.out.println("= =");
|
||||
System.out.println("= =");
|
||||
System.out.println("=========================");
|
||||
|
||||
|
||||
%>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,7 +6,7 @@ APM BMT 테스트
|
||||
</H2>
|
||||
|
||||
1) 기본 페이지 <br>
|
||||
http://IP/NIA-APM-BMT/jsp/common/normal.jsp <br>
|
||||
http://IP/jsp/common/normal.jsp <br>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
<%@page import="java.util.*" %>
|
||||
<%@page import="java.text.*" %>
|
||||
<%@page import="java.net.InetAddress" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@@ -34,6 +35,7 @@ sess.setAttribute("SessionAttr2", rand_MS+"");
|
||||
|
||||
|
||||
java.util.Enumeration e = sess.getAttributeNames();
|
||||
String hostname = InetAddress.getLocalHost().getHostName();
|
||||
%>
|
||||
<table border=1 bordercolor="gray" cellspacing=1 cellpadding=0 width="100%">
|
||||
<tr bgcolor="gray"><td colspan=2 align="center"><font color="white"><b>Session Info</b></font></td></tr>
|
||||
@@ -52,6 +54,9 @@ java.util.Enumeration e = sess.getAttributeNames();
|
||||
<tr>
|
||||
<td>Max Inactive Interval</td><td><%=maxInactiveInterval%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hostname</td><td><%=hostname%></td>
|
||||
</tr>
|
||||
<tr bgcolor="cyan"><td colspan=2 align="center"><b>Session Vaule List<b></td></tr>
|
||||
<tr>
|
||||
<td align="center">NAME</td>
|
||||
|
||||
9
src/main/webapp/pages/default.jsp
Normal file
9
src/main/webapp/pages/default.jsp
Normal file
@@ -0,0 +1,9 @@
|
||||
localhost_access_log.2022-10-05.txt<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
<jsp:include page="/jsp/common/template.jsp">
|
||||
<jsp:param name="content" value="/jsp/normal.jsp"/>
|
||||
<jsp:param name="title" value="1-1"/>
|
||||
</jsp:include>
|
||||
Reference in New Issue
Block a user