Invalid element 'welcome-file-list' in content of 'web-app',

HI, folks.
I recently used struts to develop a simple web applicaiton, and whenever I tried to use tag libs
such as /WEB-INF/struts-html.tld
/WEB-INF/struts-html.tld and
tried to compile it, it gives out compile error such as:
Error(52,21): Invalid element 'welcome-file-list' in content of 'web-app', expected elements '[taglib, resource-env-ref, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'.
if I remove the above tag libs, the jsp file compiles
without any problem.
Are you guys familiar with these problems?
please let me know if I'm doing anything foolish.
Thanks!

Unless some other elements tag are not close correctly this error does not make sense. Can you cut and paste your web.xml?
It should look something like:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<welcome-file-list>
  <welcome-file>/untitled1.jsp</welcome-file>
</welcome-file-list>
<taglib>
  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
</web-app>Charles.

Similar Messages

  • Invalid element 'servlet' in content of 'web-app', expected elements [.....

    I'm receiving the following error when I build a web app.
    Invalid element 'servlet' in content of 'web-app', expected elements [.....
    I have been trying to configure cactus struts testing as described here:
    http://jakarta.apache.org/cactus/integration/howto_config.html.
    I've a feeling it's a problem with my web.xml file (perhaps the order I have defined the elements) can anyone help?
    My web.xml is as follows
    <web-app>
    <description>web.xml file for Scorecards Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>ServletRedirector</servlet-name>
    <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>JspRedirector</servlet-name>
    <jsp-file>/jspRedirector.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
    <servlet-name>ServletRedirector</servlet-name>
    <url-pattern>/ServletRedirector</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>JspRedirector</servlet-name>
    <url-pattern>/JspRedirector</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/config/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>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <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>
    <taglib>
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    <resource-ref>
    <description>SCR Production Data Connection</description>
    <res-ref-name>jdbc/SCRproductionDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    ------------------------------------------------------------------------------

    I don't think you are allowed to mix the servlet mapping entries in among the servlet entries. You should do all the servlet entries and then all the servlet mapping entries.

  • Error: Invalid element 'servlet' in content of 'web-app'

    Hi,
    I m working on a project that includes JSPs, whenever I wanna add JSP to my project it shows following compilation error:
    Invalid element 'servlet' in content of 'web-app', expected elements '[error-page, taglib, resource-env-ref, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'
    I have thoroughly checked the web.xml. It is perfectly alright. It is as follows:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>myServlet</servlet-name>
    <servlet-class>com.project.MainServlet</servlet-class>
    <init-param>
    Long postings are being truncated to ~1 kB at this time.

    The Complete web.xml is as follows:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>montana</servlet-name>
    <servlet-class>com.masstech.montana.boundary.uii.MainServlet</servlet-class>
    <init-param>
    <param-name>db</param-name>
    <param-value>MontanaDS</param-value>
    </init-param>
    <init-param>
    <param-name>user</param-name>
    <param-value>MS</param-value>
    </init-param>
    <init-param>
    <param-name>password</param-name>
    <param-value>MS</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-n[i]Long postings are being truncated to ~1 kB at this time.

  • Invalid element 'servlet-mapping' in content of 'web-app'

    Hello, JDev gurus!
    When compling, JDev 9.0.2.822 produce following error
    "oracle.xml.parser.v2.XMLParseException: Invalid element 'servlet-mapping' in content of 'web-app', expected elements '[taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'."
    on line <%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %>
    This line was added automatically from component palette.
    How can I resolve this error?

    Hi,
    Did you change something into your web.xml file?
    Look at your web.xml. You must preserve the order given by the error message:
    Servlet-mapping
    session-config
    mime-mapping
    ejb-ref
    Jamil

  • How to use dynamic file as welcome-file-list in web.xml

    I have configured my web.xml file as this,
    <web-app>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>login.jsf</welcome-file>
    </welcome-file-list>
    </web-app>
    and my login.xhtml file as this,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:f="http://java.sun.com/jsf/core">
    <body>
    <f:view>
    <h:form>
    UserName:<h:inputText id="userName"
    value="#{bean.userName}" rendered="true"
    required="true"/>
    Password:<h:inputText id="password"
    value="#{bean.password}" rendered="true"
    required="true"/>
    <h:commandButton id="submit" value="Submit" action="#{bean.authenticate}" />
    </h:form>
    </f:view>
    </body>
    </html>
    but when i deploy this using tomcat and try to put url as this,
    http://localhost:8080/project
    Its not identifying welcome file from web.xml
    I am getting error like this,
    The requested resource (/project/) is not available.
    How to resolve this,
    Thanks,
    Vinutha

    This might help:
    http://forum.java.sun.com/thread.jspa?threadID=696586
    As well, you might have to change the servlet-mapping in your web.xml. The url-pattern, I think, needs to be .xhtml. Your login.jsf file in the welcome list will need to be renamed to login.xhtml.
    CowKing

  • How to set two different welcome-file to different servlets in web.xml

    Hi friends,
    Can some one help with web.xml file
    I have to different servlets in applications.
    I want to set two different welcome files for my two different
    servlets in web.xml
    Please, can some one give me sample code to achieve this.
    Here web.xml code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>     
         <servlet>
              <servlet-name>reports</servlet-name>
              <servlet-class>com.caremark.ivr.servlet.IvrReportsServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>reports</servlet-name>
              <url-pattern>/reports</url-pattern>
         </servlet-mapping>
         <session-config>
              <session-timeout>30</session-timeout>
         </session-config>
         <welcome-file-list>
              <welcome-file>reportsindex.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>calldetails</servlet-name>
              <servlet-class>com.caremark.ivr.servlet.IvrCallDetailsServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>calldetails</servlet-name>
              <url-pattern>/calldetails</url-pattern>
         </servlet-mapping>
    <welcome-file-list>
              <welcome-file>calldetailsindex.jsp</welcome-file>
         </welcome-file-list>
    </web-app>
    I need this fix immediately. Your help will be really appreciated. Thanks in advance.

    First of all, my understanding is that you need to have a Servlet 2.4 complaint server to do this...Given that, you're supposed to be able to simply specify the Name of the servlet as the welcome-file to get it to work. For example:
    Your servlet section:
    <servlet>
      <servlet-name>Controller</servlet-name>
      <servlet-class>com.company.ControllerServlet</servlet-class>
    </servlet>Now you would add the following to your welcome file list:
    <welcome-file-list>
      <welcome-file>Controller</welcome-file>
    </welcome-file-list>Note that you use the servlet-name value from the servlet definition, NOT the url-mapping from the servlet-mapping section.
    Please note that I cannot verify this as I am running a 2.3 server at home. When I get to work Friday I can test on a 2.4 machine. However this shouldn't take you more than a minute to test.
    Note that I did try this on the 2.3 compliant server and it did NOT work (as I expected)...
    HTH.

  • Defining a file as starting point for web app.

    Does anyone know how I can define a certain servlet as the starting point of my web application?
    My guess is that I have to put something in the <context> element in server.xml. So far it looks like:
    <Context debug="0" docBase="/somedir" path="/somedir" />
    The file I want to start with is in the "somedir" directory.
    Thanks.

    Already found it.
    Added <welcome-file-list> element to web.xml

  • How to display names without file extension in Content Query Web Part in SharePoint 2010

    I try to display names in Content Query Web Part  but it shows file extension. I cannot find a way in CQWP editor that can exclude file extension.  Is there a way to display names excluding file extensions thru settings in the CQWP editor?
    I have to edit the code in SharePoint Designer, right?
    Thanks in advance for any tips!

    In the file ContentQueryMain you have already a function to get the file without extension.
    So we just can use this:
    <xsl:call-template name="OuterTemplate.GetFileNameWithoutExtension">
    <xsl:with-param name="input" select="$DisplayTitle" />
    </xsl:call-template>

  • How to hide title of the list on Content Query Web Part?

    I am trying to display the description on content query web part from a list. Even when I leave the Title field blank on "Presentation" section (editing the web part), the title shows up with the link along with the description. Is there any way
    to hide the title or leave it as blank? Any help is highly appreciated.
    Thanks,
    Evilar

    Hi Evilar,
    Thanks for posting your issue, Kindly use the below mentioned CSS Style in ID of table tag to fix this issue
    #hide-title .ms-viewheadertr {
    display: none;
    }OR
    For Content Query Web part (WebPartWPQX) Note; X is a number of your web part.#WebPartWPQX .ms-viewheadertr
      display: none;
      }So only titles of the webpart within the WebPartWPQX will be hided.
    Also, browse below mentioned URL for more details
    http://www.balestra.be/2013/08/hide-column-titles-from-sharepoint-lists-libraries.html
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Can not open file download prompt in portal web app.

    Hi folks,
    I am migrating existing Struts app into portal web app and currently stuck on the following problem.
    In existing app, Struts action calls servlet that generates excel file, sets response headers:
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition","attachment;filename=thename.csv");
    that brings up "file download" prompt window.
    In portal app, the same code writes excel file content into browser window instead of the prompt.
    Has anyone had to deal with similar problem? Any help will be greatly appreciated.
    Alex.
    Version of portal used is 8.1 SP5
    Struts - 1.1

    Problem is resolved. For those who might be interested - specifying redirect=true on forward to servlet did the trick.

  • How do I use the alternate list template when rendering web app items to a page?

    I need to have the ability to use the main list template on particular pages, but then use different markup for other pages - is there a way that I can specify the alternate list template within the module tag?

    Hi Matt, You should read about web apps here:
    http://helpx.adobe.com/content/help/en/business-catalyst/partner/web-apps-module-create-cu stom.html
    And module reference here:
    http://helpx.adobe.com/business-catalyst/kb/modules-quick-reference.html
    If you insert through the admin and click customise you will see the option to use listbackup. You will also see that layout availible via FTP and in the admin or DW.
    Here you can see where in the module paramaters the option to choose listbackup occurs:
    http://helpx.adobe.com/business-catalyst/kb/modules-quick-reference.html#id_65138

  • Manage content of web-app

    Hi All,
    I am developing a web application using Spring/Hibernate frameworks. My application is going to be a public facing application. The pages on this application can be divided into categories. Pre-login & Post login.
    Pre-Login pages: These are mainly going to be marketing/user education pages. These are HTMLs/Jsps with el tags.
    Post-Login pages: These are main application pages which are pure JSPs with EL tags.
    Since app has been launched, marketing team puts pressure on us to change the content on the pre-login pages on almost daily basis. Currently, we are handling this by sending the static files to the remote static server.
    I want to streamline this process. The above one is tedious for changing the content as presentation is mixed with content. Often this results in errors & reworks.
    Can I make use of Foresst/Cocoon or some other XML based approach to address this issue? I want, at least for static pages, to keep the presentation code on static pages separate from content. This can enable the marketing team to write content in simple text files, which eventually can be uploaded to the server.
    Please suggest what I can do here. I wish for following: A simple text file upload and then on the basis of EL tags on the JSPs, content gets reflected on the pages of the running application.
    Rgds
    Sumit

    Few standard options:
    1) File system based content as you are planning
    2) Database driven content
    3) CMS product
    All these options should be used with care since it may slowdown the application performance. As in your case, marketing team is requesting change once a day; you can setup a cache (Any open source cache product) to improve the performance.
    Option 2& 3 are preferred approach for dynamic content because of ease of use from marketing guy perspective. Marketing team does not need to contact to deployment administrator for each change. They can simply change the content their own.

  • How do I get the ratingrank to show up in the list view of a web app?

    I'm trying to add a review section to my site and can get the form to work correctly on my web app detail view. However I also need the list view to show the rating count. Does anyone know how I can accomplish that?
    Many thanks in advance!
    Jake

    Hi SalynotSally,
    I use the Weather Channel app, but shortly after I posted this problem, the weather did start showing up.  The notification center says at the bottom that the weather is provided by yahoo.  I did make sure the location services and such were on though as Diavonex recommended above.
    Good luck and hope it works for you!

  • Wish list request-  {tag_classifications} in Web apps list layout

    To be able to use the {tag_classifications} in the Web app list layout, list would allow for advanced filtering i nthe list layout.    

    Agreed!! Why this wasn't done when they added {tag_itemID} etc. is beyond me! This can be used for so many resources.

  • Deleting PDF files listed in Adobe Reader X1 App Box.

    When I open the subject box located in the dock of my Mac, it lists two files and when I click on them I am notified in an Error Box that the files could not be located and therefore can not be opened. I would like to delete these files. However, I have been unable to determine how to do that. Please help and Thanks, Dave

    The above message I received states attachments cannot be sent in replies. Here I used the Camera Icon.

Maybe you are looking for

  • Can i associate more than one number to my iMessage account?

    I live in Canada at the moment and am from Seattle, and am wondering if there is a way to associate more than one phone number to iMessage?

  • LE_SHP_GOODSMOVEMENT do not recognize standard VTTK table

    Hi Experts, I created an implementation in LE_SHP_GOODSMOVEMENT, however I cannot use select from table VTTK. VTTK is a standard table, why does my implementation unable to recognize it? Thanks.

  • After Restoring My Ipod Touch....

    I plugged my Ipod Touch into my mac laptop, and it said I had to restore my Ipod, so I clicked restore, it took around half an hour, when I came back I unlockd my Ipod and EVERYTHING was gone, my contacts, apps, music and things like that, it had com

  • Process does not seem to execute on Page 1

    After the user authenticates and is taken to page 1 of the application, I want to set 4 session state variables. I am setting the variables with a pl/sql procedure call defined in the processes section of page 1. The procedure call doesn't seem to ex

  • "Answer" Call Button Not Responding

    When I am receiving a call, I want to press "answer", but the answer button just not responding no matter how many times I try to press the green color circle answer button. This is happening quite often though not every single time.