You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Pisit <pi...@megadict.com> on 2009/05/05 05:08:33 UTC

Can't access HTML files in classpath resouce

I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
For Windows server, it's work perfectly but for Linux has encounter HTTP 404
error
i've found that it unable to access
/assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
and other .html files
but for other extension such  .css, .js or image format works fines. Any
suggestion?

Thanks in advance. 
Dave.
-- 
View this message in context: http://www.nabble.com/Can%27t-access-HTML-files-in-classpath-resouce-tp23380286p23380286.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by Peter Stavrinides <P....@albourne.com>.
>Are you using Tomcat behind Apache? If yes, this can be the source of your  
>problem, as it consider theses URLs as static ones, when actually they're  
>handled by Tapestry.

I am using Apache in front of Tomcat, running on Linux, and I have never encountered this.

Peter
----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 5 May, 2009 06:23:41 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Can't access HTML files in classpath resouce

Em Tue, 05 May 2009 00:08:33 -0300, Pisit <pi...@megadict.com> escreveu:

> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
> For Windows server, it's work perfectly but for Linux has encounter HTTP  
> 404 error i've found that it unable to access
> /assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
> and other .html files but for other extension such  .css, .js or image  
> format works fines. Any
> suggestion?

Are you using Tomcat behind Apache? If yes, this can be the source of your  
problem, as it consider theses URLs as static ones, when actually they're  
handled by Tapestry.

I use Tapestry on Linux and Jetty without any problems. Also make sure you  
have a non-corrupted and complete ChenilleKit (sucessor of T5Components)  
JAR in your classpath.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 05 May 2009 00:08:33 -0300, Pisit <pi...@megadict.com> escreveu:

> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
> For Windows server, it's work perfectly but for Linux has encounter HTTP  
> 404 error i've found that it unable to access
> /assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
> and other .html files but for other extension such  .css, .js or image  
> format works fines. Any
> suggestion?

Are you using Tomcat behind Apache? If yes, this can be the source of your  
problem, as it consider theses URLs as static ones, when actually they're  
handled by Tapestry.

I use Tapestry on Linux and Jetty without any problems. Also make sure you  
have a non-corrupted and complete ChenilleKit (sucessor of T5Components)  
JAR in your classpath.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by Pisit <pi...@megadict.com>.


