You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by peter snauwaert <pe...@tijd.com> on 2004/05/07 16:55:36 UTC

beginner... problem displaying images

Hi list,

Having a problem with a tdk example.
The gif that's supposed to show up in the upper right
corner isn't being displayed...
This is what's found in the DefaultTop.vm in
/app/templates/app/navigations dir
<img src="$ui.image($ui.logo)">
When I check my document source it transforms this
into the correct url for the image, but it isn't being
displayed. I copied different files, with different
permissions, different file formats, checked the
permissions to the path to it, got rid of symbolic
links, to no avail. 
Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1

This is what is being logged.
[DEBUG] ServerData -
-setScriptName(resources/ui/skins/default/images/logo.gif)
[DEBUG] BaseURI - -No Response Object!
[DEBUG] BaseURI - -encodeResponse(): 
http://localhost:8080/app/resources/ui/skins/default/images/logo.gif

Does anyone know what the problem is?

thx,
peter

Re: beginner... problem displaying images

Posted by pe...@tijd.com.
On Monday 10 May 2004 10:42, Henning P. Schmiedehausen wrote:
> peter snauwaert <pe...@tijd.com> writes:
> >Hi David, thanks for the suggestions. The other post was also coming from
> > me, though it took about four days to arrive in the list, don't know why.
>
> Because you haven't been subscribed to the list with the address you've
> posted from and it was held for approval.
>
> And I don't scan my approval mail box every day. ;-)
 --Shame on you!--
        :°)

Sorry didn't know how this works.

>
> 	Regards
> 		Henning

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
peter snauwaert <pe...@tijd.com> writes:

>Hi David, thanks for the suggestions. The other post was also coming from me, 
>though it took about four days to arrive in the list, don't know why.

Because you haven't been subscribed to the list with the address you've posted from and it was held for approval.

And I don't scan my approval mail box every day. ;-)

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Au�erdem k�nnen in Deutschland alle Englisch. [...] so entf�llt die
Notwendigkeit [...] Deutsch zu lernen." 
            -- Johan Micoud auf die Frage warum er kein Deutsch spricht.
                   (http://www.spiegel.de/spiegel/0,1518,273205,00.html)

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: beginner... problem displaying images

Posted by Jeffery Painter <pa...@kiasoft.com>.
and yet another way :)

you can place an index.html file in your resource directories, and that 
will load instead of a directory listing.

 Jeff Painter



On Tue, 11 May 2004, David Demner wrote:

