I have this working on Glassfish 2.1.  There are other problems in the 
web.xml that don't conform to the DTD that I did not notice the first 
time I tried this.  Here is a working web.xml:

-- cut here --
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
       version="2.4">

  <display-name>xwiki</display-name>
  <description>XWiki Application</description>
 
  <!-- Restlet Application class name -->
  <context-param>
    <param-name>org.restlet.application</param-name>
    <param-value>
      org.xwiki.rest.XWikiRestletJaxRsApplication 
    </param-value>
  </context-param>
 
  <!-- Filter that sets a custom encoding to all requests, since usually 
clients don't specificy
       the encoding used for submitting the request, so by default 
containers fall back to the
       encoding globally configured in their settings. This allows XWiki 
to use a custom encoding,
       without affecting the whole container (and the other applications 
hosted). -->
  <filter>
    <filter-name>Set Character Encoding</filter-name>
    
<filter-class>com.xpn.xwiki.web.SetCharacterEncodingFilter</filter-class>
    <!-- The encoding to use. This must be the same as the one in 
xwiki.cfg (hopefully only one
         encoding will be used later). -->
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <!-- Whether to ignore and override the encoding specified by the 
client, when this actually
         happens. For example, AJAX requests made through 
XmlHttpRequests specify UTF-8. When this
         is set to false, the custom encoding is used only when there 
wasn't any encoding specified
         by the client. -->
    <init-param>
      <param-name>ignore</param-name>
      <param-value>false</param-value>
    </init-param>
  </filter>

  <!-- A filter that allows requests to be saved and reused later. For 
example when the current request contains an expired
       authentication token, and the authorization module redirects to 
the login page, all the information sent by the
       client would be lost; this filter allows to save all that 
information, and after a successful login, injects the
       saved data in the new request. -->
  <filter>
    <filter-name>RequestRestorer</filter-name>
    
<filter-class>com.xpn.xwiki.web.SavedRequestRestorerFilter</filter-class>
  </filter>

  <!-- This filter is used to convert the HTML generated by the WYSIWYG 
editor to wiki syntax -->
  <filter>
    <filter-name>ConversionFilter</filter-name>
    
<filter-class>com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter</filter-class>
  </filter>

  <!-- Filter used to 'steal' webdav requests made to the application 
root -->
  <filter>
    <filter-name>DavFilter</filter-name>
    <filter-class>com.xpn.xwiki.plugin.webdav.XWikiDavFilter</filter-class>
  </filter>

  <!-- A filter that dispatches requests to the right action depending 
on the button pressed in the editing form. This
       is needed when javascript is disabled, since the browser cannot 
send the form data to different URLs depending on
       the button pressed. -->
  <filter>
    <filter-name>ActionDispatcher</filter-name>
    <filter-class>com.xpn.xwiki.web.ActionFilter</filter-class>
  </filter>

  <!-- The encoding filter MUST always be the first one, as setting the 
encoding does not work after accessing the request data. -->
  <filter-mapping>
    <filter-name>Set Character Encoding</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>RequestRestorer</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ConversionFilter</filter-name>
    <servlet-name>action</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>DavFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ActionDispatcher</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <!-- Initializes Plexus and puts a reference to the Plexus Component 
Manager in the Servlet
       Context. Also initializes the Container Manager component with 
the Servlet Context. -->
  <listener>
    
<listener-class>org.xwiki.container.servlet.XWikiPlexusServletContextListener</listener-class>
  </listener>

  <!-- Main Plexus Servlet receiving all requests. For now this is 
mapped to some unused URL
       contex path since we're still using Struts but in the near 
future, Struts will go away
       and be replaced by XWiki's own Action component. -->
  <servlet>
    <servlet-name>PlexusServlet</servlet-name>
    
<servlet-class>org.xwiki.container.servlet.XWikiPlexusServlet</servlet-class>
  </servlet>

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
      <param-name>xwiki</param-name>
      <param-value>com.xpn.xwiki.XWiki</param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>redirectHomeServlet</servlet-name>
    <servlet-class>com.xpn.xwiki.web.HomePageRedirectServlet</servlet-class>
    <!-- Uncomment and edit this if you want to redirect to a different 
home page, or if you have different mappings.
         Note: the URL should not start with /, because it allows the 
context name to be changed. If it starts with /,
         then it should be an absolute URL, including the application 
context path.
    <init-param>
      <description>The address to redirect to when the client hits the 
root of the application.</description>
      <param-name>homePage</param-name>
      <param-value>bin/Main/</param-value>
    </init-param>
    -->
  </servlet>

  <servlet>
    <servlet-name>xmlrpc</servlet-name>
    <servlet-class>com.xpn.xwiki.xmlrpc.XWikiXmlRpcServlet</servlet-class>
    <init-param>
      <description>Sets, whether the servlet supports vendor extensions 