Thiago H. de Paula Figueiredo wrote:
> 
> Em Tue, 05 May 2009 14:08:07 -0300, Pisit <pi...@megadict.com> escreveu:
> 
>> it may be relate to tomcat security configuration issue? or
>> "UnprotectedAssets" topic?
> 
> I still think it is an Apache configuration issue. Try to configure it to  
> allow /asset/* to be handled by Tomcat or just use Tomcat alone.
> 
>> but I still don't have any idea to solve this. maybe i need to change my
>> server to Jetty which it is the last choice.
> 
> Since I've known Jetty I don't use another servlet container. :)
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 


I've just solve this problem few days ago,
and come to post again for everyone who has same problem.

I done as Thiago H. told me.
To allow /* to be handled by Tomcat.
I add this line to my "mod_jk.conf" 

JkMount /* ajp13

and it's work!! 
Thanks again Thiago H.
=)


-- 
View this message in context: http://www.nabble.com/Can%27t-access-HTML-files-in-classpath-resouce-tp23380286p23464480.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 05 May 2009 14:08:07 -0300, Pisit <pi...@megadict.com> escreveu:

> it may be relate to tomcat security configuration issue? or
> "UnprotectedAssets" topic?

I still think it is an Apache configuration issue. Try to configure it to  
allow /asset/* to be handled by Tomcat or just use Tomcat alone.

> but I still don't have any idea to solve this. maybe i need to change my
> server to Jetty which it is the last choice.

Since I've known Jetty I don't use another servlet container. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by Pisit <pi...@megadict.com>.


Pisit wrote:
> 
> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
> For Windows server, it's work perfectly but for Linux has encounter HTTP
> 404 error
> i've found that it unable to access
> /assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
> and other .html files
> but for other extension such  .css, .js or image format works fines. Any
> suggestion?
> 
> Thanks in advance. 
> Dave.
> 

Hi. i'm again, Pisit
Thanks for every replying.
and sorry for my late responsing.

Today i'm do some test case to find real source of problem
so I create test.html and test.js in my
"com.megasofts.tapestry.jslibs.scripts.test" package (not in jar files)
and try access both of them with this...

URL resource =
this.getClass().getClassLoader().getResource("/com/megasofts/tapestry/jslibs/scripts/test/test.html");
InputStream is = resource.openStream();
// ... and do somthing with the stream

So, this is the result
http://megasofts.com/componentfactory/t5components/editor

as you see. It's able to access both of them for Windows and Linux
but when i try access via asset path by web browser the result is...

Windows
../asset/com/megasofts/tapestry/jslibs/scripts/test/test.html	> OK!
../asset/com/megasofts/tapestry/jslibs/scripts/test/test.js	   	> OK!

Linux 
../asset/com/megasofts/tapestry/jslibs/scripts/test/test.html	> HTTP Status
404
../asset/com/megasofts/tapestry/jslibs/scripts/test/test.js	   	> OK!

at this point i'm sure that problem is not case-sensitive issue as these
file name are lower-case.
but it look like the problem occurs when try access HTML files or other
extension that not CSS, IMAGE or JS files
in my case, the fckeditor trys to inculde fckeditor.html with iframe
 <iframe id="editor___Frame"
src="../assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html?InstanceName=editor&amp;Toolbar=Default"
...
so problem is occur. T-T

it may be relate to tomcat security configuration issue? or
"UnprotectedAssets" topic?
but I still don't have any idea to solve this. maybe i need to change my
server to Jetty which it is the last choice.
So please help me. 

Thanks again.
Dave

-- 
View this message in context: http://www.nabble.com/Can%27t-access-HTML-files-in-classpath-resouce-tp23380286p23391845.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
;)




Felix Gonschorek <fe...@gg-media.biz> 
05.05.2009 14:24
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
Tapestry users <us...@tapestry.apache.org>
Kopie

Thema
Re: Can't access HTML files in classpath resouce







hi kris,

thank you for your advice - with my previous mail i wanted to give the 
same tip 
to pisit - seems my post did not make this comprehesible ;)

felix

Kristian Marinkovic schrieb:
> this is because the windows filesystem is case insensitive!
> unix is case sensitive....
> 
> therefore your templates must have the same case as the 
> corresponding page
> 
> g,
> kris
> 
> 
> 
> 
> 
> 
> Felix Gonschorek <fe...@gg-media.biz> 
> 05.05.2009 12:02
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
> 
> 
> An
> Tapestry users <us...@tapestry.apache.org>
> Kopie
> 
> Thema
> Re: Can't access HTML files in classpath resouce
> 
> 
> 
> 
> 
> 
> 
> i encounterd a similar problem when working with both win and linux 
> machines.
> 
> .tml files and their corresponding java classes had a different 
> upper/lower case.
> 
> e.g. "page.tml" and "Page.java".
> 
> under windows this works, under linux not.
> 
> 
> felix
> 
> Pisit schrieb:
>> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
>> For Windows server, it's work perfectly but for Linux has encounter 
HTTP 
> 404
>> error
>> i've found that it unable to access
>>
> 
/assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
>> and other .html files
>> but for other extension such  .css, .js or image format works fines. 
Any
>> suggestion?
>>
>> Thanks in advance. 
>> Dave.
> 

-- 
Felix Gonschorek
GG-Media

Kirchstr. 18
69115 Heidelberg

Tel: +49 6221 890 168-0
Fax: +49 6221 890 168-1
Mobil: +49 176 2234 1338

felix@gg-media.biz
http://www.gg-media.biz

Vertretungsberechtigte Gesellschafter:
Felix Gonschorek & Jochen Greiner

Umsatzsteuer-Identifikationsnummer
gemäß § 27a Umsatzsteuergesetz:
DE232906440

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



Re: Can't access HTML files in classpath resouce

Posted by Felix Gonschorek <fe...@gg-media.biz>.
hi kris,

thank you for your advice - with my previous mail i wanted to give the same tip 
to pisit - seems my post did not make this comprehesible ;)

felix

Kristian Marinkovic schrieb:
> this is because the windows filesystem is case insensitive!
> unix is case sensitive....
> 
> therefore your templates must have the same case as the 
> corresponding page
> 
> g,
> kris
> 
> 
> 
> 
> 
> 
> Felix Gonschorek <fe...@gg-media.biz> 
> 05.05.2009 12:02
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
> 
> 
> An
> Tapestry users <us...@tapestry.apache.org>
> Kopie
> 
> Thema
> Re: Can't access HTML files in classpath resouce
> 
> 
> 
> 
> 
> 
> 
> i encounterd a similar problem when working with both win and linux 
> machines.
> 
> .tml files and their corresponding java classes had a different 
> upper/lower case.
> 
> e.g. "page.tml" and "Page.java".
> 
> under windows this works, under linux not.
> 
> 
> felix
> 
> Pisit schrieb:
>> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
>> For Windows server, it's work perfectly but for Linux has encounter HTTP 
> 404
>> error
>> i've found that it unable to access
>>
> /assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
>> and other .html files
>> but for other extension such  .css, .js or image format works fines. Any
>> suggestion?
>>
>> Thanks in advance. 
>> Dave.
> 

-- 
Felix Gonschorek
GG-Media

Kirchstr. 18
69115 Heidelberg

Tel: +49 6221 890 168-0
Fax: +49 6221 890 168-1
Mobil: +49 176 2234 1338

felix@gg-media.biz
http://www.gg-media.biz

Vertretungsberechtigte Gesellschafter:
Felix Gonschorek & Jochen Greiner

Umsatzsteuer-Identifikationsnummer
gemäß § 27a Umsatzsteuergesetz:
DE232906440

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't access HTML files in classpath resouce

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
this is because the windows filesystem is case insensitive!
unix is case sensitive....

therefore your templates must have the same case as the 
corresponding page

g,
kris






Felix Gonschorek <fe...@gg-media.biz> 
05.05.2009 12:02
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
Tapestry users <us...@tapestry.apache.org>
Kopie

Thema
Re: Can't access HTML files in classpath resouce







i encounterd a similar problem when working with both win and linux 
machines.

.tml files and their corresponding java classes had a different 
upper/lower case.

e.g. "page.tml" and "Page.java".

under windows this works, under linux not.


felix

Pisit schrieb:
> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
> For Windows server, it's work perfectly but for Linux has encounter HTTP 
404
> error
> i've found that it unable to access
> 
/assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
> and other .html files
> but for other extension such  .css, .js or image format works fines. Any
> suggestion?
> 
> Thanks in advance. 
> Dave.

-- 
Felix Gonschorek
GG-Media

Kirchstr. 18
69115 Heidelberg

Tel: +49 6221 890 168-0
Fax: +49 6221 890 168-1
Mobil: +49 176 2234 1338

felix@gg-media.biz
http://www.gg-media.biz

Vertretungsberechtigte Gesellschafter:
Felix Gonschorek & Jochen Greiner

Umsatzsteuer-Identifikationsnummer
gemäß § 27a Umsatzsteuergesetz:
DE232906440

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



Re: Can't access HTML files in classpath resouce

Posted by Felix Gonschorek <fe...@gg-media.biz>.
i encounterd a similar problem when working with both win and linux machines.

.tml files and their corresponding java classes had a different upper/lower case.

e.g. "page.tml" and "Page.java".

under windows this works, under linux not.


felix

Pisit schrieb:
> I'm using Tapestry 5.0.18+Tomcat 6.0+FCKEditor (from T5Components)
> For Windows server, it's work perfectly but for Linux has encounter HTTP 404
> error
> i've found that it unable to access
> /assets/org/apache/tapestry/commons/jslibs/scripts/fckeditor/editor/fckeditor.html
> and other .html files
> but for other extension such  .css, .js or image format works fines. Any
> suggestion?
> 
> Thanks in advance. 
> Dave.

-- 
Felix Gonschorek
GG-Media

Kirchstr. 18
69115 Heidelberg

Tel: +49 6221 890 168-0
Fax: +49 6221 890 168-1
Mobil: +49 176 2234 1338

felix@gg-media.biz
http://www.gg-media.biz

Vertretungsberechtigte Gesellschafter:
Felix Gonschorek & Jochen Greiner

Umsatzsteuer-Identifikationsnummer
gemäß § 27a Umsatzsteuergesetz:
DE232906440

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org