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

  • SEARCH
  • Home
  • 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 6902223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:46:16+00:00 2026-05-27T07:46:16+00:00

In production I have setup an external folder to upload and display images from

  • 0

In production I have setup an external folder to upload and display
images from by editing server.xml:

<Service name="Catalina">

   <Connector port="80" protocol="HTTP/1.1"
             connectionTimeout="20000"
             URIEncoding="UTF-8"
             redirectPort="443" />

   <Engine name="Catalina" defaultHost="localhost">

     <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
        resourceName="UserDatabase"/>

     <Host name="localhost"  appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

       <Context docBase="/opt/winmail_storage/imgs" path="/imgs"/>

     </Host>
   </Engine>
 </Service>

I am trying to do the same thing in development by editing _Events.groovy :

eventConfigureTomcat = {tomcat ->
       def ctx = tomcat.addContext("/imgs" , "/tmp/images")
}

I also tried

eventConfigureTomcat = {tomcat ->
       def ctx = tomcat.addContext("/appName/imgs" , "/tmp/images")
}

this is not working, the imgs directory is not accessible via :
http://host/appName/imgs any idea how I can do this correctly?

  • 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-27T07:46:17+00:00Added an answer on May 27, 2026 at 7:46 am

    finally got it thanks to the grails mailing list:

    eventConfigureTomcat = {tomcat ->
    
    def context = tomcat.addWebapp('/acrm/imgs' , '/tmp/images')
    def loader = new WebappLoader(tomcat.class.classLoader)
    loader.addRepository(new File('/home/mohadib/workspace/acrm/lib').toURI().toURL().toString())
    loader.container = context
    context.loader = loader
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ELMAH setup on my production server and it has done a fantastic
I have a production system that uses ActiveMQ (5.3.2) to send messages from server
As most production environments we have setup something to send us a notification if
We have a setup where most code, before being promoted to full production, is
We have a production web and database server with SQL Server 2000. (However, a
I have a production server running with the following flag: - XX:+HeapDumpOnOutOfMemoryError Last night
We have a production SQL Server 2005 database server with the production version of
We currently have in production SQL Server 2005 and we use it's full text
I'm building an Adobe Air app that needs to load external images from different
We're designing data import from an external source like MAS200 into our production SQL

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.