Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/17Franco/CulturarteWeb/llms.txt

Use this file to discover all available pages before exploring further.

The /PerfilUsuario servlet is the central hub for all user-profile related operations in CulturarteWeb. It resolves the correct DTO from the back-end web service depending on whether the target account is a Proponente (project proposer) or a Colaborador (collaborator/funder), then hands all data off to perfilUsuario.jsp for rendering. The same profile page also exposes account-management actions — deleting an account, listing all registered users, and reviewing the platform’s access log.

GET /PerfilUsuario

Fetches the full profile of any registered user and forwards the request to perfilUsuario.jsp.

Request parameters

nick
string
required
The unique nickname (username) of the profile to display. Must not be an empty string.
tipo
string
required
The account type of the user. Accepted values are Proponente and Colaborador. This value controls which SOAP call is made and which DTO fields are available in the JSP.

Behavior

  1. Reads WEB_SERVICES_HOST, WEB_SERVICES_PORT, and SERVICE from config.properties to build the WSDL URL dynamically.
  2. Instantiates ControllerWS_Service and obtains the ControllerWS port.
  3. Branches on tipo:
    • tipo=Proponente → calls portU.getDTOProponente(nick) → returns a DtoProponente (extends DtoUsuario; adds biografia, direccion, webSite).
    • Any other value → calls portU.getDTOColaborador(nick) → returns a DtoColaborador.
  4. Sets the following request attributes for the JSP:
AttributeTypeDescription
infoPerfilDtoProponente or DtoColaboradorFull user data object
nickStringThe requested nickname
tipoStringThe account type string
paginaStringAlways "Perfil" — used by shared nav components
  1. Forwards to /perfilUsuario.jsp.

JSP rendering

perfilUsuario.jsp reads the infoPerfil attribute (cast to DtoUsuario for common fields) and displays:
  • Profile photo (served via /Img?ruta=…) or a generic avatar fallback.
  • nickname, nombre, apellido, email, fechaString.
  • For Proponente profiles additionally: biografia, direccion, webSite.
  • A follow/unfollow icon (rendered by MostrarIconoSeguirODejarDeSeguir.js) when the viewer is not the profile owner.
  • An Eliminar Cuenta button (only visible to the logged-in Proponente viewing their own profile).

Example

curl -X GET "http://localhost:8080/CulturarteWeb/PerfilUsuario?nick=jdoe&tipo=Proponente" \
  -H "Cookie: JSESSIONID=<your-session-id>"
The servlet does not check authentication itself. Access control is handled upstream by the session filter. Unauthenticated users will still see the profile page, but the follow icon and the delete button will not be rendered.

POST /EliminarCuenta

Permanently deletes a Proponente account. The request is triggered from the confirmation modal inside perfilUsuario.jsp.

Request parameters

NickName
string
required
The nickname of the account to delete. The user must type their own nickname in the confirmation modal to confirm the operation.

Behavior

  1. Calls portU.existe(nick) to verify the account exists.
  2. If it exists, calls portU.eliminarProponente(nick).
  3. On success, invalidates the current HttpSession (logs the user out) and returns a JSON response.
  4. Returns {"resp": false} if the nickname does not exist or if eliminarProponente returns false.

Response (JSON)

{ "resp": true }
{ "resp": false }
{ "resp": false, "error": "<exception message>" }

Example

curl -X POST "http://localhost:8080/CulturarteWeb/EliminarCuenta" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Cookie: JSESSIONID=<your-session-id>" \
  -d "NickName=jdoe"
Account deletion is permanent and irreversible. Calling eliminarProponente removes the user record from the back-end. The session is immediately invalidated upon success, logging the user out. There is no soft-delete or recovery mechanism.

GET /listarUsuarios

Returns a list of all registered users on the platform and forwards to the user-listing view.

Request parameters

This endpoint takes no query parameters.

Behavior

  1. Calls portU.listaDTOUsuarios() on the SOAP web service.
  2. Returns a List<DtoUsuario> containing all registered users regardless of type.
  3. Sets the request attribute Usuarios with the full list.
  4. Forwards to /SeguirUsuarios.jsp for rendering.

JSP attributes set

AttributeTypeDescription
UsuariosList<DtoUsuario>All registered platform users

Example

curl -X GET "http://localhost:8080/CulturarteWeb/listarUsuarios" \
  -H "Cookie: JSESSIONID=<your-session-id>"
This endpoint is typically invoked when a logged-in user navigates to the “follow users” section of the platform. The resulting SeguirUsuarios.jsp view allows the current user to browse all accounts and initiate follow actions.

RegistroDeAccesos (Servlet Filter)

RegistroDeAccesos is a Jakarta EE Filter (not a servlet) mapped to /*, meaning it intercepts every incoming HTTP request to the application before it reaches any servlet.

Filter mapping

urlPatterns = {"/*"}

Behavior

For every request whose URL does not contain /Img (image requests are excluded to avoid log noise):
  1. Extracts the client’s IP address via sr.getRemoteAddr().
  2. Extracts the User-Agent header (defaults to "dato nulo" if absent).
  3. Builds a DtoRegistrosAccesoWeb object populated with:
    • ip — client IP address
    • navegadorWeb — the User-Agent string
    • so — also set to the User-Agent string
    • url — the full request URL
    • fechaReg — set to null (timestamp is assigned server-side by the web service)
  4. Calls portU.agregarRegistroAccesoWeb(reg) on the SOAP back-end to persist the access record.
  5. Calls fc.doFilter(sr, sr1) to continue the filter chain and allow the request to proceed normally.
RegistroDeAccesos is an administrative audit filter, not a user-facing endpoint. It runs transparently in the background on every page load. Access logs are stored and managed entirely by the back-end web service.

Build docs developers (and LLMs) love