tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhou peng" <zhoupe...@gmail.com>
Subject Re: Image tag lib doesn't work on Windows 2003 server?
Date Mon, 24 Sep 2007 15:58:37 GMT
Thanks a lot, Kirs.

I have tried your method, it still can't show image when use wan connected.
I have no idea about how to change the env so that the app can create and
write to "generated" or temp-dir, can you give me an examples for windows
2003 server.

I have checked our app, it can create chart png at tomcat\temp with
jfreechart, maybe we could change the env so that app can use it or
app\generated dir. I think both your method or our app could show correctly
because our server disable some user account or rights, so we can change
some env for the dir such as "generated" or "app", and can still safe? More
help, please!

Rick Zhou, 2007-9-24

2007/9/24, Kris Schneider <kris@directthought.com>:
>
> If you can't change the env so that the app can create and write to
> that directory, I think you can try this (some of the info can be
> found in the docs:
> http://jakarta.apache.org/taglibs/sandbox/doc/image-doc/index.html).
>
> Add the following to web.xml:
>
>   <context-param>
>     <param-name>ImageServletMapping</param-name>
>     <param-value>/gen-image</param-value>
>   </context-param>
>
>   <servlet>
>     <servlet-name>ImageServlet</servlet-name>
>     <servlet-class>org.apache.taglibs.image.ImageServlet</servlet-class>
>   </servlet>
>
>   <servlet-mapping>
>     <servlet-name>ImageServlet</servlet-name>
>     <url-pattern>/gen-image/*</url-pattern>
>   </servlet-mapping>
>
> Then remove the "dir" attribute from the image tags. For example, if
> you had this:
>
> <img:image
>         src="/images/splash.jpg"
>         dir="generated"
>         name="splash-new.jpg"
>         attributes="alt='A sample image'"
>         refresh="false"
>         quality="0.8">
> </img:image>
>
> Use this instead:
>
> <img:image
>         src="/images/splash.jpg"
>         name="splash-new.jpg"
>         attributes="alt='A sample image'"
>         refresh="false"
>         quality="0.8">
> </img:image>
>
> This should store images in a temp dir instead of the one specified by
> "dir". Hopefully, the app will be able to write to that dir...
>
> On 9/24/07, zhou peng <zhoupeng6@gmail.com> wrote:
> > Thanx for Kirs' advice.
> >
> > I have checked again, we use the same JDK and app server versions,
> there's
> > no exceptions in tomcat log, and images can show in localhost and lan
> env,
> > but just can't show in wan. I compared the directory between localhost,
> lan
> > and wan connection, and found that in wan couldn't create the
> "generated"
> > directory, I think it because of different rights between these env? Any
> > more advices?
> >
> > Rick Zhou, 2007-9-25
> >
> > 2007/9/24, Kris Schneider <kris@directthought.com>:
> > >
> > > Can you be more specific about what you mean by "doesn't work"? Do you
> > > get an exception? Have you tried running the JVM with
> > > "-Djava.awt.headless=true"? Are you using the same JDK and app server
> > > versions on both XP and Server 2003?
> > >
> > > On 9/23/07, zhou peng <zhoupeng6@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > We use taglibs-image, put all jar into web-inf\lib,  and show image
> > > > correctly on Windows XP, but when we deploy it to our Windows 2003
> > > Server,
> > > > it doesn't work, but also the example of taglibs-image example.war .
> > > Anyone
> > > > can give me some advice? Thanx.
> > > >
> > > > Rick Zhou, 2007-9-24
> > >
> > > --
> > > Kris Schneider <mailto:kris@directThought.com>
> > > directThought  <http://www.directThought.com/>
>
> --
> Kris Schneider <mailto:kris@directThought.com>
> directThought  <http://www.directThought.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message