Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java_weekendowa_20221008
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
java_weekendowa_20221008
Commits
015f2fb3
Commit
015f2fb3
authored
Oct 09, 2022
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apache commons
parent
f712c0c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
pom.xml
PC23-Serwlety/pom.xml
+5
-1
Rozmowa.java
PC23-Serwlety/src/main/java/podstawy/Rozmowa.java
+4
-2
No files found.
PC23-Serwlety/pom.xml
View file @
015f2fb3
...
@@ -30,9 +30,13 @@
...
@@ -30,9 +30,13 @@
<artifactId>
javaee-web-api
</artifactId>
<artifactId>
javaee-web-api
</artifactId>
<version>
8.0.1
</version>
<version>
8.0.1
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.12.0
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
<!-- Za pomocą Alt+F5 wykonujemy Maven > Update Project,
<!-- Za pomocą Alt+F5 wykonujemy Maven > Update Project,
aby Eclipse uaktualił konfigurację projektu zgodnie z plikiem POM.
aby Eclipse uaktualił konfigurację projektu zgodnie z plikiem POM.
-->
-->
PC23-Serwlety/src/main/java/podstawy/Rozmowa.java
View file @
015f2fb3
...
@@ -9,6 +9,8 @@ import javax.servlet.http.HttpServlet;
...
@@ -9,6 +9,8 @@ import javax.servlet.http.HttpServlet;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang3.StringUtils
;
@WebServlet
(
"/Rozmowa"
)
@WebServlet
(
"/Rozmowa"
)
public
class
Rozmowa
extends
HttpServlet
{
public
class
Rozmowa
extends
HttpServlet
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -38,9 +40,9 @@ public class Rozmowa extends HttpServlet {
...
@@ -38,9 +40,9 @@ public class Rozmowa extends HttpServlet {
out
.
println
(
"<button>Wyślij</button>"
);
out
.
println
(
"<button>Wyślij</button>"
);
out
.
println
(
"</form>"
);
out
.
println
(
"</form>"
);
if
(
imie
!=
null
&&
!
imie
.
isEmpty
(
))
{
if
(
StringUtils
.
isNotBlank
(
imie
))
{
out
.
println
(
"<p>Witaj "
+
imie
+
"</p>"
);
out
.
println
(
"<p>Witaj "
+
imie
+
"</p>"
);
if
(
parametrWiek
!=
null
&&
!
parametrWiek
.
isEmpty
(
))
{
if
(
StringUtils
.
isNotBlank
(
parametrWiek
))
{
int
wiek
=
Integer
.
parseInt
(
parametrWiek
);
int
wiek
=
Integer
.
parseInt
(
parametrWiek
);
if
(
wiek
>=
18
)
{
if
(
wiek
>=
18
)
{
out
.
println
(
"<p>Zapraszamy na piwo.</p>"
);
out
.
println
(
"<p>Zapraszamy na piwo.</p>"
);
...
...
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