Les comento que cuando instale un portlet basado en Spring Portlet MVC en ambien de IBM especificamente en Portal Server, tuve excepciones de mapeo y por mas que visite e investigue en varias paginas no me dieron ninguna solucion, a continuacion le comparto una solucion que realize, esperando que le sea de mucha utilidad.
Estas son las excepciones que se tenia en el portal server:
javax.portlet.UnavailableException: No matching handler method found for portlet request: mode 'view', phase 'RESOURCE_PHASE', parameters map[[empty]]
-ACTION_PHASE
-RENDER_PHASE
cuando ocurria estas expciones, el portlet se detenia por ende la aplicacion.
SOLUCION:
La solucion que encontre es colocarle uno por default. es decir coloque una anotacion vacia que realizara ciertas funcionalidades.
- Si venia una exception render_phase --> se va mi index. (Lo acoplas a tus necesidades)
@RequestMapping
public String index(RenderRequest request, RenderResponse response, Map<String, Object> model) throws IOException
{
return "index"; //Mi jsp
}
-Si venia una excepcion action_phase --> lo dirigia a mi pagina url(Lo acoplas a tus necesidades)
@ActionMapping
public void redirect(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException
{
actionResponse.sendRedirect(MIURL);
}
-Si venia una excepcion resource_phase --> resource lo utilizas en tus ajax por lo tanto en todos mis funciones donde realiza una peticion ajax recibia un valor que recibia y lo regresa al home de la pagina.
Ejemplo:
@ResourceMapping
public void fakeServerSource(ResourceRequest request, ResourceResponse response) throws IOException
{
JSONObject envio = new JSONObject();
envio.put("respuesta", "redirect");
response.getWriter().println(envio);
}
Saludos.
Subscribe to:
Post Comments (Atom)
Provisioning Cloud SQL with Private Service Connect Using Terraform & Accessing from Cloud Run with Spring Boot
In this post, we'll explore how to provision Cloud SQL instances with Private Service Connect (PSC) connectivity using Terraform and the...
-
SAML V2.0 SAML version 2.0 was approved as an OASIS Standard in March 2005. Approved Errata for SAML V2.0 was last produced by the SSTC on 1...
-
Single Sign-On (SSO) is an authentication process that allows users to access multiple applications or services with a single set of login c...
-
Introduction: Sometimes we need to interact with Spring Boot GraphQL API and Spring Boot Rest API in the same time, in this case we can use ...
No comments:
Post a Comment