4 Replies Latest reply on Jan 26, 2013 7:18 PM by Kristian Wright

    can any body tell me how to map the jsp page with sling servlet

    ddigal Level 1

      here is my content.jsp


      <%@include file="/libs/foundation/global.jsp"%>

      <cq:include script="/libs/wcm/core/components/init/init.jsp"/>



      <form name="frm" method="doGet" action="/LoginServlet">

      <cq:include path="texot" resourceType="sapphirenow_web/components/foundation/textlog"/>

      <cq:include path="text1" resourceType="sapphirenow_web/components/foundation/textlog"/>

      <cq:include path="text3" resourceType="sapphirenow_web/components/foundation/submit"/>





      here is my LoginServlet.java



      package com.sapphirenow.web;


      import java.io.*;

      import java.util.*;

      import javax.servlet.*;


      import javax.servlet.http.*;

      import java.io.IOException;

      import javax.servlet.ServletException;

      import org.apache.sling.api.SlingHttpServletRequest;

      import org.apache.sling.api.SlingHttpServletResponse;

      import org.apache.sling.api.servlets.SlingAllMethodsServlet;





      * @scr.component metatype="true"

      * @scr.service interface="javax.servlet.Servlet"

      * @scr.property name="sling.servlet.paths"  value="/bin/mn"

      * @scr.property name="sling.servlet.methods" values="GET"




      public class LoginServlet extends SlingAllMethodsServlet


        public void doGet(SlingHttpServletRequest request,SlingHttpServletResponse response) throws ServletException,IOException




                PrintWriter out = response.getWriter();

                String name = request.getParameter("Username");

                String pass = request.getParameter("Password");



                out.println("Thanks  Mr." + "  " + name + "  " + "for visiting roseindia<br>" );

                out.println("Now you can see your password : " + "  " + pass + "<br>");





         its showing "The requested URL /LoginServlet was not found on this server."  how to solve this pls help me