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 /ListarColaboracionesAPagar and /PagarColaboracion servlets handle the payment phase of a collaboration. A logged-in Colaborador first views their pending (unpaid) collaborations through /ListarColaboracionesAPagar, then is directed to a payment form (pago.jsp) where they submit payment details. On submission, /PagarColaboracion calls portU.acreditarColaboracion(...) on the ControllerWS SOAP service to record the payment. Both servlets resolve their SOAP endpoint configuration from config.properties at runtime.

GET /ListarColaboracionesAPagar

Lists all pending (unpaid) collaborations belonging to the currently logged-in Colaborador, excluding any collaborations whose associated proposal has been cancelled. Forwards to a responsive JSP based on the detected device type.

Query parameters

nick
string
required
The username (nick) of the logged-in Colaborador. Used to fetch the full list of their collaborations via portU.colaboraciones(nick).
tipo
string
required
The user’s profile type. Stored as a request attribute and forwarded to the JSP for use in navigation components.

Behavior

  1. Reads the User-Agent request header to detect whether the client is a mobile device (checks for mobile, android, iphone, or ipad substrings, case-insensitive).
  2. Calls portU.colaboraciones(nick) to retrieve all of the user’s collaborations as List<DtoColaboracion>.
  3. Filters out any collaboration whose linked proposal has a state of Estado.CANCELADA by calling portU.getPropuestaDTO(colaboracion.getPropuesta()) for each entry.
  4. From the remaining list, retains only entries where:
    • colaboracion.getColaborador().equals(nick) — the collaboration belongs to the requesting user, and
    • colaboracion.getDatosPago() == null — the collaboration has not yet been paid.
  5. Sets the following request attributes before forwarding:
AttributeTypeValue
nickStringThe nick query parameter
tipoStringThe tipo query parameter
colaboracionesAPagarList<DtoColaboracion>Filtered list of pending-payment collaborations
paginaStringThe literal string "PagarColaboracion"
  1. Forwards to /PagarColaboracion.jsp on mobile devices, or /PagarColaboracionDesktop.jsp on desktop.

Example request

GET /ListarColaboracionesAPagar?nick=juanperez&tipo=Colaborador HTTP/1.1
Host: localhost:8080

What PagarColaboracion.jsp renders

The JSP iterates over colaboracionesAPagar and renders a card per collaboration showing the proposal title, amount, creation date, and return type. Each card with an active (non-cancelled) collaboration displays an “Acreditar Pago” button that links to:
GET /PagarColaboracion?tituloPropuesta=<URL-encoded title>

GET /PagarColaboracion

Looks up a specific collaboration by proposal title for the session user and forwards to the payment form (pago.jsp). Requires an active session.

Session requirement

The servlet reads the logueado attribute from the current HTTP session. If no session exists or the attribute is absent, the user is redirected to login.jsp.

Query parameters

tituloPropuesta
string
required
The title of the proposal for which the payment form should be shown. Used to find the matching DtoColaboracion from the user’s full collaboration list.

Behavior

  1. Validates the session; redirects to login.jsp if no valid session is found.
  2. Retrieves nickUsr from session.getAttribute("logueado").
  3. Calls portU.colaboraciones(nickUsr) to get all the user’s collaborations.
  4. Searches the list for an entry whose propuesta field equals tituloPropuesta.
  5. If found: sets the colaboracion request attribute (DtoColaboracion) and forwards to pago.jsp.
  6. If not found: redirects to DetallesDePropuesta?tituloPropuesta=<URL-encoded title>.

Example request

GET /PagarColaboracion?tituloPropuesta=Concierto%20de%20Jazz HTTP/1.1
Host: localhost:8080
Cookie: JSESSIONID=abc123

POST /PagarColaboracion

Submits payment details for a specific collaboration. Calls portU.acreditarColaboracion(...) on the SOAP service and redirects to the proposal detail page with an outcome indicator. Requires an active session.

Session requirement

The servlet reads the logueado attribute from the current HTTP session. If no session exists or the attribute is absent, the user is redirected to login.jsp.

Request parameters

tituloPropuesta
string
required
The exact title of the proposal being paid. Used to locate the matching DtoColaboracion in the user’s collaboration list.
monto
integer
required
The amount being paid. Must be greater than or equal to colaboracion.getMonto() (the amount declared when the collaboration was created); otherwise acreditarColaboracion is not called and the payment is considered unsuccessful.
formaPago
string
required
The selected payment method. Accepted values as rendered by pago.jsp: tarjeta, transferencia, or paypal.
dato1
string
Payment detail field 1. Meaning varies by formaPago:
  • tarjeta → cardholder name
  • transferencia → account holder name
  • paypal → PayPal account holder name
dato2
string
Payment detail field 2. Meaning varies by formaPago:
  • tarjeta → card number
  • transferencia → account number
  • paypal → PayPal account number
dato3
string
Payment detail field 3. Meaning varies by formaPago:
  • tarjeta → card type (visa, oca, or mastercard)
  • transferencia → bank name
dato4
string
Payment detail field 4. Currently unused by pago.jsp but accepted and forwarded to DtoPago.
dato5
string
Payment detail field 5. Used for: tarjeta → CVC code.

Behavior

  1. Validates the session; redirects to login.jsp if no valid session is found.
  2. Retrieves nickUsr from session.getAttribute("logueado").
  3. Reads tituloPropuesta, monto, formaPago, and dato1dato5 from the request.
  4. Calls portU.colaboraciones(nickUsr) and locates the matching DtoColaboracion by propuesta title.
  5. Constructs a DtoPago object with all payment fields (monto, formaPago, fechaPago set to null, and dato1dato5).
  6. If the collaboration is found and the submitted monto >= colaboracion.getMonto(), calls portU.acreditarColaboracion(colaboracion.getId(), datosPago).
  7. On success (pagoExitoso == true): redirects to:
    DetallesDePropuesta?id=<tituloPropuesta>&resultadoOperacion=5&accionLograda=acreditado+el+pago+en
    
  8. On failure: redirects to the same URL with accionLograda=Error and resultadoOperacion=0.

Example request

POST /PagarColaboracion HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Cookie: JSESSIONID=abc123

tituloPropuesta=Concierto+de+Jazz&monto=500&formaPago=tarjeta&dato1=Juan+Perez&dato2=4111111111111111&dato3=visa&dato4=&dato5=123

Redirect on success

HTTP/1.1 302 Found
Location: DetallesDePropuesta?id=Concierto%20de%20Jazz&resultadoOperacion=5&accionLograda=acreditado%20el%20pago%20en
Only the Colaborador who owns the collaboration can pay it. The servlet reads the logueado session attribute to identify the acting user, then finds the matching collaboration by both ownership (via portU.colaboraciones(nickUsr)) and proposal title. It is not possible to pay a collaboration belonging to a different user, even if the tituloPropuesta parameter is known.

Build docs developers (and LLMs) love