Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6647161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:30:17+00:00 2026-05-26T00:30:17+00:00

My web.xml is: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd id=WebApp_ID version=2.5> TestStruts2 <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name>

  • 0

My web.xml is:

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&#8221; id=”WebApp_ID” version=”2.5″>
TestStruts2

<servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
    <param-name>
        org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
    </param-name>
    <param-value>
        /WEB-INF/tiles-defs.xml
    </param-value>
</context-param>

<listener>
    <listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
</listener>   
<welcome-file-list>
    <welcome-file>/WEB-INF/Templates/Jsp/index.jsp</welcome-file>
</welcome-file-list>   

I’m using Spring and Tiles2.1
My resource folder is in /WEB-INF/Templates/Resources/
DispatcherServlet is set to map all (“/”). I want to exclude “Resources” folder (that contains images,css) because tomcat doesn’t show images and css. It sayes something like: ,,No mapping found for ….”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:30:17+00:00Added an answer on May 26, 2026 at 12:30 am

    Take the resources like images, css etc. out of WEB-INF.
    “WEB-INF” is not for static resources and it’s used to contain program code (JSPs, class files, libraries, etc.) and prevent access from outside. It is not a good practice to put your resources into your project archive (.war, .ear) because your package will be very heavy weight to deploy.

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

    means that your dispatcherServlet maps the requests http://host/applicationName/*

    You can put your resources into vhost/host.com/httpdocs/images of your host independent from your java application. say:

    http://host/myimages/

    and relatively accessable from your templeates (jsps)

    <img src="/myimages/myicon.png"/>
    

    therefore your packages would be smaller and speedy to deploy 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My web.xml is like <web-app version=2.4 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> <display-name>sample</display-name> <servlet> <servlet-name>Sampleclass</servlet-name> <servlet-class>sample.SampleClass</servlet-class>
I'm deploying a .war in Webshepere AS 6.1 with this in web.xml : xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
The top of my web.xml file looks like this: <?xml version=1.0 encoding=UTF-8?> <web-app xmlns=http://java.sun.com/xml/ns/j2ee
I'm having the problem described here: http://groups.google.com/group/microsoft.public.xml.soap/browse_thread/thread/029ee5b5d4fa2440/0895d73c5c3720a1 I am consuming a Web Service using
In web.xml I have this <session-config> <session-timeout>2</session-timeout> </session-config> <listener> <listener-class>myapplication.SessionListener</listener-class> </listener> In the SessionListener.java
Say in my web.xml file, I define a servlet like so: <url-pattern>/MyURL/*</url-pattern> How do
Could you help to check why doFilter not getting called web.xml: <?xml version=1.0 encoding=UTF-8?>
in web.xml i set my welcome file to a jsp within web.xml <welcome-file>WEB-INF/index.jsp</welcome-file> inside
The web.xml Deployment Descriptor Elements in Oracle's BEA WebLogic Server 8.1 Documentation pretty much
We have the usual web.xml for our web application which includes some jsp and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.