The following comment has been added to this issue:

     Author: Nick Grimshaw
    Created: Tue, 3 Aug 2004 7:35 AM
       Body:
I'm also experiencing this. I have an EmployeeServlet, and an AddEmployeeServlet, 
which is a subclass. Relevant code is:
---- EmployeeServlet.java -----------
/**
 * @web.servlet name = "EmployeeServlet"
 * @web.servlet-mapping url-pattern = "/employee/*"
 */
public class EmployeeServlet extends BaseServlet {
        ...
}
---- AddEmployeeServlet.java --------
/**
 * @web.servlet name = "AddEmployeeServlet"
 * @web.servlet-mapping url-pattern = "/add-employee/*"
 */
public class AddEmployeeServlet extends EmployeeServlet {
        ...
}
-------------------------------------
BaseServlet is an abstract class, and has no @web tags in it.

My generated web.xml contains:
---- web.xml ------------------
...
  <servlet-mapping>
     <servlet-name>EmployeeServlet</servlet-name>
     <url-pattern>/employee/*</url-pattern>
  </servlet-mapping>
  ...
  <servlet-mapping>
     <servlet-name>AddEmployeeServlet</servlet-name>
     <url-pattern>/add-employee/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
     <servlet-name>AddEmployeeServlet</servlet-name>
     <url-pattern>/employee/*</url-pattern>
  </servlet-mapping>
...
-------------------------------
Obviously, that final mapping shouldn't be there.
---------------------------------------------------------------------
View this comment:
  
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-781?page=comments#action_14382

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-781

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-781
    Summary: Using Xdoclet to map servlet names, Get mapping for Abstract classes too.
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             Web Module

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: pranav butala

    Created: Mon, 26 Jan 2004 4:29 PM
    Updated: Tue, 3 Aug 2004 7:35 AM
Environment: Linux

Description:
I have  a servlet,actionmain1, which extends BaseServlet(another servlet).
The XDoclet tags for
actionmain1 are as shown below.  When XDoclet created web.xml,however, it
creates
two elements of <servlet-mapping> for actionmain1 corresponding two different
<url-pattern>s, as shown below.

-----------------------Code Begins----------------------------
/**
  *   @web.servlet name="actionmain1"
  *   @web.servlet-mapping url-pattern="/TMS.actionmain1/*"
  *
  */

public class FlowerServlet  extends BaseServlet {
......
......
}

Base Servlet is an abstract class

In build.xml, have:

<deploymentdescriptor
acceptAbstractClasses="false"
............ant........
</deploymentdescriptor>
-----------------------Code Ends----------------------------

-----------------------web.xml Begins----------------------------
   <servlet-mapping>
      <servlet-name>TMS.actionmain1</servlet-name>
      <url-pattern>/TMS.actionmain1/*</url-pattern>
   </servlet-mapping>

   <servlet-mapping>
      <servlet-name>actionmain1</servlet-name>
      <url-pattern>/TMS.BaseServlet/*</url-pattern>
   </servlet-mapping>
-----------------------web.xml Ends----------------------------

I do not want the
  <servlet-name>actionmain1</servlet-name>
      <url-pattern>/TMS.BaseServlet/*</url-pattern>
element in web.xml.


This is the only thig preventing me from checking tje script on the server. Help will 
be greatly appreciated



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to