Simple message flow in the jsp portlet

I'm new to Java portlets, and I'm trying to understand how these things work at a fairly basic level.

Now I am confused about how to have several “views” in my portlet. Say my portlet will be used for CRUD operations. For simplicity, I imagine that when the user first looks at the portlet, he will see a table with all the records from the database. Then the user will be able to click on the record in which a new page will be displayed in the portlet containing the form for updating the record. Adding a record will work the same. Nothing shocking here ...

Where can I control how the user moves between different views, and where can I switch between the various actions that the user can perform (update, add, delete, etc.)?

I looked online and found a ton of hello world portlet tutorials that don't help much. I found many other tutorials that are more advanced and focused on what I'm doing, but they all seem to use some basic frameworks like Struts, JSF, etc.

I would like to know how to make this work, using only the base portlet using JSP to render views.

+3
source share
1 answer

API (JSR-168) - , . , , .

  • - - - ;
  • - , html. JSR-168 URL- HTML- actionURL, . <form action="<portlet:actionURL/>" method="post">
  • HTML processAction (ActionRequest aRequest, ActionResponse aResponse)
  • , ; .
  • , .
  • ..
+5

Source: https://habr.com/ru/post/1706147/


All Articles