Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FileNook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sanblas
FileNook
Commits
05ee3fd2
Commit
05ee3fd2
authored
May 22, 2019
by
andres
Browse files
Options
Downloads
Patches
Plain Diff
Mensaje crear mensaje sesion
parent
51f238ef
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source Packages/servlet/crearMensajeSV.java
+43
-39
43 additions, 39 deletions
Source Packages/servlet/crearMensajeSV.java
Source Packages/servlet/mensajeSV.java
+27
-19
27 additions, 19 deletions
Source Packages/servlet/mensajeSV.java
with
70 additions
and
58 deletions
Source Packages/servlet/crearMensajeSV.java
+
43
−
39
View file @
05ee3fd2
...
...
@@ -36,7 +36,13 @@ public class crearMensajeSV extends HttpServlet {
protected
void
processRequest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
response
.
setContentType
(
"text/html;charset=UTF-8"
);
HttpSession
session
=
request
.
getSession
(
false
);
if
(
session
==
null
){
String
url
=
"/inicioSesion.html"
;
RequestDispatcher
dispatcher
=
getServletContext
().
getRequestDispatcher
(
url
);
dispatcher
.
forward
(
request
,
response
);
}
else
{
String
userName
=
(
String
)
session
.
getAttribute
(
"usuario"
);
String
destinatario
=
request
.
getParameter
(
"destinatario"
);
String
asunto
=
request
.
getParameter
(
"asunto"
);
String
texto
=
request
.
getParameter
(
"texto"
);
...
...
@@ -52,9 +58,6 @@ public class crearMensajeSV extends HttpServlet {
mensajeEnv
.
setLeido
(
1
);
mensajeEnv
.
setTipo
(
"Enviado"
);
HttpSession
sesion
=
request
.
getSession
();
String
userName
=
(
String
)
sesion
.
getAttribute
(
"usuario"
);
mensajeEnv
.
setAutor
(
userName
);
mensajeEnv
.
setDestinatario
(
destinatario
);
...
...
@@ -76,6 +79,7 @@ public class crearMensajeSV extends HttpServlet {
RequestDispatcher
dispatcher
=
getServletContext
().
getRequestDispatcher
(
url
);
dispatcher
.
forward
(
request
,
response
);
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
...
...
This diff is collapsed.
Click to expand it.
Source Packages/servlet/mensajeSV.java
+
27
−
19
View file @
05ee3fd2
...
...
@@ -13,6 +13,7 @@ import javax.servlet.annotation.WebServlet;
import
javax.servlet.http.HttpServlet
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpSession
;
import
modelo.Mensaje
;
/**
...
...
@@ -34,7 +35,13 @@ public class mensajeSV extends HttpServlet {
protected
void
processRequest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
response
.
setContentType
(
"text/html;charset=UTF-8"
);
HttpSession
session
=
request
.
getSession
(
false
);
if
(
session
==
null
){
String
url
=
"/inicioSesion.html"
;
RequestDispatcher
dispatcher
=
getServletContext
().
getRequestDispatcher
(
url
);
dispatcher
.
forward
(
request
,
response
);
}
else
{
String
userName
=
(
String
)
session
.
getAttribute
(
"usuario"
);
int
idMensaje
=
Integer
.
parseInt
(
request
.
getParameter
(
"idMensaje"
));
String
tipo
=
request
.
getParameter
(
"tipo"
);
...
...
@@ -55,6 +62,7 @@ public class mensajeSV extends HttpServlet {
RequestDispatcher
dispatcher
=
getServletContext
().
getRequestDispatcher
(
url
);
dispatcher
.
forward
(
request
,
response
);
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment