Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20240528-BJava
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
20240528-BJava
Commits
c48e2a06
Commit
c48e2a06
authored
Jun 12, 2024
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SklepWeb - utworzenie projektu
parent
dc4d0171
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
125 additions
and
0 deletions
+125
-0
.gitignore
PC24-SklepWeb/.gitignore
+8
-0
pom.xml
PC24-SklepWeb/pom.xml
+51
-0
HelloServlet.java
...src/main/java/pl/alx/kjava/pc24sklepweb/HelloServlet.java
+29
-0
beans.xml
PC24-SklepWeb/src/main/resources/META-INF/beans.xml
+7
-0
persistence.xml
PC24-SklepWeb/src/main/resources/META-INF/persistence.xml
+9
-0
web.xml
PC24-SklepWeb/src/main/webapp/WEB-INF/web.xml
+7
-0
index.jsp
PC24-SklepWeb/src/main/webapp/index.jsp
+14
-0
No files found.
PC24-SklepWeb/.gitignore
0 → 100644
View file @
c48e2a06
/target/
/.settings/
/.classpath
/.project
/*.iml
/.idea/
PC24-SklepWeb/pom.xml
0 → 100644
View file @
c48e2a06
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
pl.alx.kjava
</groupId>
<artifactId>
PC24-SklepWeb
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<name>
PC24-SklepWeb
</name>
<packaging>
war
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.target>
11
</maven.compiler.target>
<maven.compiler.source>
11
</maven.compiler.source>
<junit.version>
5.10.0
</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>
jakarta.platform
</groupId>
<artifactId>
jakarta.jakartaee-web-api
</artifactId>
<version>
10.0.0
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-api
</artifactId>
<version>
${junit.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-engine
</artifactId>
<version>
${junit.version}
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
3.4.0
</version>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
PC24-SklepWeb/src/main/java/pl/alx/kjava/pc24sklepweb/HelloServlet.java
0 → 100644
View file @
c48e2a06
package
pl
.
alx
.
kjava
.
pc24sklepweb
;
import
java.io.*
;
import
jakarta.servlet.http.*
;
import
jakarta.servlet.annotation.*
;
@WebServlet
(
name
=
"helloServlet"
,
value
=
"/hello-servlet"
)
public
class
HelloServlet
extends
HttpServlet
{
private
String
message
;
public
void
init
()
{
message
=
"Hello World!"
;
}
public
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
IOException
{
response
.
setContentType
(
"text/html"
);
// Hello
PrintWriter
out
=
response
.
getWriter
();
out
.
println
(
"<html><body>"
);
out
.
println
(
"<h1>"
+
message
+
"</h1>"
);
out
.
println
(
"</body></html>"
);
}
public
void
destroy
()
{
}
}
\ No newline at end of file
PC24-SklepWeb/src/main/resources/META-INF/beans.xml
0 → 100644
View file @
c48e2a06
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
>
</beans>
\ No newline at end of file
PC24-SklepWeb/src/main/resources/META-INF/persistence.xml
0 → 100644
View file @
c48e2a06
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence
xmlns=
"https://jakarta.ee/xml/ns/persistence"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version=
"3.0"
>
<persistence-unit
name=
"default"
>
</persistence-unit>
</persistence>
PC24-SklepWeb/src/main/webapp/WEB-INF/web.xml
0 → 100644
View file @
c48e2a06
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns=
"https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version=
"6.0"
>
</web-app>
\ No newline at end of file
PC24-SklepWeb/src/main/webapp/index.jsp
0 → 100644
View file @
c48e2a06
<
%@
page
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<title>
JSP - Hello World
</title>
</head>
<body>
<h1><
%=
"
Hello
World
!"
%
>
</h1>
<br/>
<a
href=
"hello-servlet"
>
Hello Servlet
</a>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment