Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java_dzienna_15_09
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_dzienna_15_09
Commits
4e95556a
Commit
4e95556a
authored
Oct 07, 2022
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RestTechnicznie - drobne uzupełnienia
parent
b63c4586
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
Parametry.java
PC36-RestTechnicznie/src/main/java/rest/Parametry.java
+1
-1
ZwyklySerwlet.java
...-RestTechnicznie/src/main/java/serwlet/ZwyklySerwlet.java
+18
-0
index.html
PC36-RestTechnicznie/src/main/webapp/index.html
+5
-1
No files found.
PC36-RestTechnicznie/src/main/java/rest/Parametry.java
View file @
4e95556a
...
@@ -49,7 +49,7 @@ public class Parametry {
...
@@ -49,7 +49,7 @@ public class Parametry {
+
"\nTablica: "
+
Arrays
.
toString
(
t
);
+
"\nTablica: "
+
Arrays
.
toString
(
t
);
}
}
// /rest1/parametry/path/Ala/123/98765qwerty
+res
zta
// /rest1/parametry/path/Ala/123/98765qwerty
@res-
zta
@GET
@GET
@Path
(
"/path/{a}/{b}/{cyfry:\\d+}{litery:\\w+}{reszta}"
)
@Path
(
"/path/{a}/{b}/{cyfry:\\d+}{litery:\\w+}{reszta}"
)
public
String
pathParam
(
public
String
pathParam
(
...
...
PC36-RestTechnicznie/src/main/java/serwlet/ZwyklySerwlet.java
0 → 100644
View file @
4e95556a
package
serwlet
;
import
java.io.IOException
;
import
javax.servlet.ServletException
;
import
javax.servlet.annotation.WebServlet
;
import
javax.servlet.http.HttpServlet
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
@WebServlet
(
"/serwlet"
)
public
class
ZwyklySerwlet
extends
HttpServlet
{
private
static
final
long
serialVersionUID
=
1L
;
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
response
.
getWriter
().
append
(
"Jestem zwyklym serwletem"
);
}
}
PC36-RestTechnicznie/src/main/webapp/index.html
View file @
4e95556a
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
<body>
<body>
<h1>
Elementy techniczne JAX-RS
</h1>
<h1>
Elementy techniczne JAX-RS
</h1>
<ul>
<li><a
href=
"serwlet"
>
zwykły serwlet
</a>
- działający poza JAX-RS
</li>
</ul>
<h2>
Trzy wersje aplikacji
</h2>
<h2>
Trzy wersje aplikacji
</h2>
<ol>
<ol>
<li>
rest1 - ustawienia domyślne -
<i>
per request
</i>
<li>
rest1 - ustawienia domyślne -
<i>
per request
</i>
...
@@ -44,7 +48,7 @@
...
@@ -44,7 +48,7 @@
<ul>
<ul>
<li><a
href=
"rest1/parametry/query?a=Ala&b=Ola&b=Ela&t=Basia&t=Kasia&t=Zosia"
>
@QueryParam
</a></li>
<li><a
href=
"rest1/parametry/query?a=Ala&b=Ola&b=Ela&t=Basia&t=Kasia&t=Zosia"
>
@QueryParam
</a></li>
<li><a
href=
"rest1/parametry/matrix;a=Ala;b=Ola;b=Ela;t=Basia;t=Kasia;t=Zosia"
>
@MatrixParam
</a></li>
<li><a
href=
"rest1/parametry/matrix;a=Ala;b=Ola;b=Ela;t=Basia;t=Kasia;t=Zosia"
>
@MatrixParam
</a></li>
<li><a
href=
"rest1/parametry/path/Ala/123/98765qwerty
+res
zta"
>
@PathParam
</a></li>
<li><a
href=
"rest1/parametry/path/Ala/123/98765qwerty
@res-
zta"
>
@PathParam
</a></li>
<li><a
href=
"rest1/parametry/headers"
>
@HeaderParam
</a></li>
<li><a
href=
"rest1/parametry/headers"
>
@HeaderParam
</a></li>
<li><a
href=
"rest1/parametry/cookies"
>
@CookieParam
</a></li>
<li><a
href=
"rest1/parametry/cookies"
>
@CookieParam
</a></li>
<li><a
href=
"rest1/parametry/ustaw"
>
Ustaw ciacho
</a></li>
<li><a
href=
"rest1/parametry/ustaw"
>
Ustaw ciacho
</a></li>
...
...
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