1 person found this helpful
Bellow some links which maybe hepls you:
and some threads from the forum:
By the way there is a lot of information which you can find in th network.
As you specifically asked about mapping servlets and accessing them properly: In this respect the main problem with your code is that you have registered your servlet by path using the following SCR JavaDoc tag:
@scr.property name="sling.servlet.paths" value="/bin/mn"
Therefore you need to use this path in your HTML form action attribute in order to post to your servlet:
<form name="frm" method="doGet" action="/bin/mn">
Please note that SCR JavaDoc tags are deprecated and you should use SCR annotations instead. If you use CRXDE/Lite with CQ5.5, you will even run into problems creating a bundle (see http://labs.sixdimensions.com/blog/dklco/2012-05-16/scr-javadoc-tags-deprecated-cq-55). There are some further problems in your code, so I would also recommend to read through the documentation as provided by kasq in the previous post.
Hope this helps,
You might need to let CQ5 know where to look allow serving servlets from. Log into the OSGI console, click the Confuguration tab. Open the Apache Sling Servlet/Script Resolver and Error Handler config, and add "/bin/mn" (without quotes) to the Execution Paths. Save the config and try again.
If you're trying to access this through a dispatcher, you may need to allow the "/bin/mn" path to eb accessable from there as well.