Tomcat IMAGEPATH IMAGEURL

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Wed Apr 11 03:17:49 EDT 2007


Tomcat by itself does not provide a handy way of creating aliases for
directories outside the application root. You should use apache as a
frontend to tomcat (with the jk connector) and then define an alias
(http://httpd.apache.org/docs/2.0/mod/mod_alias.html#alias) to map
'c:/mapserver_temp' to the 'temp' subdirectory of the url.

You should consider the use of apache as a tomcat frontend anyway
because of many other features like load balancing, faster serving of
static data (css, images, etc), better security, ssl, etc

HTH,
Umberto


On 4/11/07, LITTLE Nelson <nelson.little at tenix.com> wrote:
> Dave,
>
> Thanks for your reply.
>
> Firstly I updated my map file such that it now reads:
>
> IMAGEPATH "/mapserver_temp/"
> IMAGEURL "temp"
>
> I am able to write the image (image_file.png) via the mapserver object
> to the IMAGEPATH location with no troubles. However, how do I display
> that resultant image file in a web page? I thought the image would be
> available via http://loalhost:8080/myapp/temp/image_file.png
>
> Can anyone offer some help?
>
> Cheers,
> Nelson
>
> -----Original Message-----
> From: Dave Potts [mailto:dave.potts at pinan.co.uk]
> Sent: Wednesday, 11 April 2007 2:09 PM
> To: LITTLE Nelson
> Subject: Re: [UMN_MAPSERVER-USERS] Tomcat IMAGEPATH IMAGEURL
>
> LITTLE Nelson wrote:
> > Hello,
> >
> > I am trying to create a servlet application to run on the Tomcat 5.5
> web
> > server. In my map file I have
> >
> > IMAGEPATH "c://mapserver_temp//"
> > IMAGEURL "temp"
> >
> > How does the image url know to point to the image path? I suppose I
> need
> > to create some kind of alias that maps "temp" to "c:/mapserver_temp"
> but
> > I don't know how to do this? Can anyone offer some help please?
> >
> > Thanks
> > Nelson
> >
> > Disclaimer :
> > The contents of this e-mail including any attachments are intended
> only
> > for the person or entity to which this e-mail is addressed.  If you
> are not,
> > or believe you may not be, the intended recipient, please advise the
> sender
> > immediately by return e-mail, delete this e-mail and destroy any
> copies.
> > Tenix does not warrant nor guarantee that this email communication is
> free
> > from errors, virus, interception or interference.
> >
> >
> When I ran mapserver and tomcat together on a mac platform,  I said
> things like
>
>
>   TEMPLATE ../WEB-INF/post_transform_directory/en-gb/mob_resources.xml
>   IMAGEPATH "../tmp/"
>   IMAGEURL "tmp/"
>   LOG "/tmp/map.out"
>
> I can't comment on the window platform to much, but I suspect that
> saying
>
> IMAGEPATH "c:\\mapserver_temp\\"
> IMAGEURL "temp"
> may help, or perhaps justing using \ instead.
>
> TO a java program a file seperator is / or \, but mapserver is a C
> program, so it may choose only to understand the \ character.
>
> D.
>
>
>
>
>
>
>
> Disclaimer :
> The contents of this e-mail including any attachments are intended only
> for the person or entity to which this e-mail is addressed.  If you are not,
> or believe you may not be, the intended recipient, please advise the sender
> immediately by return e-mail, delete this e-mail and destroy any copies.
> Tenix does not warrant nor guarantee that this email communication is free
> from errors, virus, interception or interference.
>



More information about the mapserver-users mailing list