> Hi Peter,
> 
> There are a couple of ways to do this:
> 
> ---------------
> In Tomcat's web.xml there is a listings entry, which you can set to false.
> This will disable all directory listings for all webapps.
> 
>     <init-param>
>       <param-name>listings</param-name>
>       <param-value>false</param-value>
>     </init-param>
> --------------
> In the application's web.xml you can specify a security-constraint item:
> 
>   <security-constraint>
>     <web-resource-collection>
>       <web-resource-name>templates</web-resource-name>
>       <url-pattern>/templates/*</url-pattern>
>     </web-resource-collection>
>     <web-resource-collection>
>       <web-resource-name>logs</web-resource-name>
>       <url-pattern>/logs/*</url-pattern>
>     </web-resource-collection>
>     <web-resource-collection>
>       <web-resource-name>resources</web-resource-name>
>       <url-pattern>/resources/*</url-pattern>
>     </web-resource-collection>
>     <auth-constraint>
>       <role-name>admin</role-name>
>     </auth-constraint>
>   </security-constraint>
> 
> Which will then prompt for a username and password (defined in
> tomcat-users.xml) when someone tries to access the directory listing.  Only
> after the user is authenticated will it show the directory listing.
> --------------
> 
> David

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: beginner... problem displaying images

Posted by David Demner <tu...@demner.com>.
Hi Peter,

There are a couple of ways to do this:

---------------
In Tomcat's web.xml there is a listings entry, which you can set to false.
This will disable all directory listings for all webapps.

    <init-param>
      <param-name>listings</param-name>
      <param-value>false</param-value>
    </init-param>
--------------
In the application's web.xml you can specify a security-constraint item:

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>templates</web-resource-name>
      <url-pattern>/templates/*</url-pattern>
    </web-resource-collection>
    <web-resource-collection>
      <web-resource-name>logs</web-resource-name>
      <url-pattern>/logs/*</url-pattern>
    </web-resource-collection>
    <web-resource-collection>
      <web-resource-name>resources</web-resource-name>
      <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>

Which will then prompt for a username and password (defined in
tomcat-users.xml) when someone tries to access the directory listing.  Only
after the user is authenticated will it show the directory listing.
--------------

David


-----Original Message-----
From: peter.snauwaert@tijd.com [mailto:peter.snauwaert@tijd.com] 
Sent: Tuesday May 11, 2004 7:58 AM
To: Turbine Users List
Subject: Re: beginner... problem displaying images


Mmm, so there are a milion ways to do this so it works and two ways it
doesn't 
and I happen to have found them... Damn I'm smart!
But serious...

What I did learn from this is that the /servlet/* is purely virtual and only

makes sure the servlet is being invoked when it finds it in the url, I just 
didn't get that before.
What I don't like now is that you can just 
browse  .../<deploy-location>/resources etc.
Is there a way to avoid that in the web.xml?

p

On Tuesday 11 May 2004 16:31, Henning P. Schmiedehausen wrote:
> "Martin Stolz" <ms...@mstsoft.com> writes:
> >Hi,
> >
> >i am not shure but you may also map only urls ending in .vm to your
> > servlet and bang, you dont need servlet in your url any more... It might
> > even be that way you can specify that all urls except .gif, .jpeg et
> > cetera will not go through your servlet and all the others will.
>
> Actually, you can do it even simpler:
>
> In my applications I use this web.xml:
>
> <web-app>
>   <servlet>
>     <servlet-name>turbine</servlet-name>
>     <servlet-class>org.apache.turbine.Turbine</servlet-class>
>     <init-param>
>       <param-name>properties</param-name>
>       <!-- This is relative to the docBase -->
>       <param-value>/WEB-INF/conf/turbine.properties</param-value>
>     </init-param>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>turbine</servlet-name>
>     <url-pattern>/app/*</url-pattern>
>   </servlet-mapping>
> </web-app>
>
> and now you can use
>
> http://your.server:port/<deploy-location>/app/turbine
>
> as the location of the Turbine servlet.
>
> 	Regards
> 		Henning
>
> >Regards,
> >martin
> >----- Original Message -----
> >From: <pe...@tijd.com>
> >To: "Turbine Users List" <tu...@jakarta.apache.org>
> >Sent: Tuesday, May 11, 2004 9:51 AM
> >Subject: Re: beginner... problem displaying images
> >
> >> Hi David,
> >>
> >> I found it I guess, thanks to you setting me on the right track.
> >> I previously had this in my web.xml under WEB-INF
> >> ...
> >>   <servlet-mapping>
> >>      <servlet-name>test</servlet-name>
> >>      <url-pattern>/*</url-pattern>
> >>   </servlet-mapping>
> >> ...
> >>
> >> Then everything worked, except the static stuff didn't get loaded,
> >
> >probably
> >
> >> because my servlet can't handle those. When I changed this to:
> >> ...
> >>   <servlet-mapping>
> >>      <servlet-name>test</servlet-name>
> >>      <url-pattern>/servlet/*</url-pattern>
> >>   </servlet-mapping>
> >> ...
> >>
> >> Everything is ok if I do it this way. I'd better read up on tomcat
> >> config
> >
> >I
> >
> >> guess. Why do you actually need the /servlet there, is it the servlet
> >> container specification that dictates it and why does it work at all
> >> with other mapping? I will have /servlet in each url now of course,
> >> which is a little ugly also.
> >> But hey! It works and I have been searching a while on this one.
> >>
> >> thanks David
> >>
> >> On Monday 10 May 2004 17:15, David Demner wrote:
> >> > Hi Peter,
> >> >
> >> > Sounds like a tomcat config problem.  Do you have any
> >> > redirects/rewrites that may prevent the browser from getting to the
> >> > image?  Is the image
> >
> >being
> >
> >> > looked for in the correct place (ie: Is the name of your webapp
> >> > 'app')? Can you get anything for a directory other than in
> >> > /app/servlet/app (ie create webapps/app/blah.txt and see if you can
> >> > access that via http://localhost:8080/app/blah.txt)?
> >> >
> >> > Did you change the Tomcat server.xml or just the web.xml?  Maybe post
> >
> >your
> >
> >> > web.xml here...?
> >> >
> >> > David
> >> >
> >> >
> >> > -----Original Message-----
> >> > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> >> > Sent: Monday May 10, 2004 1:07 AM
> >> > To: Turbine Users List
> >> > Subject: Re: beginner... problem displaying images
> >> >
> >> >
> >> > Hi David, thanks for the suggestions. The other post was also coming
> >
> >from
> >
> >> > me,
> >> > though it took about four days to arrive in the list, don't know why.
> >> >
> >> > No I don't get the image in my browser, not even if I first log in
and
> >
> >then
> >
> >> > paste the url in the browser. I do have the impression my css isn't
> >> > functional either. I've set my paragraph font to 24px which should be
> >> > visible
> >> > enough, but it isn't applied.
> >> > Another thing I noticed is that my image hasn't got :8080 in the
link,
> >> > which
> >> >
> >> > may be due to my tampering with several settings, because I seem to
> >> > remember
> >> >
> >> > it was there previously.
> >> > Anyway if I paste the image link in the DefaultTop.vm literally it
> >> > still doesn't display.
> >> > So I guess I just have found an extra problem: the css isn't applied
> >> > either. If I screw up the web.xml so that turbine isn't run and I
just
> >> > browse the directory structure I can click the image and it gets
> >
> >displayed.
> >
> >> > anybody any idea?
> >> >
> >> > thanks,
> >> > peter
> >> >
> >> > On Saturday 08 May 2004 15:35, David Demner wrote:
> >> > > Hi Peter,
> >> > >
> >> > > Do you get the image when you paste the URL into your browser?
Does
> >
> >your
> >
> >> > > CSS work properly (this uses a similar URL/retrieval technique)?
> >> > >
> >> > > Does a missing image icon display or does nothing (maybe you have
an
> >
> >HTML
> >
> >> > > comment that doesn't end where it should)?
> >> > >
> >> > > Just a few possibilities.
> >> > >
> >> > > Good luck,
> >> > >
> >> > > David
> >> > >
> >> > > -----Original Message-----
> >> > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> >> > > Sent: Friday May 7, 2004 7:56 AM
> >> > > To: turbine-user@jakarta.apache.org
> >> > > Subject: beginner... problem displaying images
> >> > >
> >> > >
> >> > > Hi list,
> >> > >
> >> > > Having a problem with a tdk example.
> >> > > The gif that's supposed to show up in the upper right
> >> > > corner isn't being displayed...
> >> > > This is what's found in the DefaultTop.vm in
> >> > > /app/templates/app/navigations dir
> >> > > <img src="$ui.image($ui.logo)">
> >> > > When I check my document source it transforms this
> >> > > into the correct url for the image, but it isn't being
> >> > > displayed. I copied different files, with different
> >> > > permissions, different file formats, checked the
> >> > > permissions to the path to it, got rid of symbolic
> >> > > links, to no avail.
> >> > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
> >> > >
> >> > > This is what is being logged.
> >> > > [DEBUG] ServerData -
> >> > > -setScriptName(resources/ui/skins/default/images/logo.gif)
> >> > > [DEBUG] BaseURI - -No Response Object!
> >> > > [DEBUG] BaseURI - -encodeResponse():
> >> > >
http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
> >> > >
> >> > > Does anyone know what the problem is?
> >> > >
> >> > > thx,
> >> > > peter
> >> > >
> >> > >
> >> > >
--------------------------------------------------------------------
> >> > >- To unsubscribe, e-mail:
turbine-user-unsubscribe@jakarta.apache.org
> >> > > For additional commands, e-mail:
> >> > > turbine-user-help@jakarta.apache.org
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by pe...@tijd.com.
Mmm, so there are a milion ways to do this so it works and two ways it doesn't 
and I happen to have found them... Damn I'm smart!
But serious...

What I did learn from this is that the /servlet/* is purely virtual and only 
makes sure the servlet is being invoked when it finds it in the url, I just 
didn't get that before.
What I don't like now is that you can just 
browse  .../<deploy-location>/resources etc.
Is there a way to avoid that in the web.xml?

p

On Tuesday 11 May 2004 16:31, Henning P. Schmiedehausen wrote:
> "Martin Stolz" <ms...@mstsoft.com> writes:
> >Hi,
> >
> >i am not shure but you may also map only urls ending in .vm to your
> > servlet and bang, you dont need servlet in your url any more... It might
> > even be that way you can specify that all urls except .gif, .jpeg et
> > cetera will not go through your servlet and all the others will.
>
> Actually, you can do it even simpler:
>
> In my applications I use this web.xml:
>
> <web-app>
>   <servlet>
>     <servlet-name>turbine</servlet-name>
>     <servlet-class>org.apache.turbine.Turbine</servlet-class>
>     <init-param>
>       <param-name>properties</param-name>
>       <!-- This is relative to the docBase -->
>       <param-value>/WEB-INF/conf/turbine.properties</param-value>
>     </init-param>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>turbine</servlet-name>
>     <url-pattern>/app/*</url-pattern>
>   </servlet-mapping>
> </web-app>
>
> and now you can use
>
> http://your.server:port/<deploy-location>/app/turbine
>
> as the location of the Turbine servlet.
>
> 	Regards
> 		Henning
>
> >Regards,
> >martin
> >----- Original Message -----
> >From: <pe...@tijd.com>
> >To: "Turbine Users List" <tu...@jakarta.apache.org>
> >Sent: Tuesday, May 11, 2004 9:51 AM
> >Subject: Re: beginner... problem displaying images
> >
> >> Hi David,
> >>
> >> I found it I guess, thanks to you setting me on the right track.
> >> I previously had this in my web.xml under WEB-INF
> >> ...
> >>   <servlet-mapping>
> >>      <servlet-name>test</servlet-name>
> >>      <url-pattern>/*</url-pattern>
> >>   </servlet-mapping>
> >> ...
> >>
> >> Then everything worked, except the static stuff didn't get loaded,
> >
> >probably
> >
> >> because my servlet can't handle those. When I changed this to:
> >> ...
> >>   <servlet-mapping>
> >>      <servlet-name>test</servlet-name>
> >>      <url-pattern>/servlet/*</url-pattern>
> >>   </servlet-mapping>
> >> ...
> >>
> >> Everything is ok if I do it this way. I'd better read up on tomcat
> >> config
> >
> >I
> >
> >> guess. Why do you actually need the /servlet there, is it the servlet
> >> container specification that dictates it and why does it work at all
> >> with other mapping? I will have /servlet in each url now of course,
> >> which is a little ugly also.
> >> But hey! It works and I have been searching a while on this one.
> >>
> >> thanks David
> >>
> >> On Monday 10 May 2004 17:15, David Demner wrote:
> >> > Hi Peter,
> >> >
> >> > Sounds like a tomcat config problem.  Do you have any
> >> > redirects/rewrites that may prevent the browser from getting to the
> >> > image?  Is the image
> >
> >being
> >
> >> > looked for in the correct place (ie: Is the name of your webapp
> >> > 'app')? Can you get anything for a directory other than in
> >> > /app/servlet/app (ie create webapps/app/blah.txt and see if you can
> >> > access that via http://localhost:8080/app/blah.txt)?
> >> >
> >> > Did you change the Tomcat server.xml or just the web.xml?  Maybe post
> >
> >your
> >
> >> > web.xml here...?
> >> >
> >> > David
> >> >
> >> >
> >> > -----Original Message-----
> >> > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> >> > Sent: Monday May 10, 2004 1:07 AM
> >> > To: Turbine Users List
> >> > Subject: Re: beginner... problem displaying images
> >> >
> >> >
> >> > Hi David, thanks for the suggestions. The other post was also coming
> >
> >from
> >
> >> > me,
> >> > though it took about four days to arrive in the list, don't know why.
> >> >
> >> > No I don't get the image in my browser, not even if I first log in and
> >
> >then
> >
> >> > paste the url in the browser. I do have the impression my css isn't
> >> > functional either. I've set my paragraph font to 24px which should be
> >> > visible
> >> > enough, but it isn't applied.
> >> > Another thing I noticed is that my image hasn't got :8080 in the link,
> >> > which
> >> >
> >> > may be due to my tampering with several settings, because I seem to
> >> > remember
> >> >
> >> > it was there previously.
> >> > Anyway if I paste the image link in the DefaultTop.vm literally it
> >> > still doesn't display.
> >> > So I guess I just have found an extra problem: the css isn't applied
> >> > either. If I screw up the web.xml so that turbine isn't run and I just
> >> > browse the directory structure I can click the image and it gets
> >
> >displayed.
> >
> >> > anybody any idea?
> >> >
> >> > thanks,
> >> > peter
> >> >
> >> > On Saturday 08 May 2004 15:35, David Demner wrote:
> >> > > Hi Peter,
> >> > >
> >> > > Do you get the image when you paste the URL into your browser?  Does
> >
> >your
> >
> >> > > CSS work properly (this uses a similar URL/retrieval technique)?
> >> > >
> >> > > Does a missing image icon display or does nothing (maybe you have an
> >
> >HTML
> >
> >> > > comment that doesn't end where it should)?
> >> > >
> >> > > Just a few possibilities.
> >> > >
> >> > > Good luck,
> >> > >
> >> > > David
> >> > >
> >> > > -----Original Message-----
> >> > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> >> > > Sent: Friday May 7, 2004 7:56 AM
> >> > > To: turbine-user@jakarta.apache.org
> >> > > Subject: beginner... problem displaying images
> >> > >
> >> > >
> >> > > Hi list,
> >> > >
> >> > > Having a problem with a tdk example.
> >> > > The gif that's supposed to show up in the upper right
> >> > > corner isn't being displayed...
> >> > > This is what's found in the DefaultTop.vm in
> >> > > /app/templates/app/navigations dir
> >> > > <img src="$ui.image($ui.logo)">
> >> > > When I check my document source it transforms this
> >> > > into the correct url for the image, but it isn't being
> >> > > displayed. I copied different files, with different
> >> > > permissions, different file formats, checked the
> >> > > permissions to the path to it, got rid of symbolic
> >> > > links, to no avail.
> >> > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
> >> > >
> >> > > This is what is being logged.
> >> > > [DEBUG] ServerData -
> >> > > -setScriptName(resources/ui/skins/default/images/logo.gif)
> >> > > [DEBUG] BaseURI - -No Response Object!
> >> > > [DEBUG] BaseURI - -encodeResponse():
> >> > > http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
> >> > >
> >> > > Does anyone know what the problem is?
> >> > >
> >> > > thx,
> >> > > peter
> >> > >
> >> > >
> >> > > --------------------------------------------------------------------
> >> > >- To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> > > For additional commands, e-mail:
> >> > > turbine-user-help@jakarta.apache.org
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
I scribbled:

>and now you can use

>http://your.server:port/<deploy-location>/app/turbine

That's of course bull. It should be:

>http://your.server:port/<deploy-location>/app

without the "turbine" in the end.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Au�erdem k�nnen in Deutschland alle Englisch. [...] so entf�llt die
Notwendigkeit [...] Deutsch zu lernen." 
            -- Johan Micoud auf die Frage warum er kein Deutsch spricht.
                   (http://www.spiegel.de/spiegel/0,1518,273205,00.html)

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Martin Stolz" <ms...@mstsoft.com> writes:

>Hi,

>i am not shure but you may also map only urls ending in .vm to your servlet
>and bang, you dont need servlet in your url any more... It might even be
>that way you can specify that all urls except .gif, .jpeg et cetera will not
>go through your servlet and all the others will.

Actually, you can do it even simpler:

In my applications I use this web.xml:

<web-app>
  <servlet>
    <servlet-name>turbine</servlet-name>
    <servlet-class>org.apache.turbine.Turbine</servlet-class>
    <init-param>
      <param-name>properties</param-name>
      <!-- This is relative to the docBase -->
      <param-value>/WEB-INF/conf/turbine.properties</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>turbine</servlet-name>
    <url-pattern>/app/*</url-pattern>
  </servlet-mapping>
</web-app>

and now you can use

http://your.server:port/<deploy-location>/app/turbine

as the location of the Turbine servlet.

	Regards
		Henning



>Regards,
>martin
>----- Original Message ----- 
>From: <pe...@tijd.com>
>To: "Turbine Users List" <tu...@jakarta.apache.org>
>Sent: Tuesday, May 11, 2004 9:51 AM
>Subject: Re: beginner... problem displaying images


>> Hi David,
>>
>> I found it I guess, thanks to you setting me on the right track.
>> I previously had this in my web.xml under WEB-INF
>> ...
>>   <servlet-mapping>
>>      <servlet-name>test</servlet-name>
>>      <url-pattern>/*</url-pattern>
>>   </servlet-mapping>
>> ...
>>
>> Then everything worked, except the static stuff didn't get loaded,
>probably
>> because my servlet can't handle those. When I changed this to:
>> ...
>>   <servlet-mapping>
>>      <servlet-name>test</servlet-name>
>>      <url-pattern>/servlet/*</url-pattern>
>>   </servlet-mapping>
>> ...
>>
>> Everything is ok if I do it this way. I'd better read up on tomcat config
>I
>> guess. Why do you actually need the /servlet there, is it the servlet
>> container specification that dictates it and why does it work at all with
>> other mapping? I will have /servlet in each url now of course, which is a
>> little ugly also.
>> But hey! It works and I have been searching a while on this one.
>>
>> thanks David
>>
>> On Monday 10 May 2004 17:15, David Demner wrote:
>> > Hi Peter,
>> >
>> > Sounds like a tomcat config problem.  Do you have any redirects/rewrites
>> > that may prevent the browser from getting to the image?  Is the image
>being
>> > looked for in the correct place (ie: Is the name of your webapp 'app')?
>> > Can you get anything for a directory other than in /app/servlet/app (ie
>> > create webapps/app/blah.txt and see if you can access that via
>> > http://localhost:8080/app/blah.txt)?
>> >
>> > Did you change the Tomcat server.xml or just the web.xml?  Maybe post
>your
>> > web.xml here...?
>> >
>> > David
>> >
>> >
>> > -----Original Message-----
>> > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
>> > Sent: Monday May 10, 2004 1:07 AM
>> > To: Turbine Users List
>> > Subject: Re: beginner... problem displaying images
>> >
>> >
>> > Hi David, thanks for the suggestions. The other post was also coming
>from
>> > me,
>> > though it took about four days to arrive in the list, don't know why.
>> >
>> > No I don't get the image in my browser, not even if I first log in and
>then
>> > paste the url in the browser. I do have the impression my css isn't
>> > functional either. I've set my paragraph font to 24px which should be
>> > visible
>> > enough, but it isn't applied.
>> > Another thing I noticed is that my image hasn't got :8080 in the link,
>> > which
>> >
>> > may be due to my tampering with several settings, because I seem to
>> > remember
>> >
>> > it was there previously.
>> > Anyway if I paste the image link in the DefaultTop.vm literally it still
>> > doesn't display.
>> > So I guess I just have found an extra problem: the css isn't applied
>> > either. If I screw up the web.xml so that turbine isn't run and I just
>> > browse the directory structure I can click the image and it gets
>displayed.
>> >
>> > anybody any idea?
>> >
>> > thanks,
>> > peter
>> >
>> > On Saturday 08 May 2004 15:35, David Demner wrote:
>> > > Hi Peter,
>> > >
>> > > Do you get the image when you paste the URL into your browser?  Does
>your
>> > > CSS work properly (this uses a similar URL/retrieval technique)?
>> > >
>> > > Does a missing image icon display or does nothing (maybe you have an
>HTML
>> > > comment that doesn't end where it should)?
>> > >
>> > > Just a few possibilities.
>> > >
>> > > Good luck,
>> > >
>> > > David
>> > >
>> > > -----Original Message-----
>> > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
>> > > Sent: Friday May 7, 2004 7:56 AM
>> > > To: turbine-user@jakarta.apache.org
>> > > Subject: beginner... problem displaying images
>> > >
>> > >
>> > > Hi list,
>> > >
>> > > Having a problem with a tdk example.
>> > > The gif that's supposed to show up in the upper right
>> > > corner isn't being displayed...
>> > > This is what's found in the DefaultTop.vm in
>> > > /app/templates/app/navigations dir
>> > > <img src="$ui.image($ui.logo)">
>> > > When I check my document source it transforms this
>> > > into the correct url for the image, but it isn't being
>> > > displayed. I copied different files, with different
>> > > permissions, different file formats, checked the
>> > > permissions to the path to it, got rid of symbolic
>> > > links, to no avail.
>> > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
>> > >
>> > > This is what is being logged.
>> > > [DEBUG] ServerData -
>> > > -setScriptName(resources/ui/skins/default/images/logo.gif)
>> > > [DEBUG] BaseURI - -No Response Object!
>> > > [DEBUG] BaseURI - -encodeResponse():
>> > > http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
>> > >
>> > > Does anyone know what the problem is?
>> > >
>> > > thx,
>> > > peter
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>>



>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Au�erdem k�nnen in Deutschland alle Englisch. [...] so entf�llt die
Notwendigkeit [...] Deutsch zu lernen." 
            -- Johan Micoud auf die Frage warum er kein Deutsch spricht.
                   (http://www.spiegel.de/spiegel/0,1518,273205,00.html)

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by Martin Stolz <ms...@mstsoft.com>.
Hi Peter,

as i wrote back to you i only recalled what i had in memory...

First, for a simple but in my opinion good description of the url-pattern
syntax have a look at:

http://www.roguewave.com/support/docs/leif/leif/html/bobcatug/7-3.html

That leads to the possible Answers for the Question, how to load images and
make the URL´s short. The problem is, you have to map specific urls to your
servlet, Turbine in this case. You want to exclude static resources, of
course. The description above tells clearly, you can only match simple URL
Patterns. It would be nice to match against Regular Expressions (sth. like
/.*?[.]vm.*/ would do the trick, maybe hack sth the like in your Tomcat ;-)
but that is no immediate Solution.