for XML-RPC.</description>
      <param-name>enabledForExtensions</param-name>
      <param-value>false</param-value>
    </init-param>
  </servlet>

  <!-- This is the entry pointy for XWiki GWT services -->
  <servlet>
    <servlet-name>XWikiService</servlet-name>
    
<servlet-class>com.xpn.xwiki.gwt.api.server.XWikiServiceImpl</servlet-class>
  </servlet>

  <!-- This is the entry pointy for the new WYSIWYG's GWT services -->
  <servlet>
    <servlet-name>WysiwygService</servlet-name>
    
<servlet-class>com.xpn.xwiki.wysiwyg.server.DefaultWysiwygService</servlet-class>
  </servlet>

  <!-- WebDAV servlet -->
  <servlet>
   <servlet-name>webdav</servlet-name>
   
<servlet-class>com.xpn.xwiki.plugin.webdav.XWikiDavServlet</servlet-class>
  </servlet>

  <!-- RESTful API Restlet servlet -->
  <servlet>
    <servlet-name>RestletServlet</servlet-name>
    <servlet-class>
      org.xwiki.rest.XWikiRestletServlet 
    </servlet-class>
    <init-param>
      <param-name>resources</param-name>
      <param-value>
        org.xwiki.rest.resources.RootResource;
        org.xwiki.rest.resources.SyntaxesResource;
        org.xwiki.rest.resources.wikis.WikisResource;
        org.xwiki.rest.resources.wikis.WikiSearchResource;
        org.xwiki.rest.resources.wikis.WikiPagesResource;
        org.xwiki.rest.resources.wikis.WikiAttachmentsResource;
        org.xwiki.rest.resources.spaces.SpacesResource;
        org.xwiki.rest.resources.spaces.SpaceResource;
        org.xwiki.rest.resources.spaces.SpaceSearchResource;
        org.xwiki.rest.resources.spaces.SpaceAttachmentsResource;
        org.xwiki.rest.resources.pages.PagesResource;
        org.xwiki.rest.resources.pages.PageChildrenResource;
        org.xwiki.rest.resources.pages.PageHistoryResource;
        org.xwiki.rest.resources.pages.PageResource;
        org.xwiki.rest.resources.pages.PageTranslationHistoryResource;
        org.xwiki.rest.resources.pages.PageTranslationResource;
        org.xwiki.rest.resources.pages.PageTranslationsResource;
        org.xwiki.rest.resources.pages.PageTranslationVersionResource;
        org.xwiki.rest.resources.pages.PageVersionResource;
        org.xwiki.rest.resources.pages.PageTagsResource;
        org.xwiki.rest.resources.comments.CommentResource;
        org.xwiki.rest.resources.comments.CommentsResource;
        org.xwiki.rest.resources.comments.CommentsVersionResource;
        org.xwiki.rest.resources.comments.CommentVersionResource;
        org.xwiki.rest.resources.attachments.AttachmentHistoryResource;
        org.xwiki.rest.resources.attachments.AttachmentResource;
        
org.xwiki.rest.resources.attachments.AttachmentsAtPageVersionResource;
        org.xwiki.rest.resources.attachments.AttachmentsResource;
        
org.xwiki.rest.resources.attachments.AttachmentVersionResource;       
        org.xwiki.rest.resources.objects.ObjectsResource;
        org.xwiki.rest.resources.objects.ObjectsAtPageVersionResource;
        org.xwiki.rest.resources.objects.ObjectsForClassNameResource;
        org.xwiki.rest.resources.objects.ObjectResource;
        org.xwiki.rest.resources.objects.ObjectAtPageVersionResource;
        org.xwiki.rest.resources.objects.ObjectPropertiesResource;
        
org.xwiki.rest.resources.objects.ObjectPropertiesAtPageVersionResource;
        org.xwiki.rest.resources.objects.ObjectPropertyResource;
        
org.xwiki.rest.resources.objects.ObjectPropertyAtPageVersionResource;
        org.xwiki.rest.resources.objects.AllObjectsForClassNameResource;
        org.xwiki.rest.resources.classes.ClassesResource;
        org.xwiki.rest.resources.classes.ClassResource;
        org.xwiki.rest.resources.classes.ClassPropertiesResource;
        org.xwiki.rest.resources.classes.ClassPropertyResource;
        org.xwiki.rest.resources.tags.TagsResource;
        org.xwiki.rest.resources.tags.PagesForTagsResource;
        org.xwiki.rest.resources.ModificationsResource;
      </param-value>
    </init-param>
    <init-param>
      <param-name>providers</param-name>
      <param-value>
        org.xwiki.rest.exceptions.XWikiExceptionMapper;
        org.xwiki.rest.exceptions.QueryExceptionMapper;
        org.xwiki.rest.representations.pages.TextPlainPageReader;
        org.xwiki.rest.representations.pages.FormUrlEncodedPageReader;
        org.xwiki.rest.representations.objects.TextPlainPropertyReader;
        org.xwiki.rest.representations.objects.FormUrlEncodedPropertyReader;
        org.xwiki.rest.representations.objects.FormUrlEncodedObjectReader;
        org.xwiki.rest.representations.comments.TextPlainCommentReader;
        org.xwiki.rest.representations.comments.FormUrlEncodedCommentReader;
        org.xwiki.rest.representations.tags.TextPlainTagsReader;
        org.xwiki.rest.representations.tags.FormUrlEncodedTagsReader;
      </param-value>
    </init-param>
  </servlet>

  <!-- RESTful API mapping -->
  <servlet-mapping>
    <servlet-name>RestletServlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
  </servlet-mapping>
 
  <!-- Unused mapping for now. In the future the correct mapping will be 
