tanszek:oktatas:iss_t:http_server
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tanszek:oktatas:iss_t:http_server [2024/03/04 08:09] – knehez | tanszek:oktatas:iss_t:http_server [2026/03/09 09:57] (current) – knehez | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Let's create an empty Java project, Then create files called // | Let's create an empty Java project, Then create files called // | ||
| - | |||
| - | **Task**: create a generic error handling function to return errors to the client side. | ||
| Content of // | Content of // | ||
| Line 110: | Line 108: | ||
| out.println(" | out.println(" | ||
| out.println(" | out.println(" | ||
| - | out.println(); | + | out.println(); |
| out.flush(); | out.flush(); | ||
| Line 174: | Line 172: | ||
| out.println(" | out.println(" | ||
| out.println(" | out.println(" | ||
| - | out.println(); | + | out.println(); |
| out.flush(); | out.flush(); | ||
| Line 183: | Line 181: | ||
| } | } | ||
| </ | </ | ||
| + | **Task 1.**: create a generic error handling function to return errors to the client side. | ||
| - | **Task**: refactor the code and eliminate duplicate parts. Let's create a separate function to return | + | **Task |
| - | <code java> | + | <sxh java> |
| out.println(" | out.println(" | ||
| out.println(" | out.println(" | ||
| Line 192: | Line 191: | ||
| out.println(" | out.println(" | ||
| out.println(" | out.println(" | ||
| - | out.println(); | + | out.println(); |
| out.flush(); | out.flush(); | ||
| - | </code> | + | </sxh> |
| - | **Task**: modify the source code so that it can also return images. To do this, first add <img src=" | + | **Task |
tanszek/oktatas/iss_t/http_server.1709539746.txt.gz · Last modified: 2024/03/04 08:09 by knehez
