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 /AltaPropuesta servlet handles the full lifecycle of creating a new cultural proposal in CulturarteWeb. A GET request loads the form pre-populated with categories fetched from the SOAP back-end; a POST request validates and persists the new proposal, initially placing it in the INGRESADA state. Only authenticated users of type Proponente may create proposals.

GET /AltaPropuesta

Renders the proposal creation form.
  1. Connects to the SOAP ControllerWS service and calls portU.getCategorias() to retrieve the full category tree (categories and their subcategories).
  2. Stores the result as the categorias request attribute so AltaPropuesta.jsp can build the category radio-button list.
  3. Reads and clears the exito session attribute — if a proposal was just created successfully, the success banner is surfaced once and then removed from the session.
  4. Forwards to /AltaPropuesta.jsp.
The GET handler does not enforce an active session. The form is visible to any visitor, but the POST will reject unauthenticated requests. If categories cannot be loaded (SOAP error), an error request attribute is set and the form is shown without a category list.

Example

curl -i "http://localhost:8080/CulturarteWeb/AltaPropuesta"

POST /AltaPropuesta

Validates the submitted form data and creates the proposal via SOAP.
The request must use Content-Type: multipart/form-data. The servlet is annotated @MultipartConfig; plain application/x-www-form-urlencoded requests will not be parsed correctly.

Authorization

CheckFailure behaviour
Session attribute logueado must be presentRedirects to login.jsp
portU.isProponente(nick) must return trueForwards to index.jsp with an error attribute

Request parameters

titulo
string
required
Title of the cultural proposal. Used as the unique identifier throughout the system.
descripcion
string
required
Full description of the cultural event or initiative.
imagen
file
required
Image file for the proposal (multipart file part, name="imagen"). Must be provided and non-empty; if missing or zero-size the server returns to the form with the error message "Debe subir una imagen.".
lugar
string
required
Physical location or venue where the event will take place.
fecha
string
required
Planned event date. Must be formatted as yyyy-MM-dd (e.g. 2025-12-31). An empty or missing value returns the form with "Debe seleccionar una fecha.".
precio
integer
required
Ticket/entry price in local currency units. Must be a valid integer ≥ 0; non-numeric values return the form with "Precio o monto total inválido.".
montoTotal
integer
required
Total funding goal in local currency units. Must be a valid integer ≥ 1; non-numeric values return the form with "Precio o monto total inválido.".
categoria
string
required
Name of an existing category or subcategory, as returned by portU.getCategorias(). An empty or missing value returns the form with "Debe seleccionar una Categoria.".
tipoRetorno
string[]
required
One or more return types offered to collaborators. Accepted values:
Form valueSOAP enum
EntradaGratisTipoRetorno.ENTRADA_GRATIS
PorcentajeGananciaTipoRetorno.PORCENTAJE_GANANCIA
If no value is selected the form is returned with "Debe seleccionar un Retorno.".

SOAP call

On successful validation, the servlet calls:
portU.altaPropuestaNew(
    titulo,          // String  — proposal title
    descripcion,     // String  — description
    fileName,        // String  — original image file name
    contenido,       // byte[]  — raw image bytes
    lugar,           // String  — location
    fechaString,     // String  — event date (yyyy-MM-dd)
    precio,          // int     — ticket price
    montoTotal,      // int     — funding goal
    today,           // String  — creation date (today, yyyy-MM-dd)
    listaRetornos,   // List<TipoRetorno>
    categoria,       // String  — category name
    nick,            // String  — proponent's nickname (from session)
    Estado.INGRESADA // initial state
)

Success flow

  1. SOAP call completes without exception.
  2. Session attribute exito is set to "Propuesta creada correctamente.".
  3. Browser is redirected to GET /AltaPropuesta, where the success banner is displayed once and then cleared.

Validation error flow

Any validation failure forwards back to /AltaPropuesta.jsp with:
  • error request attribute — human-readable error message.
  • categorias request attribute — re-fetched category list so the form can be re-rendered.

Initial proposal state

All proposals created through this endpoint start in the INGRESADA state. Proposals in this state are excluded from the public search results (see /Buscador) until they are reviewed and transition to PUBLICADA.

Example

curl -i -X POST "http://localhost:8080/CulturarteWeb/AltaPropuesta" \
  -F "titulo=Festival de Jazz Montevideo" \
  -F "descripcion=Gran festival de jazz al aire libre en la rambla." \
  -F "imagen=@/path/to/cartel.jpg" \
  -F "lugar=Rambla de Montevideo" \
  -F "fecha=2025-11-15" \
  -F "precio=0" \
  -F "montoTotal=50000" \
  -F "categoria=Musica" \
  -F "tipoRetorno=EntradaGratis" \
  -F "tipoRetorno=PorcentajeGanancia" \
  --cookie "JSESSIONID=<your-session-id>"
Subcategories are selectable in the form UI. Pass the subcategory name in categoria when you want to associate the proposal with a specific musical genre, art discipline, etc. rather than a top-level category.

Build docs developers (and LLMs) love