Skip to main content
rk39193348
Level 4
Mar 31, 2017 11:45 PM UTC
Solved

form submission servlet

I have my form as below:

<form action="/bin/mySearchServlet" name="form" method="POST">   
   <input type="hidden" value="${resource.path} name="one">
  <input type="submit" />   
  </form> 

and servlet as below:

@SlingServlet(paths="/bin/mySearchServlet", methods = "POST", metatype=true)

 

Even though the path matches it is not hitting the servlet. Anyone know why?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

rk39193348
Level 4
Apr 3, 2017 8:51 PM UTC

Can anyone share package which contains form submission to servlet?

Translate
Ratna_Kumar
Level 10
Apr 3, 2017 10:30 PM UTC

Hi,

There are many ways to submit the form to the servlet. 

Option 1:
-> To know how to do a Path to register a Servlet see this below our community article discuss the use case.
//https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html(Submitting Adobe Experience Manager form data to Java Sling Servlets)

Option 2:

-> To know how to submit the form using Sling Post Servlets, see this below article.
//https://helpx.adobe.com/experience-manager/using/using-sling-post-servlets.html(Using Sling Post Servlets to submit mobile data to Adobe Experience Manager)

Hope this helps!

~ Ratna.

Translate
MC_Stuff
Level 10
Apr 4, 2017 12:28 AM UTC

Make sure you have configured servlet for authentication not required

Translate
vjetty
Level 4
Apr 4, 2017 3:03 AM UTC

Hi RK

The information you provided is not enough to give you right answer. Please describe it more. If possible share logs/screenshots.

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Apr 4, 2017 10:22 AM UTC