Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jweb-e001
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matias Ferreira
jweb-e001
Commits
f743abbb
Commit
f743abbb
authored
Sep 23, 2020
by
Matias Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quitando archivos de prueba
parent
50399e39
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
139 deletions
+0
-139
WebProjectTest/build/classes/com/roshka/webprojecttest/servlets/SumaRequestServlet.class
+0
-0
WebProjectTest/build/classes/com/roshka/webprojecttest/servlets/SumaResponseServlet.class
+0
-0
WebProjectTest/build/classes/com/roshka/webprojecttest/servlets/TestServlet.class
+0
-0
WebProjectTest/src/com/roshka/webprojecttest/servlets/SumaRequestServlet.java
+0
-60
WebProjectTest/src/com/roshka/webprojecttest/servlets/SumaResponseServlet.java
+0
-39
WebProjectTest/src/com/roshka/webprojecttest/servlets/TestServlet.java
+0
-40
No files found.
WebProjectTest/build/classes/com/roshka/webprojecttest/servlets/SumaRequestServlet.class
deleted
100644 → 0
View file @
50399e39
File deleted
WebProjectTest/build/classes/com/roshka/webprojecttest/servlets/SumaResponseServlet.class
deleted
100644 → 0
View file @
50399e39
File deleted
WebProjectTest/build/classes/com/roshka/webprojecttest/servlets/TestServlet.class
deleted
100644 → 0
View file @
50399e39
File deleted
WebProjectTest/src/com/roshka/webprojecttest/servlets/SumaRequestServlet.java
deleted
100644 → 0
View file @
50399e39
package
com
.
roshka
.
webprojecttest
.
servlets
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
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
(
"/suma"
)
public
class
SumaRequestServlet
extends
HttpServlet
{
@Override
protected
void
doGet
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
throws
ServletException
,
IOException
{
PrintWriter
pw
=
new
PrintWriter
(
resp
.
getOutputStream
());
String
s1
=
req
.
getParameter
(
"s1"
);
String
s2
=
req
.
getParameter
(
"s2"
);
if
(
s1
!=
null
&&
s2
!=
null
)
{
pw
.
write
(
"<html>"
+
"<head>"
+
"<title>Hola, bienvenidos al sumador</title>"
+
"</head>"
+
"<body>"
+
"<h1>Soy un sumador</h1>"
+
"<div>"
+
"<p>Operador s1: "
+
s1
+
"</p>"
+
"<p>Operador s2: "
+
s2
+
"</p>"
+
"<p>s1 + s2: "
+
(
Double
.
parseDouble
(
s1
)
+
Double
.
parseDouble
(
s2
))
+
"</p>"
+
"</div>"
+
"</body>"
+
"</html>"
);
}
else
{
pw
.
write
(
"<html>"
+
"<head>"
+
"<title>Hola, bienvenidos al sumador</title>"
+
"</head>"
+
"<body>"
+
"<h1>Soy un sumador</h1>"
+
"<div>"
+
"<form action=\"suma\">"
+
"Enter 1st number: <input type=\"text\" name=s1><br>"
+
"Enter 2nd number: <input type=\"text\" name=s2><br>"
+
"<input type=\"submit\">"
+
"</form>"
+
"</div>"
+
"</body>"
+
"</html>"
);
}
pw
.
close
();
}
}
WebProjectTest/src/com/roshka/webprojecttest/servlets/SumaResponseServlet.java
deleted
100644 → 0
View file @
50399e39
package
com
.
roshka
.
webprojecttest
.
servlets
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
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
(
"/suma-response"
)
public
class
SumaResponseServlet
extends
HttpServlet
{
protected
void
doGet
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
throws
ServletException
,
IOException
{
PrintWriter
pw
=
new
PrintWriter
(
resp
.
getOutputStream
());
String
s1
=
req
.
getParameter
(
"s1"
);
String
s2
=
req
.
getParameter
(
"s2"
);
pw
.
write
(
"<html>"
+
"<head>"
+
"<title>Hola, bienvenidos al sumador</title>"
+
"</head>"
+
"<body>"
+
"<h1>Soy un sumador</h1>"
+
"<div>"
+
"<p>Operador s1: "
+
s1
+
"</p>"
+
"<p>Operador s2: "
+
s2
+
"</p>"
+
"<p>s1 + s2: "
+
(
Double
.
parseDouble
(
s1
)
+
Double
.
parseDouble
(
s2
))
+
"</p>"
+
"</div>"
+
"</body>"
+
"</html>"
);
pw
.
close
();
}
}
WebProjectTest/src/com/roshka/webprojecttest/servlets/TestServlet.java
deleted
100644 → 0
View file @
50399e39
package
com
.
roshka
.
webprojecttest
.
servlets
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
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
(
"/test1"
)
public
class
TestServlet
extends
HttpServlet
{
@Override
protected
void
doGet
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
throws
ServletException
,
IOException
{
// req -> datos que envia el navegador al servidor de aplicaciones
// resp -> la respuesta que envia el servidor de aplicaciones al navegador
PrintWriter
pw
=
new
PrintWriter
(
resp
.
getOutputStream
());
pw
.
write
(
"<html>"
+
"<head>"
+
"<title>Hola, bienvenidos</title>"
+
"</head>"
+
"<body>"
+
"Hola, estoy dentro del HTML"
+
"</body>"
+
"</html>"
);
pw
.
close
();
}
}
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