You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Fabio Daprile <fa...@wuerth-phoenix.com> on 2002/11/04 11:49:30 UTC

Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Hello gentlemen,

we are currently trying to deploy a Turbine application with tomcat and 
Apache server.
Apache has a virtual host configured and uses the proxy module to 
connect to tomcat.

here the virtual host entry:

<VirtualHost www.mydomain.com <http://www.mydomain.com>>
    DocumentRoot /home/httpd/html/www.mydomain.com
    ProxyPass /strecke/servlet 
http://internal-host:8080/bugtrack/servlet 
<http://internal-host:8080/strecke/servlet>
    ProxyPassReverse /strecke/servlet 
http://internal-host:8080/bugtrack/servlet 
<http://internal-host:8080/strecke/servlet>

The problem we have is that the images are not displayed and i do not 
understand why!!!

I hope somebody can help me!

greetings

Fabio Daprile

here a line of  the VM template:

<tr><td bgcolor="#FFFFFF" width=1><img 
src="$content.getURI("images/spacer.gif")" width="1" height="1" 
border="0" alt=""></td>

and here the same line from the rendered HTML source:

<tr><td bgcolor="#FFFFFF" width=1><img 
src="http://www.wuerth-phoenix.it:80/bugtrack/images/spacer.gif" 
width="1" height="1" border="0" alt=""></td>



hereafter some extracted lines from configuration files:

the server.xml of Tomcat:

   <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
   <Connector className="org.apache.catalina.connector.http.HttpConnector"
              port="8080" minProcessors="5" maxProcessors="75"
          proxyName="www.wuerth-phoenix.it"
              enableLookups="true" redirectPort="8443"
              acceptCount="10" debug="0" connectionTimeout="60000"
               proxyPort="80"/>

   <Context path=""
               docBase="webapps/bugtrack"
               crossContext="false"
               debug="0"
               reloadable="true"/>

hereafter the web.xml of my application:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
   "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">

