Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_java2b_20250412
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
alx_java2b_20250412
Commits
b989d18e
Commit
b989d18e
authored
May 31, 2025
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dodanie obsługi JSP
parent
d39ab7e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
pom.xml
PC37-SklepSpring/pom.xml
+14
-0
RootController.java
...Spring/src/main/java/sklep/controller/RootController.java
+1
-3
spis_tresci.jsp
PC37-SklepSpring/src/main/webapp/spis_tresci.jsp
+15
-0
No files found.
PC37-SklepSpring/pom.xml
View file @
b989d18e
...
@@ -68,6 +68,20 @@
...
@@ -68,6 +68,20 @@
<artifactId>
spring-security-test
</artifactId>
<artifactId>
spring-security-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<!-- dopisane zależności, aby działało JSP -->
<dependency>
<groupId>
org.apache.tomcat.embed
</groupId>
<artifactId>
tomcat-embed-jasper
</artifactId>
</dependency>
<dependency>
<groupId>
jakarta.servlet.jsp.jstl
</groupId>
<artifactId>
jakarta.servlet.jsp.jstl-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.glassfish.web
</groupId>
<artifactId>
jakarta.servlet.jsp.jstl
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
PC37-SklepSpring/src/main/java/sklep/controller/RootController.java
View file @
b989d18e
...
@@ -6,11 +6,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -6,11 +6,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@Controller
public
class
RootController
{
public
class
RootController
{
@GetMapping
(
"/"
)
@GetMapping
(
"/"
)
@ResponseBody
public
String
index
()
{
public
String
index
()
{
return
"
Strona główna
"
;
return
"
spis_tresci.jsp
"
;
}
}
@GetMapping
(
"/hello"
)
@GetMapping
(
"/hello"
)
...
...
PC37-SklepSpring/src/main/webapp/spis_tresci.jsp
0 → 100644
View file @
b989d18e
<
%@
page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Sklep Spring
</title>
</head>
<body>
<h1>
Sklep Spring – spis treści
</h1>
<p>
Przykład obliczenia: ${2+3*4}
</p>
<p><a
href=
"hello"
>
Hello world
</a></p>
</body>
</html>
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