In my opinion the solution is fiddling around with the matching algorithm of
the Servlet Container and the url-patterns. You could do like this:

<url-pattern>/resources/*</url-pattern>

map to a dummy Servlet that just opens the requested File and writes it back
to the browser.

<url-pattern>/*</url-pattern>

maps to the Serlvet of Turbine itself. "Since the container prefers to match
the longest pattern", the first one will succeed for all of your Images, CSS
and stuff thelike whereever the URL is invisible to the user (embedded in
HTML) and all other URLs map transparently to your servlet.

I think i have once seen such a solution, but there are several things to
note:

- I am not sure if this is a major performance drawback. In fact i don´t
think so but you will have to compare...

- You would not want your system security be that easy to break like
/resources/../../conf/server.xml ... so the dummy Servlet has to check.

- I thought there were more possibilities in the url-pattern syntax, but
there are none. In fact, i would love a more understandable and flexible
approach for mapping servlets in servlet containers. How much time i spent
until that d$#m Web.xml file worked...

- This is a hack. Please report any better solutions.

Maybe this helps.

Have a nice day!
martin

----- Original Message ----- 
From: <pe...@tijd.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Tuesday, May 11, 2004 11:50 AM
Subject: Re: beginner... problem displaying images


> Hi Martin,
>
> How would you do that? I had tried doing it before by mapping /*.vm, but
then
> it probably would only look into the root directory of the webapp, so I
> changed it again. I tried *.vm just now, without the leading "/" and that
> doesn't really work either. Only when you really hit a vm file does the
> servlet fire, but then the actions don't get executed since a lot of those
> url's don't end in vm. This probably could be solved by adding a lot of
extra
> mappings I suppose.
> Also all urls except .gif ... would interest me. I was already wondering
what
> is possible as <url-pattern>. Ok I found it in the servlet 2.4
specification,
> but I still don't see how I would go about excluding gifs etc.
>
>
> thx,
> peter
>
>
> On Tuesday 11 May 2004 10:43, Martin Stolz wrote:
> > Hi,
> >
> > i am not shure but you may also map only urls ending in .vm to your
servlet
> > and bang, you dont need servlet in your url any more... It might even be
> > that way you can specify that all urls except .gif, .jpeg et cetera will
> > not go through your servlet and all the others will.
> >
> > Regards,
> > martin
> > ----- Original Message -----
> > From: <pe...@tijd.com>
> > To: "Turbine Users List" <tu...@jakarta.apache.org>
> > Sent: Tuesday, May 11, 2004 9:51 AM
> > Subject: Re: beginner... problem displaying images
> >
> > > Hi David,
> > >
> > > I found it I guess, thanks to you setting me on the right track.
> > > I previously had this in my web.xml under WEB-INF
> > > ...
> > >   <servlet-mapping>
> > >      <servlet-name>test</servlet-name>
> > >      <url-pattern>/*</url-pattern>
> > >   </servlet-mapping>
> > > ...
> > >
> > > Then everything worked, except the static stuff didn't get loaded,
> >
> > probably
> >
> > > because my servlet can't handle those. When I changed this to:
> > > ...
> > >   <servlet-mapping>
> > >      <servlet-name>test</servlet-name>
> > >      <url-pattern>/servlet/*</url-pattern>
> > >   </servlet-mapping>
> > > ...
> > >
> > > Everything is ok if I do it this way. I'd better read up on tomcat
config
> >
> > I
> >
> > > guess. Why do you actually need the /servlet there, is it the servlet
> > > container specification that dictates it and why does it work at all
with
> > > other mapping? I will have /servlet in each url now of course, which
is a
> > > little ugly also.
> > > But hey! It works and I have been searching a while on this one.
> > >
> > > thanks David
> > >
> > > On Monday 10 May 2004 17:15, David Demner wrote:
> > > > Hi Peter,
> > > >
> > > > Sounds like a tomcat config problem.  Do you have any
> > > > redirects/rewrites that may prevent the browser from getting to the
> > > > image?  Is the image
> >
> > being
> >
> > > > looked for in the correct place (ie: Is the name of your webapp
'app')?
> > > > Can you get anything for a directory other than in /app/servlet/app
(ie
> > > > create webapps/app/blah.txt and see if you can access that via
> > > > http://localhost:8080/app/blah.txt)?
> > > >
> > > > Did you change the Tomcat server.xml or just the web.xml?  Maybe
post
> >
> > your
> >
> > > > web.xml here...?
> > > >
> > > > David
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > > > Sent: Monday May 10, 2004 1:07 AM
> > > > To: Turbine Users List
> > > > Subject: Re: beginner... problem displaying images
> > > >
> > > >
> > > > Hi David, thanks for the suggestions. The other post was also coming
> >
> > from
> >
> > > > me,
> > > > though it took about four days to arrive in the list, don't know
why.
> > > >
> > > > No I don't get the image in my browser, not even if I first log in
and
> >
> > then
> >
> > > > paste the url in the browser. I do have the impression my css isn't
> > > > functional either. I've set my paragraph font to 24px which should
be
> > > > visible
> > > > enough, but it isn't applied.
> > > > Another thing I noticed is that my image hasn't got :8080 in the
link,
> > > > which
> > > >
> > > > may be due to my tampering with several settings, because I seem to
> > > > remember
> > > >
> > > > it was there previously.
> > > > Anyway if I paste the image link in the DefaultTop.vm literally it
> > > > still doesn't display.
> > > > So I guess I just have found an extra problem: the css isn't applied
> > > > either. If I screw up the web.xml so that turbine isn't run and I
just
> > > > browse the directory structure I can click the image and it gets
> >
> > displayed.
> >
> > > > anybody any idea?
> > > >
> > > > thanks,
> > > > peter
> > > >
> > > > On Saturday 08 May 2004 15:35, David Demner wrote:
> > > > > Hi Peter,
> > > > >
> > > > > Do you get the image when you paste the URL into your browser?
Does
> >
> > your
> >
> > > > > CSS work properly (this uses a similar URL/retrieval technique)?
> > > > >
> > > > > Does a missing image icon display or does nothing (maybe you have
an
> >
> > HTML
> >
> > > > > comment that doesn't end where it should)?
> > > > >
> > > > > Just a few possibilities.
> > > > >
> > > > > Good luck,
> > > > >
> > > > > David
> > > > >
> > > > > -----Original Message-----
> > > > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > > > > Sent: Friday May 7, 2004 7:56 AM
> > > > > To: turbine-user@jakarta.apache.org
> > > > > Subject: beginner... problem displaying images
> > > > >
> > > > >
> > > > > Hi list,
> > > > >
> > > > > Having a problem with a tdk example.
> > > > > The gif that's supposed to show up in the upper right
> > > > > corner isn't being displayed...
> > > > > This is what's found in the DefaultTop.vm in
> > > > > /app/templates/app/navigations dir
> > > > > <img src="$ui.image($ui.logo)">
> > > > > When I check my document source it transforms this
> > > > > into the correct url for the image, but it isn't being
> > > > > displayed. I copied different files, with different
> > > > > permissions, different file formats, checked the
> > > > > permissions to the path to it, got rid of symbolic
> > > > > links, to no avail.
> > > > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
> > > > >
> > > > > This is what is being logged.
> > > > > [DEBUG] ServerData -
> > > > > -setScriptName(resources/ui/skins/default/images/logo.gif)
> > > > > [DEBUG] BaseURI - -No Response Object!
> > > > > [DEBUG] BaseURI - -encodeResponse():
> > > > >
http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
> > > > >
> > > > > Does anyone know what the problem is?
> > > > >
> > > > > thx,
> > > > > peter
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
turbine-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
turbine-user-help@jakarta.apache.org
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
turbine-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
turbine-user-help@jakarta.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
peter.snauwaert@tijd.com writes:

Folks,

don't map your application root onto the Turbine servlet. You want
your container to serve other pages like css or images _not_ through
the Turbine servlet but directly.

And please, don't ever think, that turbine URIs somehow all end on
".vm". The ...vm is just part of a parameter and it would be all
accidential if it is alwasy in the end.

You want to map one specific location onto the Turbine servlet.

	Regards
		Henning


>Hi Martin,

>How would you do that? I had tried doing it before by mapping /*.vm, but then 
>it probably would only look into the root directory of the webapp, so I 
>changed it again. I tried *.vm just now, without the leading "/" and that 
>doesn't really work either. Only when you really hit a vm file does the 
>servlet fire, but then the actions don't get executed since a lot of those 
>url's don't end in vm. This probably could be solved by adding a lot of extra 
>mappings I suppose.
>Also all urls except .gif ... would interest me. I was already wondering what 
>is possible as <url-pattern>. Ok I found it in the servlet 2.4 specification, 
>but I still don't see how I would go about excluding gifs etc.


>thx,
>peter


>On Tuesday 11 May 2004 10:43, Martin Stolz wrote:
>> Hi,
>>
>> i am not shure but you may also map only urls ending in .vm to your servlet
>> and bang, you dont need servlet in your url any more... It might even be
>> that way you can specify that all urls except .gif, .jpeg et cetera will
>> not go through your servlet and all the others will.
>>
>> Regards,
>> martin
>> ----- Original Message -----
>> From: <pe...@tijd.com>
>> To: "Turbine Users List" <tu...@jakarta.apache.org>
>> Sent: Tuesday, May 11, 2004 9:51 AM
>> Subject: Re: beginner... problem displaying images
>>
>> > Hi David,
>> >
>> > I found it I guess, thanks to you setting me on the right track.
>> > I previously had this in my web.xml under WEB-INF
>> > ...
>> >   <servlet-mapping>
>> >      <servlet-name>test</servlet-name>
>> >      <url-pattern>/*</url-pattern>
>> >   </servlet-mapping>
>> > ...
>> >
>> > Then everything worked, except the static stuff didn't get loaded,
>>
>> probably
>>
>> > because my servlet can't handle those. When I changed this to:
>> > ...
>> >   <servlet-mapping>
>> >      <servlet-name>test</servlet-name>
>> >      <url-pattern>/servlet/*</url-pattern>
>> >   </servlet-mapping>
>> > ...
>> >
>> > Everything is ok if I do it this way. I'd better read up on tomcat config
>>
>> I
>>
>> > guess. Why do you actually need the /servlet there, is it the servlet
>> > container specification that dictates it and why does it work at all with
>> > other mapping? I will have /servlet in each url now of course, which is a
>> > little ugly also.
>> > But hey! It works and I have been searching a while on this one.
>> >
>> > thanks David
>> >
>> > On Monday 10 May 2004 17:15, David Demner wrote:
>> > > Hi Peter,
>> > >
>> > > Sounds like a tomcat config problem.  Do you have any
>> > > redirects/rewrites that may prevent the browser from getting to the
>> > > image?  Is the image
>>
>> being
>>
>> > > looked for in the correct place (ie: Is the name of your webapp 'app')?
>> > > Can you get anything for a directory other than in /app/servlet/app (ie
>> > > create webapps/app/blah.txt and see if you can access that via
>> > > http://localhost:8080/app/blah.txt)?
>> > >
>> > > Did you change the Tomcat server.xml or just the web.xml?  Maybe post
>>
>> your
>>
>> > > web.xml here...?
>> > >
>> > > David
>> > >
>> > >
>> > > -----Original Message-----
>> > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
>> > > Sent: Monday May 10, 2004 1:07 AM
>> > > To: Turbine Users List
>> > > Subject: Re: beginner... problem displaying images
>> > >
>> > >
>> > > Hi David, thanks for the suggestions. The other post was also coming
>>
>> from
>>
>> > > me,
>> > > though it took about four days to arrive in the list, don't know why.
>> > >
>> > > No I don't get the image in my browser, not even if I first log in and
>>
>> then
>>
>> > > paste the url in the browser. I do have the impression my css isn't
>> > > functional either. I've set my paragraph font to 24px which should be
>> > > visible
>> > > enough, but it isn't applied.
>> > > Another thing I noticed is that my image hasn't got :8080 in the link,
>> > > which
>> > >
>> > > may be due to my tampering with several settings, because I seem to
>> > > remember
>> > >
>> > > it was there previously.
>> > > Anyway if I paste the image link in the DefaultTop.vm literally it
>> > > still doesn't display.
>> > > So I guess I just have found an extra problem: the css isn't applied
>> > > either. If I screw up the web.xml so that turbine isn't run and I just
>> > > browse the directory structure I can click the image and it gets
>>
>> displayed.
>>
>> > > anybody any idea?
>> > >
>> > > thanks,
>> > > peter
>> > >
>> > > On Saturday 08 May 2004 15:35, David Demner wrote:
>> > > > Hi Peter,
>> > > >
>> > > > Do you get the image when you paste the URL into your browser?  Does
>>
>> your
>>
>> > > > CSS work properly (this uses a similar URL/retrieval technique)?
>> > > >
>> > > > Does a missing image icon display or does nothing (maybe you have an
>>
>> HTML
>>
>> > > > comment that doesn't end where it should)?
>> > > >
>> > > > Just a few possibilities.
>> > > >
>> > > > Good luck,
>> > > >
>> > > > David
>> > > >
>> > > > -----Original Message-----
>> > > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
>> > > > Sent: Friday May 7, 2004 7:56 AM
>> > > > To: turbine-user@jakarta.apache.org
>> > > > Subject: beginner... problem displaying images
>> > > >
>> > > >
>> > > > Hi list,
>> > > >
>> > > > Having a problem with a tdk example.
>> > > > The gif that's supposed to show up in the upper right
>> > > > corner isn't being displayed...
>> > > > This is what's found in the DefaultTop.vm in
>> > > > /app/templates/app/navigations dir
>> > > > <img src="$ui.image($ui.logo)">
>> > > > When I check my document source it transforms this
>> > > > into the correct url for the image, but it isn't being
>> > > > displayed. I copied different files, with different
>> > > > permissions, different file formats, checked the
>> > > > permissions to the path to it, got rid of symbolic
>> > > > links, to no avail.
>> > > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
>> > > >
>> > > > This is what is being logged.
>> > > > [DEBUG] ServerData -
>> > > > -setScriptName(resources/ui/skins/default/images/logo.gif)
>> > > > [DEBUG] BaseURI - -No Response Object!
>> > > > [DEBUG] BaseURI - -encodeResponse():
>> > > > http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
>> > > >
>> > > > Does anyone know what the problem is?
>> > > >
>> > > > thx,
>> > > > peter
>> > > >
>> > > >
>> > > > ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Au�erdem k�nnen in Deutschland alle Englisch. [...] so entf�llt die
Notwendigkeit [...] Deutsch zu lernen." 
            -- Johan Micoud auf die Frage warum er kein Deutsch spricht.
                   (http://www.spiegel.de/spiegel/0,1518,273205,00.html)

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by pe...@tijd.com.
Hi Martin,

How would you do that? I had tried doing it before by mapping /*.vm, but then 
it probably would only look into the root directory of the webapp, so I 
changed it again. I tried *.vm just now, without the leading "/" and that 
doesn't really work either. Only when you really hit a vm file does the 
servlet fire, but then the actions don't get executed since a lot of those 
url's don't end in vm. This probably could be solved by adding a lot of extra 
mappings I suppose.
Also all urls except .gif ... would interest me. I was already wondering what 
is possible as <url-pattern>. Ok I found it in the servlet 2.4 specification, 
but I still don't see how I would go about excluding gifs etc.


thx,
peter


On Tuesday 11 May 2004 10:43, Martin Stolz wrote:
> Hi,
>
> i am not shure but you may also map only urls ending in .vm to your servlet
> and bang, you dont need servlet in your url any more... It might even be
> that way you can specify that all urls except .gif, .jpeg et cetera will
> not go through your servlet and all the others will.
>
> Regards,
> martin
> ----- Original Message -----
> From: <pe...@tijd.com>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Tuesday, May 11, 2004 9:51 AM
> Subject: Re: beginner... problem displaying images
>
> > Hi David,
> >
> > I found it I guess, thanks to you setting me on the right track.
> > I previously had this in my web.xml under WEB-INF
> > ...
> >   <servlet-mapping>
> >      <servlet-name>test</servlet-name>
> >      <url-pattern>/*</url-pattern>
> >   </servlet-mapping>
> > ...
> >
> > Then everything worked, except the static stuff didn't get loaded,
>
> probably
>
> > because my servlet can't handle those. When I changed this to:
> > ...
> >   <servlet-mapping>
> >      <servlet-name>test</servlet-name>
> >      <url-pattern>/servlet/*</url-pattern>
> >   </servlet-mapping>
> > ...
> >
> > Everything is ok if I do it this way. I'd better read up on tomcat config
>
> I
>
> > guess. Why do you actually need the /servlet there, is it the servlet
> > container specification that dictates it and why does it work at all with
> > other mapping? I will have /servlet in each url now of course, which is a
> > little ugly also.
> > But hey! It works and I have been searching a while on this one.
> >
> > thanks David
> >
> > On Monday 10 May 2004 17:15, David Demner wrote:
> > > Hi Peter,
> > >
> > > Sounds like a tomcat config problem.  Do you have any
> > > redirects/rewrites that may prevent the browser from getting to the
> > > image?  Is the image
>
> being
>
> > > looked for in the correct place (ie: Is the name of your webapp 'app')?
> > > Can you get anything for a directory other than in /app/servlet/app (ie
> > > create webapps/app/blah.txt and see if you can access that via
> > > http://localhost:8080/app/blah.txt)?
> > >
> > > Did you change the Tomcat server.xml or just the web.xml?  Maybe post
>
> your
>
> > > web.xml here...?
> > >
> > > David
> > >
> > >
> > > -----Original Message-----
> > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > > Sent: Monday May 10, 2004 1:07 AM
> > > To: Turbine Users List
> > > Subject: Re: beginner... problem displaying images
> > >
> > >
> > > Hi David, thanks for the suggestions. The other post was also coming
>
> from
>
> > > me,
> > > though it took about four days to arrive in the list, don't know why.
> > >
> > > No I don't get the image in my browser, not even if I first log in and
>
> then
>
> > > paste the url in the browser. I do have the impression my css isn't
> > > functional either. I've set my paragraph font to 24px which should be
> > > visible
> > > enough, but it isn't applied.
> > > Another thing I noticed is that my image hasn't got :8080 in the link,
> > > which
> > >
> > > may be due to my tampering with several settings, because I seem to
> > > remember
> > >
> > > it was there previously.
> > > Anyway if I paste the image link in the DefaultTop.vm literally it
> > > still doesn't display.
> > > So I guess I just have found an extra problem: the css isn't applied
> > > either. If I screw up the web.xml so that turbine isn't run and I just
> > > browse the directory structure I can click the image and it gets
>
> displayed.
>
> > > anybody any idea?
> > >
> > > thanks,
> > > peter
> > >
> > > On Saturday 08 May 2004 15:35, David Demner wrote:
> > > > Hi Peter,
> > > >
> > > > Do you get the image when you paste the URL into your browser?  Does
>
> your
>
> > > > CSS work properly (this uses a similar URL/retrieval technique)?
> > > >
> > > > Does a missing image icon display or does nothing (maybe you have an
>
> HTML
>
> > > > comment that doesn't end where it should)?
> > > >
> > > > Just a few possibilities.
> > > >
> > > > Good luck,
> > > >
> > > > David
> > > >
> > > > -----Original Message-----
> > > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > > > Sent: Friday May 7, 2004 7:56 AM
> > > > To: turbine-user@jakarta.apache.org
> > > > Subject: beginner... problem displaying images
> > > >
> > > >
> > > > Hi list,
> > > >
> > > > Having a problem with a tdk example.
> > > > The gif that's supposed to show up in the upper right
> > > > corner isn't being displayed...
> > > > This is what's found in the DefaultTop.vm in
> > > > /app/templates/app/navigations dir
> > > > <img src="$ui.image($ui.logo)">
> > > > When I check my document source it transforms this
> > > > into the correct url for the image, but it isn't being
> > > > displayed. I copied different files, with different
> > > > permissions, different file formats, checked the
> > > > permissions to the path to it, got rid of symbolic
> > > > links, to no avail.
> > > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
> > > >
> > > > This is what is being logged.
> > > > [DEBUG] ServerData -
> > > > -setScriptName(resources/ui/skins/default/images/logo.gif)
> > > > [DEBUG] BaseURI - -No Response Object!
> > > > [DEBUG] BaseURI - -encodeResponse():
> > > > http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
> > > >
> > > > Does anyone know what the problem is?
> > > >
> > > > thx,
> > > > peter
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by Martin Stolz <ms...@mstsoft.com>.
Hi,

i am not shure but you may also map only urls ending in .vm to your servlet
and bang, you dont need servlet in your url any more... It might even be
that way you can specify that all urls except .gif, .jpeg et cetera will not
go through your servlet and all the others will.

Regards,
martin
----- Original Message ----- 
From: <pe...@tijd.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Tuesday, May 11, 2004 9:51 AM
Subject: Re: beginner... problem displaying images


> Hi David,
>
> I found it I guess, thanks to you setting me on the right track.
> I previously had this in my web.xml under WEB-INF
> ...
>   <servlet-mapping>
>      <servlet-name>test</servlet-name>
>      <url-pattern>/*</url-pattern>
>   </servlet-mapping>
> ...
>
> Then everything worked, except the static stuff didn't get loaded,
probably
> because my servlet can't handle those. When I changed this to:
> ...
>   <servlet-mapping>
>      <servlet-name>test</servlet-name>
>      <url-pattern>/servlet/*</url-pattern>
>   </servlet-mapping>
> ...
>
> Everything is ok if I do it this way. I'd better read up on tomcat config
I
> guess. Why do you actually need the /servlet there, is it the servlet
> container specification that dictates it and why does it work at all with
> other mapping? I will have /servlet in each url now of course, which is a
> little ugly also.
> But hey! It works and I have been searching a while on this one.
>
> thanks David
>
> On Monday 10 May 2004 17:15, David Demner wrote:
> > Hi Peter,
> >
> > Sounds like a tomcat config problem.  Do you have any redirects/rewrites
> > that may prevent the browser from getting to the image?  Is the image
being
> > looked for in the correct place (ie: Is the name of your webapp 'app')?
> > Can you get anything for a directory other than in /app/servlet/app (ie
> > create webapps/app/blah.txt and see if you can access that via
> > http://localhost:8080/app/blah.txt)?
> >
> > Did you change the Tomcat server.xml or just the web.xml?  Maybe post
your
> > web.xml here...?
> >
> > David
> >
> >
> > -----Original Message-----
> > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > Sent: Monday May 10, 2004 1:07 AM
> > To: Turbine Users List
> > Subject: Re: beginner... problem displaying images
> >
> >
> > Hi David, thanks for the suggestions. The other post was also coming
from
> > me,
> > though it took about four days to arrive in the list, don't know why.
> >
> > No I don't get the image in my browser, not even if I first log in and
then
> > paste the url in the browser. I do have the impression my css isn't
> > functional either. I've set my paragraph font to 24px which should be
> > visible
> > enough, but it isn't applied.
> > Another thing I noticed is that my image hasn't got :8080 in the link,
> > which
> >
> > may be due to my tampering with several settings, because I seem to
> > remember
> >
> > it was there previously.
> > Anyway if I paste the image link in the DefaultTop.vm literally it still
> > doesn't display.
> > So I guess I just have found an extra problem: the css isn't applied
> > either. If I screw up the web.xml so that turbine isn't run and I just
> > browse the directory structure I can click the image and it gets
displayed.
> >
> > anybody any idea?
> >
> > thanks,
> > peter
> >
> > On Saturday 08 May 2004 15:35, David Demner wrote:
> > > Hi Peter,
> > >
> > > Do you get the image when you paste the URL into your browser?  Does
your
> > > CSS work properly (this uses a similar URL/retrieval technique)?
> > >
> > > Does a missing image icon display or does nothing (maybe you have an
HTML
> > > comment that doesn't end where it should)?
> > >
> > > Just a few possibilities.
> > >
> > > Good luck,
> > >
> > > David
> > >
> > > -----Original Message-----
> > > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > > Sent: Friday May 7, 2004 7:56 AM
> > > To: turbine-user@jakarta.apache.org
> > > Subject: beginner... problem displaying images
> > >
> > >
> > > Hi list,
> > >
> > > Having a problem with a tdk example.
> > > The gif that's supposed to show up in the upper right
> > > corner isn't being displayed...
> > > This is what's found in the DefaultTop.vm in
> > > /app/templates/app/navigations dir
> > > <img src="$ui.image($ui.logo)">
> > > When I check my document source it transforms this
> > > into the correct url for the image, but it isn't being
> > > displayed. I copied different files, with different
> > > permissions, different file formats, checked the
> > > permissions to the path to it, got rid of symbolic
> > > links, to no avail.
> > > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
> > >
> > > This is what is being logged.
> > > [DEBUG] ServerData -
> > > -setScriptName(resources/ui/skins/default/images/logo.gif)
> > > [DEBUG] BaseURI - -No Response Object!
> > > [DEBUG] BaseURI - -encodeResponse():
> > > http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
> > >
> > > Does anyone know what the problem is?
> > >
> > > thx,
> > > peter
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by pe...@tijd.com.
Hi David,

I found it I guess, thanks to you setting me on the right track.
I previously had this in my web.xml under WEB-INF
...
  <servlet-mapping>
     <servlet-name>test</servlet-name>
     <url-pattern>/*</url-pattern>
  </servlet-mapping>
...

Then everything worked, except the static stuff didn't get loaded, probably 
because my servlet can't handle those. When I changed this to:
...
  <servlet-mapping>
     <servlet-name>test</servlet-name>
     <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
...

Everything is ok if I do it this way. I'd better read up on tomcat config I 
guess. Why do you actually need the /servlet there, is it the servlet 
container specification that dictates it and why does it work at all with 
other mapping? I will have /servlet in each url now of course, which is a 
little ugly also.
But hey! It works and I have been searching a while on this one. 

thanks David

On Monday 10 May 2004 17:15, David Demner wrote:
> Hi Peter,
>
> Sounds like a tomcat config problem.  Do you have any redirects/rewrites
> that may prevent the browser from getting to the image?  Is the image being
> looked for in the correct place (ie: Is the name of your webapp 'app')? 
> Can you get anything for a directory other than in /app/servlet/app (ie
> create webapps/app/blah.txt and see if you can access that via
> http://localhost:8080/app/blah.txt)?
>
> Did you change the Tomcat server.xml or just the web.xml?  Maybe post your
> web.xml here...?
>
> David
>
>
> -----Original Message-----
> From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> Sent: Monday May 10, 2004 1:07 AM
> To: Turbine Users List
> Subject: Re: beginner... problem displaying images
>
>
> Hi David, thanks for the suggestions. The other post was also coming from
> me,
> though it took about four days to arrive in the list, don't know why.
>
> No I don't get the image in my browser, not even if I first log in and then
> paste the url in the browser. I do have the impression my css isn't
> functional either. I've set my paragraph font to 24px which should be
> visible
> enough, but it isn't applied.
> Another thing I noticed is that my image hasn't got :8080 in the link,
> which
>
> may be due to my tampering with several settings, because I seem to
> remember
>
> it was there previously.
> Anyway if I paste the image link in the DefaultTop.vm literally it still
> doesn't display.
> So I guess I just have found an extra problem: the css isn't applied
> either. If I screw up the web.xml so that turbine isn't run and I just
> browse the directory structure I can click the image and it gets displayed.
>
> anybody any idea?
>
> thanks,
> peter
>
> On Saturday 08 May 2004 15:35, David Demner wrote:
> > Hi Peter,
> >
> > Do you get the image when you paste the URL into your browser?  Does your
> > CSS work properly (this uses a similar URL/retrieval technique)?
> >
> > Does a missing image icon display or does nothing (maybe you have an HTML
> > comment that doesn't end where it should)?
> >
> > Just a few possibilities.
> >
> > Good luck,
> >
> > David
> >
> > -----Original Message-----
> > From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> > Sent: Friday May 7, 2004 7:56 AM
> > To: turbine-user@jakarta.apache.org
> > Subject: beginner... problem displaying images
> >
> >
> > Hi list,
> >
> > Having a problem with a tdk example.
> > The gif that's supposed to show up in the upper right
> > corner isn't being displayed...
> > This is what's found in the DefaultTop.vm in
> > /app/templates/app/navigations dir
> > <img src="$ui.image($ui.logo)">
> > When I check my document source it transforms this
> > into the correct url for the image, but it isn't being
> > displayed. I copied different files, with different
> > permissions, different file formats, checked the
> > permissions to the path to it, got rid of symbolic
> > links, to no avail.
> > Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
> >
> > This is what is being logged.
> > [DEBUG] ServerData -
> > -setScriptName(resources/ui/skins/default/images/logo.gif)
> > [DEBUG] BaseURI - -No Response Object!
> > [DEBUG] BaseURI - -encodeResponse():
> > http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
> >
> > Does anyone know what the problem is?
> >
> > thx,
> > peter
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: beginner... problem displaying images

Posted by David Demner <tu...@demner.com>.
Hi Peter,

Sounds like a tomcat config problem.  Do you have any redirects/rewrites
that may prevent the browser from getting to the image?  Is the image being
looked for in the correct place (ie: Is the name of your webapp 'app')?  Can
you get anything for a directory other than in /app/servlet/app (ie create
webapps/app/blah.txt and see if you can access that via
http://localhost:8080/app/blah.txt)?

Did you change the Tomcat server.xml or just the web.xml?  Maybe post your
web.xml here...?

David


-----Original Message-----
From: peter snauwaert [mailto:peter.snauwaert@tijd.com] 
Sent: Monday May 10, 2004 1:07 AM
To: Turbine Users List
Subject: Re: beginner... problem displaying images


Hi David, thanks for the suggestions. The other post was also coming from
me, 
though it took about four days to arrive in the list, don't know why.

No I don't get the image in my browser, not even if I first log in and then 
paste the url in the browser. I do have the impression my css isn't 
functional either. I've set my paragraph font to 24px which should be
visible 
enough, but it isn't applied.
Another thing I noticed is that my image hasn't got :8080 in the link, which

may be due to my tampering with several settings, because I seem to remember

it was there previously. 
Anyway if I paste the image link in the DefaultTop.vm literally it still 
doesn't display.
So I guess I just have found an extra problem: the css isn't applied either.
If I screw up the web.xml so that turbine isn't run and I just browse the 
directory structure I can click the image and it gets displayed.

anybody any idea?

thanks,
peter


On Saturday 08 May 2004 15:35, David Demner wrote:
> Hi Peter,
>
> Do you get the image when you paste the URL into your browser?  Does your
> CSS work properly (this uses a similar URL/retrieval technique)?
>
> Does a missing image icon display or does nothing (maybe you have an HTML
> comment that doesn't end where it should)?
>
> Just a few possibilities.
>
> Good luck,
>
> David
>
> -----Original Message-----
> From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> Sent: Friday May 7, 2004 7:56 AM
> To: turbine-user@jakarta.apache.org
> Subject: beginner... problem displaying images
>
>
> Hi list,
>
> Having a problem with a tdk example.
> The gif that's supposed to show up in the upper right
> corner isn't being displayed...
> This is what's found in the DefaultTop.vm in
> /app/templates/app/navigations dir
> <img src="$ui.image($ui.logo)">
> When I check my document source it transforms this
> into the correct url for the image, but it isn't being
> displayed. I copied different files, with different
> permissions, different file formats, checked the
> permissions to the path to it, got rid of symbolic
> links, to no avail.
> Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
>
> This is what is being logged.
> [DEBUG] ServerData -
> -setScriptName(resources/ui/skins/default/images/logo.gif)
> [DEBUG] BaseURI - -No Response Object!
> [DEBUG] BaseURI - -encodeResponse():
> http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
>
> Does anyone know what the problem is?
>
> thx,
> peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: beginner... problem displaying images

Posted by peter snauwaert <pe...@tijd.com>.
Hi David, thanks for the suggestions. The other post was also coming from me, 
though it took about four days to arrive in the list, don't know why.

No I don't get the image in my browser, not even if I first log in and then 
paste the url in the browser. I do have the impression my css isn't 
functional either. I've set my paragraph font to 24px which should be visible 
enough, but it isn't applied.
Another thing I noticed is that my image hasn't got :8080 in the link, which 
may be due to my tampering with several settings, because I seem to remember 
it was there previously. 
Anyway if I paste the image link in the DefaultTop.vm literally it still 
doesn't display.
So I guess I just have found an extra problem: the css isn't applied either.
If I screw up the web.xml so that turbine isn't run and I just browse the 
directory structure I can click the image and it gets displayed.

anybody any idea?

thanks,
peter


On Saturday 08 May 2004 15:35, David Demner wrote:
> Hi Peter,
>
> Do you get the image when you paste the URL into your browser?  Does your
> CSS work properly (this uses a similar URL/retrieval technique)?
>
> Does a missing image icon display or does nothing (maybe you have an HTML
> comment that doesn't end where it should)?
>
> Just a few possibilities.
>
> Good luck,
>
> David
>
> -----Original Message-----
> From: peter snauwaert [mailto:peter.snauwaert@tijd.com]
> Sent: Friday May 7, 2004 7:56 AM
> To: turbine-user@jakarta.apache.org
> Subject: beginner... problem displaying images
>
>
> Hi list,
>
> Having a problem with a tdk example.
> The gif that's supposed to show up in the upper right
> corner isn't being displayed...
> This is what's found in the DefaultTop.vm in
> /app/templates/app/navigations dir
> <img src="$ui.image($ui.logo)">
> When I check my document source it transforms this
> into the correct url for the image, but it isn't being
> displayed. I copied different files, with different
> permissions, different file formats, checked the
> permissions to the path to it, got rid of symbolic
> links, to no avail.
> Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1
>
> This is what is being logged.
> [DEBUG] ServerData -
> -setScriptName(resources/ui/skins/default/images/logo.gif)
> [DEBUG] BaseURI - -No Response Object!
> [DEBUG] BaseURI - -encodeResponse():
> http://localhost:8080/app/resources/ui/skins/default/images/logo.gif
>
> Does anyone know what the problem is?
>
> thx,
> peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: beginner... problem displaying images

Posted by David Demner <tu...@demner.com>.
Hi Peter,

Do you get the image when you paste the URL into your browser?  Does your
CSS work properly (this uses a similar URL/retrieval technique)?

Does a missing image icon display or does nothing (maybe you have an HTML
comment that doesn't end where it should)?

Just a few possibilities.

Good luck,

David

-----Original Message-----
From: peter snauwaert [mailto:peter.snauwaert@tijd.com] 
Sent: Friday May 7, 2004 7:56 AM
To: turbine-user@jakarta.apache.org
Subject: beginner... problem displaying images


Hi list,

Having a problem with a tdk example.
The gif that's supposed to show up in the upper right
corner isn't being displayed...
This is what's found in the DefaultTop.vm in
/app/templates/app/navigations dir
<img src="$ui.image($ui.logo)">
When I check my document source it transforms this
into the correct url for the image, but it isn't being
displayed. I copied different files, with different
permissions, different file formats, checked the
permissions to the path to it, got rid of symbolic
links, to no avail. 
Tomcat is 5.0.19 / Turbine 2.3.1 / Velocity 1.3.1

This is what is being logged.
[DEBUG] ServerData -
-setScriptName(resources/ui/skins/default/images/logo.gif)
[DEBUG] BaseURI - -No Response Object!
[DEBUG] BaseURI - -encodeResponse(): 
http://localhost:8080/app/resources/ui/skins/default/images/logo.gif

Does anyone know what the problem is?

thx,
peter


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org