/* when the action servlet
       will be decommissioned in favor of the XWiki Action component -->
  <servlet-mapping>
    <servlet-name>PlexusServlet</servlet-name>
    <url-pattern>/plexus/*</url-pattern>
  </servlet-mapping>
 
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/bin/*</url-pattern>
  </servlet-mapping>
 
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/wiki/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/testbin/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/xwiki/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>xmlrpc</servlet-name>
    <url-pattern>/xmlrpc/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>redirectHomeServlet</servlet-name>
    <url-pattern>/redirect</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>XWikiService</servlet-name>
    <url-pattern>/XWikiService</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>WysiwygService</servlet-name>
    <url-pattern>/WysiwygService</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
   <servlet-name>webdav</servlet-name>
   <url-pattern>/webdav/*</url-pattern>
  </servlet-mapping>

  <!-- We override the mime type definition for javascript and css 
files, as some containers don't
       provide it, causing problems for javascript files containg 
velocity code, like
       fullscreenEdit.js -->
  <mime-mapping>
    <extension>js</extension>
    <mime-type>text/javascript</mime-type>
  </mime-mapping>

  <mime-mapping>
    <extension>css</extension>
    <mime-type>text/css</mime-type>
  </mime-mapping>

  <mime-mapping>
    <extension>bmp</extension>
    <mime-type>image/bmp</mime-type>
  </mime-mapping>

  <!-- Redirects to the Main.WebHome page if the user calls the root of 
the webapp, i.e.
       http://server:port/xwiki/
       Note 1: for this to work fine the redirect file needs to exist in 
the WAR
       Note 2: with Servlet 2.4 it's possible to have a Servlet directly 
specified in the welcome
               file list but right now we'd like XWiki to work out of 
the box with Servlet 2.3
  -->              
  <welcome-file-list>
    <welcome-file>redirect</welcome-file>
  </welcome-file-list>

  <error-page>
    <error-code>404</error-code>
    <location>/bin/view/Main/DocumentDoesNotExist</location>
  </error-page>

  <!-- Struts Tag Library Descriptors -->
  <jsp-config>
    <taglib>
      <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
      <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>

    <taglib>
      <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
      <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>

    <taglib>
      <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
      <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
  </jsp-config>

  <!-- Uncomment if you wish to use a DataSource to define the Database 
connection
  <resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/XWikiDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>
  -->

  <env-entry>
    <env-entry-name>XWikiConfig</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>/WEB-INF/xwiki.cfg</env-entry-value>
  </env-entry>
</web-app>
 
-- cut here --

AjdinBrandic wrote:
> I have the same problem with GF2.1 and xwiki2.0M1 on Windows.
>
> "Deploying application in domain failed; Error loading deployment
> descriptors for module [xwiki-enterprise-web-2.0-milestone-1] Line 161
> Column 20 -- Deployment descriptor file WEB-INF/web.xml in archive
> [xwiki-enterprise-web-2.0-milestone-1]. cvc-complex-type.2.4.d: Invalid
> content was found starting with element 'description'. No child element is
> expected at this point. Error loading deployment descriptors for module
> [xwiki-enterprise-web-2.0-milestone-1] Line 161 Column 20 -- Deployment
> de..."
>
> Ajdin
>
>
> Willi Schiegel wrote:
>   
>> Hello All!
>>
>> I want to deploy the xwiki-enterprise-web-1.9.1.war file into a
>> Glassfish v2.1 server under Solaris 10 Update 7. The deployment does not
>> work. Here is the error message:
>>
>> Deploying application in domain failed; Error loading deployment
>> descriptors for module [xwiki] Line 170 Column 20 -- Deployment
>> descriptor file WEB-INF/web.xml in archive [xwiki].
>> cvc-complex-type.2.4.d: Invalid content was found starting with element
>> 'description'. No child element is expected at this point.
>>
>> Does someone know how I can fix this?
>>
>> Thank you very much.
>>
>> Greetings,
>> Willi
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>>
>>     
>
> --
> View this message in context: 
> http://n2.nabble.com/Problem-deploying-war-file-to-Glassfish-v2.1-tp3203311p3236460.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>
>   

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to