Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
javab_20230617
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
javab_20230617
Commits
d7d38fa6
Commit
d7d38fa6
authored
Jul 01, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rozmowa - początek
parent
79236bd6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
pom.xml
PC23-Servlety/pom.xml
+2
-2
Rozmowa.java
PC23-Servlety/src/main/java/serwlety/podstawy/Rozmowa.java
+39
-0
No files found.
PC23-Servlety/pom.xml
View file @
d7d38fa6
...
...
@@ -12,8 +12,8 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.target>
1
1
</maven.compiler.target>
<maven.compiler.source>
1
1
</maven.compiler.source>
<maven.compiler.target>
1
7
</maven.compiler.target>
<maven.compiler.source>
1
7
</maven.compiler.source>
<junit.version>
5.9.2
</junit.version>
</properties>
...
...
PC23-Servlety/src/main/java/serwlety/podstawy/Rozmowa.java
0 → 100644
View file @
d7d38fa6
package
serwlety
.
podstawy
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.annotation.WebServlet
;
import
jakarta.servlet.http.HttpServlet
;
import
jakarta.servlet.http.HttpServletRequest
;
import
jakarta.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
@WebServlet
(
"/rozmowa"
)
public
class
Rozmowa
extends
HttpServlet
{
@Override
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
final
String
poczatek
=
"""
<!DOCTYPE html>
<html>
<head>
<title>Rozmowa serlwetowa</title>
</head>
<body>"""
;
final
String
formularz
=
"""
<form>
<input name="
imie
">
<button>Wyślij</button>
</form>"""
;
final
String
koniec
=
"""
</body>
</html>"""
;
response
.
setContentType
(
"text/html"
);
// MIME type / Content-Type
response
.
setCharacterEncoding
(
"UTF-8"
);
PrintWriter
out
=
response
.
getWriter
();
out
.
println
(
poczatek
);
out
.
println
(
formularz
);
out
.
println
(
koniec
);
}
}
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