www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to direct "/" directory to site root, not domain root

  1. #1
    Join Date
    Aug 2009
    Posts
    1

    How to direct "/" directory to site root, not domain root

    This is a pretty straightforward question but I'm having trouble finding a solution.

    I have a domain and a site, company.com/site. In my webroot I have a folder called images, for example. When I do

    "/images/filename"

    this maps to

    company.com/images/filename

    but it needs to map to

    company.com/site/images/filename.

    I can't find any configuration tag to use in web.xml or something like that, and I'm coding in JSP. I'm using a Glassfish server. How can I fix this?

  2. #2
    Join Date
    Jun 2009
    Posts
    98
    Are you calling it? For example you can set it up in web.xml mapping:
    Code:
    <servlet-mapping>
         <servlet-name>ServletName</servlet-name>
         <url-pattern>/site/images/filename</url-pattern>
    </servlet-mapping>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles