Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20230403
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
20230403
Commits
8b9fef83
Commit
8b9fef83
authored
Apr 24, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
override w klasach itp
parent
5c9b22e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
DoUploadPhoto.java
PC25-SklepWeb/src/main/java/sklep/photo/DoUploadPhoto.java
+1
-1
EditProduct.java
PC25-SklepWeb/src/main/java/sklep/web/EditProduct.java
+2
-0
No files found.
PC25-SklepWeb/src/main/java/sklep/photo/DoUploadPhoto.java
View file @
8b9fef83
...
...
@@ -34,7 +34,7 @@ public class DoUploadPhoto extends HttpServlet {
// wypisujemy błąd, ale metoda kończy się normalnie
e
.
printStackTrace
();
}
response
.
sendRedirect
(
"products
7
.jsp"
);
response
.
sendRedirect
(
"products
9
.jsp"
);
}
}
PC25-SklepWeb/src/main/java/sklep/web/EditProduct.java
View file @
8b9fef83
...
...
@@ -20,6 +20,7 @@ import sklep.model.Product;
public
class
EditProduct
extends
HttpServlet
{
private
static
final
long
serialVersionUID
=
1L
;
@Override
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
String
parametrId
=
request
.
getParameter
(
"productId"
);
if
(
parametrId
!=
null
)
{
...
...
@@ -49,6 +50,7 @@ public class EditProduct extends HttpServlet {
dispatcher
.
forward
(
request
,
response
);
}
@Override
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
// W tej wersji nie obsługujemy błędów - w razie błędu wyświetli się strona z wyjątkiem
// W przypadku braku ID zostanie utworzony nowy produkt, a w przypadku podania ID (gdy to była edycja istniejącego) - zostanie zastąpiony.
...
...
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