Hi,
I tried following example by writing custom resource resolvers and
servlets. Can someone on the list please verify if this fits 'good
programming practices' for sling?
Use Case: User Account Summary
1. User makes a GET request to /account-entry
a) I have a resource resolver that resolves /account-entry to a
resource (An empty resource at this point)
b) Resource resolver has resource type as /apps/myapp/account-entry.jsp
c) account-entry.jsp is presented to the user
2. User enters account number and submits the form. This makes a POST
request to /account-verify
a) I have a Servlet resource registered for path /account-verify
for handling POST.
b) Servlet makes a backend web service call to verify the account
c) If account is valid, it redirects (by calling
httpResponse.sendRedirect()) to /account-summary
3. A GET request is made to /account-summary
a) I have a resource resolver which resolves /account-summary to resource
b) This resource resolver makes a back end web service call to get
account details
c) This resource resolver has resource type as
/apps/myapp/account-summary.jsp
d) account-summary.jsp is presented to the user.
Following above pattern of Resource resolvers - Servlets, I should be
able to write any web application that is not dealing with data from
JCR repository.
Thanks,
Unmesh