<web-app>
 <servlet>
   <servlet-name>bugtrack</servlet-name>
   <servlet-class>org.apache.turbine.Turbine</servlet-class>
   <init-param>
     <param-name>applicationRoot</param-name>
     <param-value>webContext</param-value>
   </init-param>
   <init-param>
     <param-name>properties</param-name>
     <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

  <servlet-mapping>
     <servlet-name>bugtrack</servlet-name>
     <url-pattern>/*</url-pattern>
  </servlet-mapping>

 <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>
   <auth-constraint>
     <role-name>admin</role-name>
   </auth-constraint>
 </security-constraint>
 <login-config>
   <auth-method>BASIC</auth-method>
   <realm-name>Templates</realm-name>
 </login-config>
</web-app>


Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Rodney Schneider <ro...@actf.com.au>.
On Mon, 4 Nov 2002 21:49, you wrote:

> The problem we have is that the images are not displayed and i do not
> understand why!!!
>
> I hope somebody can help me!
> here a line of  the VM template:
>
> <tr><td bgcolor="#FFFFFF" width=1><img
> src="$content.getURI("images/spacer.gif")" width="1" height="1"
> border="0" alt=""></td>
>
> and here the same line from the rendered HTML source:
>
> <tr><td bgcolor="#FFFFFF" width=1><img
> src="http://www.wuerth-phoenix.it:80/bugtrack/images/spacer.gif"
> width="1" height="1" border="0" alt=""></td>

Hi Fabio,

What happens when you hit the image URL directly:
http://www.wuerth-phoenix.it:80/bugtrack/images/spacer.gif

Regards,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Rodney Schneider <ro...@actf.com.au>.
On Wed, 6 Nov 2002 20:34, you wrote:

> Hello Rodney,
>
> Thx for the answer.
>
> When i hit the image link directly i get redirect to the Login page of
> the site.
> Do you have an hint on this?

It sounds like a configuration problem to me.  What does your web.xml file 
look like?  Image files should be handled by Tomcat's DefaultServlet, not by 
the Turbine servlet.

Regards,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Rodney Schneider <ro...@actf.com.au>.
Hi Fabio,

On Tue, 12 Nov 2002 19:22, you wrote:
> i tried to change the dtd file but nothing changes.
> I'm sure that somebody has already solved the problem.
> What i'll like to have is a clear example of how to configure tomcat.

I just noticed your servlet mapping:
> >> <servlet-mapping>
> >>    <servlet-name>bugtrack</servlet-name>
> >>    <url-pattern>/*</url-pattern>
> >> </servlet-mapping>

Using "/*" is not a good idea as it means that your bugtrack servlet 
(Turbine) must handle all requests (including static html, images etc.). The 
Turbine servlet was not designed to do this.  Tomcat's DefaultServlet usually 
does this job.

On our site (http://www.kahootz.com) we use a url pattern of "/kz/*" for 
Turbine.

Regards,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
Hello,

i tried to change the dtd file but nothing changes.
I'm sure that somebody has already solved the problem.
What i'll like to have is a clear example of how to configure tomcat.

thx

Fabio

Peter Courcoux wrote:

>Fabio,
>
>I think that dtd is for a tomcat 3 server. Are you deploying on a tomcat
>4 server? If so I think the dtd should be a 2.3 one. I can vaguely
>recall having to change the web.xml file from one based on the 2.2 dtd
>to one based on 2.3 dtd for one of my apps developed with the 2.1 tdk on
>tomcat 3.2 which was deployed on tomcat 4. I cannot remember why though.
>
>I hope this helps.
>
>Peter 
>
>On Thu, 2002-11-07 at 16:14, Fabio Daprile wrote:
>  
>
>>hello Rodney,
>>
>>maybe it is a configuration problem.
>>I haven't changed anything in the web.xml of tomcat.
>>hereafter the web.xml of my servlet:
>>
>>greetings
>>
>>FD
>>
>><?xml version="1.0" encoding="ISO-8859-1"?>
>>
>><!DOCTYPE web-app
>>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>>  "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
>>
>><web-app>
>><servlet>
>>  <servlet-name>bugtrack</servlet-name>
>>  <servlet-class>org.apache.turbine.Turbine</servlet-class>
>>  <init-param>
>>    <param-name>applicationRoot</param-name>
>>    <param-value>webContext</param-value>
>>  </init-param>
>>  <init-param>
>>    <param-name>properties</param-name>
>>    <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
>>  </init-param>
>>  <load-on-startup>1</load-on-startup>
>></servlet>
>>
>> <servlet-mapping>
>>    <servlet-name>bugtrack</servlet-name>
>>    <url-pattern>/*</url-pattern>
>> </servlet-mapping>
>>
>><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>
>>  <auth-constraint>
>>    <role-name>admin</role-name>
>>  </auth-constraint>
>></security-constraint>
>><login-config>
>>  <auth-method>BASIC</auth-method>
>>  <realm-name>Templates</realm-name>
>></login-config>
>></web-app>
>>
>>
>>
>>Rodney Schneider wrote:
>>
>>    
>>
>>>On Wed, 6 Nov 2002 20:34, you wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>Hello Rodney,
>>>>
>>>>Thx for the answer.
>>>>
>>>>When i hit the image link directly i get redirect to the Login page of
>>>>the site.
>>>>Do you have an hint on this?
>>>>   
>>>>
>>>>        
>>>>
>>>It sounds like a configuration problem to me.  What does your web.xml file 
>>>look like?  Image files should be handled by Tomcat's DefaultServlet, not by 
>>>the Turbine servlet.
>>>
>>>Regards,
>>>
>>>-- Rodney
>>>
>>>--
>>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>>
>>> 
>>>
>>>      
>>>
>>-- 
>>Fabio Daprile
>>
>>Würth Phoenix srl - GmbH
>>Via Kravoglstrasse 4
>>39100 Bolzano / Bozen
>>Tel.  +39 0471 564 111 - (direct 564068)
>>Fax  + 39 0471 564 122
>>fabio.daprile@wuerth-phoenix.com
>>
>>http://www.wuerth-phoenix.com
>>http://www.wuerth.com
>>
>>
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 
Fabio Daprile

Würth Phoenix srl - GmbH
Via Kravoglstrasse 4
39100 Bolzano / Bozen
Tel.  +39 0471 564 111 - (direct 564068)
Fax  + 39 0471 564 122
fabio.daprile@wuerth-phoenix.com

http://www.wuerth-phoenix.com
http://www.wuerth.com



Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Peter Courcoux <pe...@courcoux.biz>.
Fabio,

I think that dtd is for a tomcat 3 server. Are you deploying on a tomcat
4 server? If so I think the dtd should be a 2.3 one. I can vaguely
recall having to change the web.xml file from one based on the 2.2 dtd
to one based on 2.3 dtd for one of my apps developed with the 2.1 tdk on
tomcat 3.2 which was deployed on tomcat 4. I cannot remember why though.

I hope this helps.

Peter 

On Thu, 2002-11-07 at 16:14, Fabio Daprile wrote:
> hello Rodney,
> 
> maybe it is a configuration problem.
> I haven't changed anything in the web.xml of tomcat.
> hereafter the web.xml of my servlet:
> 
> greetings
> 
> FD
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE web-app
>   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>   "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
> 
> <web-app>
> <servlet>
>   <servlet-name>bugtrack</servlet-name>
>   <servlet-class>org.apache.turbine.Turbine</servlet-class>
>   <init-param>
>     <param-name>applicationRoot</param-name>
>     <param-value>webContext</param-value>
>   </init-param>
>   <init-param>
>     <param-name>properties</param-name>
>     <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
>   </init-param>
>   <load-on-startup>1</load-on-startup>
> </servlet>
> 
>  <servlet-mapping>
>     <servlet-name>bugtrack</servlet-name>
>     <url-pattern>/*</url-pattern>
>  </servlet-mapping>
> 
> <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>
>   <auth-constraint>
>     <role-name>admin</role-name>
>   </auth-constraint>
> </security-constraint>
> <login-config>
>   <auth-method>BASIC</auth-method>
>   <realm-name>Templates</realm-name>
> </login-config>
> </web-app>
> 
> 
> 
> Rodney Schneider wrote:
> 
> >On Wed, 6 Nov 2002 20:34, you wrote:
> >
> >  
> >
> >>Hello Rodney,
> >>
> >>Thx for the answer.
> >>
> >>When i hit the image link directly i get redirect to the Login page of
> >>the site.
> >>Do you have an hint on this?
> >>    
> >>
> >
> >It sounds like a configuration problem to me.  What does your web.xml file 
> >look like?  Image files should be handled by Tomcat's DefaultServlet, not by 
> >the Turbine servlet.
> >
> >Regards,
> >
> >-- Rodney
> >
> >--
> >To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >  
> >
> 
> -- 
> Fabio Daprile
> 
> Würth Phoenix srl - GmbH
> Via Kravoglstrasse 4
> 39100 Bolzano / Bozen
> Tel.  +39 0471 564 111 - (direct 564068)
> Fax  + 39 0471 564 122
> fabio.daprile@wuerth-phoenix.com
> 
> http://www.wuerth-phoenix.com
> http://www.wuerth.com
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
hello Rodney,

maybe it is a configuration problem.
I haven't changed anything in the web.xml of tomcat.
hereafter the web.xml of my servlet:

greetings

FD

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">

<web-app>
<servlet>
  <servlet-name>bugtrack</servlet-name>
  <servlet-class>org.apache.turbine.Turbine</servlet-class>
  <init-param>
    <param-name>applicationRoot</param-name>
    <param-value>webContext</param-value>
  </init-param>
  <init-param>
    <param-name>properties</param-name>
    <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>

 <servlet-mapping>
    <servlet-name>bugtrack</servlet-name>
    <url-pattern>/*</url-pattern>
 </servlet-mapping>

<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>
  <auth-constraint>
    <role-name>admin</role-name>
  </auth-constraint>
</security-constraint>
<login-config>
  <auth-method>BASIC</auth-method>
  <realm-name>Templates</realm-name>
</login-config>
</web-app>



Rodney Schneider wrote:

>On Wed, 6 Nov 2002 20:34, you wrote:
>
>  
>
>>Hello Rodney,
>>
>>Thx for the answer.
>>
>>When i hit the image link directly i get redirect to the Login page of
>>the site.
>>Do you have an hint on this?
>>    
>>
>
>It sounds like a configuration problem to me.  What does your web.xml file 
>look like?  Image files should be handled by Tomcat's DefaultServlet, not by 
>the Turbine servlet.
>
>Regards,
>
>-- Rodney
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 
Fabio Daprile

Würth Phoenix srl - GmbH
Via Kravoglstrasse 4
39100 Bolzano / Bozen
Tel.  +39 0471 564 111 - (direct 564068)
Fax  + 39 0471 564 122
fabio.daprile@wuerth-phoenix.com

http://www.wuerth-phoenix.com
http://www.wuerth.com



Re: Reposting! Problem deploying Turbine Application with tomcat, apache using a ProxyServer!

Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
Hello Rodney,

Thx for the answer.

When i hit the image link directly i get redirect to the Login page of 
the site.
Do you have an hint on this?

greetings
FD

Rodney Schneider wrote:

>On Mon, 4 Nov 2002 21:49, you wrote:
>
>  
>
>>The problem we have is that the images are not displayed and i do not
>>understand why!!!
>>
>>I hope somebody can help me!
>>here a line of  the VM template:
>>
>><tr><td bgcolor="#FFFFFF" width=1><img
>>src="$content.getURI("images/spacer.gif")" width="1" height="1"
>>border="0" alt=""></td>
>>
>>and here the same line from the rendered HTML source:
>>
>><tr><td bgcolor="#FFFFFF" width=1><img
>>src="http://www.wuerth-phoenix.it:80/bugtrack/images/spacer.gif"
>>width="1" height="1" border="0" alt=""></td>
>>    
>>
>
>Hi Fabio,
>
>What happens when you hit the image URL directly:
>http://www.wuerth-phoenix.it:80/bugtrack/images/spacer.gif
>
>Regards,
>
>-- Rodney
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 
Fabio Daprile

Würth Phoenix srl - GmbH
Via Kravoglstrasse 4
39100 Bolzano / Bozen
Tel.  +39 0471 564 111 - (direct 564068)
Fax  + 39 0471 564 122
fabio.daprile@wuerth-phoenix.com

http://www.wuerth-phoenix.com
http://www.wuerth.com