Results 1 to 5 of 5
  1. #1
    akkemraju is offline Member
    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0

    Default Problem with servlet mapping

    Hi friends,

    I am using Eclipse IDE to develop web application.I created a servlet program and i am trying map to my servlet with XML,It is not mapping.
    i.e <servlet>.........</servlet>
    <servlet-mapping>..........</servlet-maopping> is not getting by default.
    Suggest me the solution.

    Thank you everyone.

  2. #2
    akkemraju is offline Member
    Join Date
    Mar 2013
    Posts
    5
    Rep Power
    0

    Default Re: Problem with servlet mapping

    I am not understanding.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default Re: Problem with servlet mapping

    (Zapped spammer)
    What does your mapping look like?
    Please do not ask for code as refusal often offends.

  4. #4
    SpAm is offline Member
    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0

    Default Re: Problem with servlet mapping

    Hi akkemraju

    As Trolls said, we'd need to see your mapping to advise. However I thought i'd just add, that if you're finding the whole mapping of servlets through XML confusing, if you have support for Servlet 3.0 in you application server, then you can start using the @WebServlet annotation instead. This removes the need to configure your servlets in web.xml at all.

    You can read more about the @WebServlet annotation here:
    Creating and Initializing a Servlet - The Java EE 6 Tutorial

    WebServlet (Java EE 6 )

  5. #5
    dwaipayansh is offline Member
    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Default Re: Problem with servlet mapping

    Hi akkemraju,

    If the tags are not generating by default you can write it manually in web.xml.
    but please make sure that the spelling is correct.
    example: you wrote </servlet-maopping> which has a spelling mistake. it should be </servlet-mapping>..

Similar Threads

  1. web.xml servlet mapping not directing to servlet
    By proksy in forum Java Servlet
    Replies: 7
    Last Post: 10-19-2012, 05:22 PM
  2. Replies: 3
    Last Post: 08-16-2011, 09:35 AM
  3. Servlet Mapping question.
    By Mega Man X in forum Java Servlet
    Replies: 2
    Last Post: 02-17-2010, 02:15 PM
  4. Servlet mapping
    By cozsmin in forum Java Servlet
    Replies: 1
    Last Post: 04-04-2009, 09:15 AM
  5. About servlet-mapping
    By Heather in forum Java Servlet
    Replies: 1
    Last Post: 07-14-2007, 06:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •