Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Álvaro Herrera Arjonilla
/
f1_spark
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Merge Requests
0
Pipelines
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c9e1e8d8
authored
Mar 27, 2023
by
Álvaro Herrera Arjonilla
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Changes by universidad
parent
cfa5cba7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
src/main/java/com/example/demo/AppConfig.java
src/main/webapp/index.jsp
src/main/java/com/example/demo/AppConfig.java
View file @
c9e1e8d8
...
@@ -2,10 +2,22 @@ package com.example.demo;
...
@@ -2,10 +2,22 @@ package com.example.demo;
import
static
spark
.
Spark
.*;
import
static
spark
.
Spark
.*;
import
java.util.HashMap
;
import
java.util.Map
;
import
spark.ModelAndView
;
import
spark.*
;
public
class
AppConfig
{
public
class
AppConfig
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
get
(
"/hello"
,
(
req
,
res
)
->
"Hello World"
);
get
(
"/hello"
,
(
req
,
res
)
->
"Respeto"
);
get
(
"/hello"
,
(
req
,
res
)
->
{
String
nombre
=
req
.
queryParams
(
"nombre"
);
Map
<
String
,
Object
>
modelo
=
new
HashMap
<>();
modelo
.
put
(
"nombre"
,
nombre
);
return
new
ModelAndView
(
modelo
,
"hello.jsp"
);
});
}
}
}
}
src/main/webapp/index.jsp
View file @
c9e1e8d8
<html>
<html>
<body>
<body>
<h2>
H
ello World!
</h2>
<h2>
H
ola puta
</h2>
</body>
</body>
</html>
</html>
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