form submission servlet | Community
Skip to main content
rk39193348
Level 4
March 31, 2017
Solved

form submission servlet

  • March 31, 2017
  • 5 replies
  • 3356 views

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
April 3, 2017

Can anyone share package which contains form submission to servlet?

Ratna_Kumar
Level 10
April 3, 2017

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.

MC_Stuff
Level 10
April 4, 2017

Make sure you have configured servlet for authentication not required

vjetty
Level 4
April 4, 2017

Hi RK

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

smacdonald2008
smacdonald2008Accepted solution
Level 10
April 4, 2017