Expand my Community achievements bar.

SOLVED

HTTP POST Request URL: guideContainer.af.internalsubmit.jsp && guideContainer.af.submit.jsp

Avatar

Level 2

Hello I have a question about AEM Adaptive Forms being submitted

Scenario: For the sake of simplicity, I have my submission action set to the OOTB email action.

As I monitor the submission action from an Adaptive Form, In the network tab, I realized that there are 2 requests applied.

1. */jcr:content/guideContainer.af.internalsubmit.jsp

- What is this actually doing?

- Where can I read the implementation for this?

2. */jcr:content/guideContainer.af.submit.jsp

- What is this actually doing?

- Where can I read the implementation for this?

* both requests above are run in order.

1 Accepted Solution

Avatar

Correct answer by
Level 7

From memory, the guideContainer.af.internalsubmit servlet just gets the submitted data from the form before submitting to the actual submission servlet guideContainer.af.submit. I can't remember the actual reason why it is done in two parts, it was a while ago when I asked.

The actual server-side validation is done during the second call I believe. That is when all of the Adobe Sign, Forms portal, Async submit and redirection action happens.

View solution in original post

7 Replies

Avatar

Employee Advisor

Hi,

If you want to know how the submit action work I would suggest you please go through the below document for custom submit action, it would help you with details around Forms Submit action.

AEM 6.0 Forms Help | Writing custom Submit action for adaptive forms

Thanks,

Mayank

Avatar

Level 2

Hey Mayank Gandhi

What is actually happening when the HTTP Request has been made?

1. HTTP request #1. invoked -> */jcr:content/guideContainer.af.internalsubmit.jsp?. What is actually happening here?

2. HTTP request #2. invoked -> */jcr:content/guideContainer.af.submit.jsp?. What is actually happening here?

My guess is HTTP request #1 is doing a server validation, while HTTP request #2 is actually fullfilling the form action.  From my deep digging, both HTTP request are made from the guideBridge API.

Avatar

Correct answer by
Level 7

From memory, the guideContainer.af.internalsubmit servlet just gets the submitted data from the form before submitting to the actual submission servlet guideContainer.af.submit. I can't remember the actual reason why it is done in two parts, it was a while ago when I asked.

The actual server-side validation is done during the second call I believe. That is when all of the Adobe Sign, Forms portal, Async submit and redirection action happens.

Avatar

Level 2

Hello Darren,

This is a great explanation, but is there any documentation for this?

Avatar

Level 7

Some of this was explained on an old Adobe blog that seems to have disappeared now. But this was old ES4 SP1 workings, so its likely to have changed since then.

There is not a lot of technical documentation on this that I have ever found. Without it we rely heavily on either asking via Adobe support (which can take days) to request an answer from engineering. If you are in a hurry you can just decompile the servlet code yourself. You can usually see how the general flow works enough to see what calls what and what is being passed. JetBrains IntelliJ IDEA is great for this as it decompiles any libraries you have in your projects automatically. The Javascript side of the processing is a little easier with Chrome or Firefox tools when you have to dig into the client-side stuff.

I'm pretty sure I have to add a disclaimer somewhere that I don't actually recommend decompiling Adobe code and that the above information is for educational purposes only...

Avatar

Employee Advisor

The flow diagram for AF submission

is explained at AEM 6.0 Forms Help | Writing custom Submit action for adaptive forms

Diagram1.png

There are two submissions - internal submit (massages the entered data(JSON) with uploaded files path) & final submit(takes into account actions fields i.e. in addfields.jsp). This actually gives flexibility during submission (processing)