You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by James Soper <so...@gmail.com> on 2012/05/04 10:40:07 UTC

Tiles CSS problem

Hi,
I'm having an issue with adding css & javascript files to my tiles.
in my layout.jsp file I use these lines to add them:
<link href="<s:url value="/css/common.css"/>" rel="stylesheet"
type="text/css" />
<script type="text/javascript" src="<s:url value="/js/common.js"/>"></script>

and they're rendered in the html as:
<link type="text/css" rel="stylesheet" href="/app/css/common.css">
<script src="/app/js/common.js" type="text/javascript">

and when I got to look at either I get:
There is no Action mapped for namespace / and action name common.css(/.js) error
It seems like it's trying to render both as pages.

Any ideas?
Thanks.

Re: Tiles CSS problem

Posted by MiB <di...@gmail.com>.
4 maj 2012 20.35 James Soper:

> Thanks for the help. The reason that I thought it was a tiles issue
> was simply that that's what I was implementing when I started having
> the problem. I've got it figured out now.

That's nice, James.

It's this type of problems that lately have gotten me to take up end  
to end acceptance testing in the form of integration tests. I use the  
Selenium Webdriver to test my pages in firefox during these tests,  
that only run in the associated phase with the Failsafe maven plugin.  
The Surefire plugin runs my unit tests.

/MiB





Re: Tiles CSS problem

Posted by Nicolas LE BAS <ma...@nlebas.net>.
You're welcome

On 12-05-04 02:35 PM, James Soper wrote:
> Thanks for all the help.


Re: Tiles CSS problem

Posted by James Soper <so...@gmail.com>.
Hey.
Thanks for the help. The reason that I thought it was a tiles issue
was simply that that's what I was implementing when I started having
the problem. I've got it figured out now.
Thanks for all the help.

On Fri, May 4, 2012 at 11:20 AM, Nicolas LE BAS <ma...@nlebas.net> wrote:
> Any reason to blame it on Tiles?
>
> The word "tiles" doesn't appear even once in your report, and the stack
> trace you've posted says "Struts Problem"...
>
> If /app/js/common.js gets processed by Struts and you don't want that,
> perhaps you should look at your Struts configuration. Or ask the struts team
> for help...
>
>
> On 12-05-04 12:01 PM, James Soper wrote:
>>
>> Thanks for the quick reply. Any reason for that?
>>
>> On Fri, May 4, 2012 at 1:57 AM, Antonio Petrelli
>> <an...@gmail.com>  wrote:
>>>
>>> Not a Tiles problem I suppose...
>>>
>>> 2012/5/4 James Soper<so...@gmail.com>
>>>
>>>> Hi,
>>>> I'm having an issue with adding css&  javascript files to my tiles.
>>>>
>>>> in my layout.jsp file I use these lines to add them:
>>>> <link href="<s:url value="/css/common.css"/>" rel="stylesheet"
>>>> type="text/css" />
>>>> <script type="text/javascript" src="<s:url
>>>> value="/js/common.js"/>"></script>
>>>>
>>>> and they're rendered in the html as:
>>>> <link type="text/css" rel="stylesheet" href="/app/css/common.css">
>>>> <script src="/app/js/common.js" type="text/javascript">
>>>>
>>>> and when I got to look at either I get:
>>>> There is no Action mapped for namespace / and action name
>>>> common.css(/.js)
>>>> error
>>>> It seems like it's trying to render both as pages.
>>>>
>>>> Any ideas?
>>>> Thanks.
>>>>
>

Re: Tiles CSS problem

Posted by Nicolas LE BAS <ma...@nlebas.net>.
Any reason to blame it on Tiles?

The word "tiles" doesn't appear even once in your report, and the stack 
trace you've posted says "Struts Problem"...

If /app/js/common.js gets processed by Struts and you don't want that, 
perhaps you should look at your Struts configuration. Or ask the struts 
team for help...

On 12-05-04 12:01 PM, James Soper wrote:
> Thanks for the quick reply. Any reason for that?
>
> On Fri, May 4, 2012 at 1:57 AM, Antonio Petrelli
> <an...@gmail.com>  wrote:
>> Not a Tiles problem I suppose...
>>
>> 2012/5/4 James Soper<so...@gmail.com>
>>
>>> Hi,
>>> I'm having an issue with adding css&  javascript files to my tiles.
>>> in my layout.jsp file I use these lines to add them:
>>> <link href="<s:url value="/css/common.css"/>" rel="stylesheet"
>>> type="text/css" />
>>> <script type="text/javascript" src="<s:url
>>> value="/js/common.js"/>"></script>
>>>
>>> and they're rendered in the html as:
>>> <link type="text/css" rel="stylesheet" href="/app/css/common.css">
>>> <script src="/app/js/common.js" type="text/javascript">
>>>
>>> and when I got to look at either I get:
>>> There is no Action mapped for namespace / and action name common.css(/.js)
>>> error
>>> It seems like it's trying to render both as pages.
>>>
>>> Any ideas?
>>> Thanks.
>>>


Re: Tiles CSS problem

Posted by James Soper <so...@gmail.com>.
Thanks for the quick reply. Any reason for that?

On Fri, May 4, 2012 at 1:57 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> Not a Tiles problem I suppose...
>
> 2012/5/4 James Soper <so...@gmail.com>
>
>> Hi,
>> I'm having an issue with adding css & javascript files to my tiles.
>> in my layout.jsp file I use these lines to add them:
>> <link href="<s:url value="/css/common.css"/>" rel="stylesheet"
>> type="text/css" />
>> <script type="text/javascript" src="<s:url
>> value="/js/common.js"/>"></script>
>>
>> and they're rendered in the html as:
>> <link type="text/css" rel="stylesheet" href="/app/css/common.css">
>> <script src="/app/js/common.js" type="text/javascript">
>>
>> and when I got to look at either I get:
>> There is no Action mapped for namespace / and action name common.css(/.js)
>> error
>> It seems like it's trying to render both as pages.
>>
>> Any ideas?
>> Thanks.
>>

Re: Tiles CSS problem

Posted by Antonio Petrelli <an...@gmail.com>.
Not a Tiles problem I suppose...

2012/5/4 James Soper <so...@gmail.com>

> Hi,
> I'm having an issue with adding css & javascript files to my tiles.
> in my layout.jsp file I use these lines to add them:
> <link href="<s:url value="/css/common.css"/>" rel="stylesheet"
> type="text/css" />
> <script type="text/javascript" src="<s:url
> value="/js/common.js"/>"></script>
>
> and they're rendered in the html as:
> <link type="text/css" rel="stylesheet" href="/app/css/common.css">
> <script src="/app/js/common.js" type="text/javascript">
>
> and when I got to look at either I get:
> There is no Action mapped for namespace / and action name common.css(/.js)
> error
> It seems like it's trying to render both as pages.
>
> Any ideas?
> Thanks.
>

Re: Tiles CSS problem

Posted by James Soper <so...@gmail.com>.
It being the tomcat server I'm running it on.
http://pastebin.com/ut531r0s
that's what the html renders as... (i've collapsed the body & put the
rendered source of the css file right beneath it)
 I'm using struts2 and tiles, so sorry if I'm asking in the wrong place.

On Fri, May 4, 2012 at 9:45 AM, MiB <di...@gmail.com> wrote:
>
> 4 maj 2012 10.40 James Soper said:
>
>> and when I got to look at either I get:
>> There is no Action mapped for namespace / and action name common.css(/.js)
>> error
>> It seems like it's trying to render both as pages.
>
>
> What's "it"? The server? Your app? What are you logging and what's the
> context?
> What's the phase in your app when you get this message? The Action is part
> of your framework?
>
> Post a full error log to pastebin.com and refer to that.
>
>
> /MiB
>
>
>
>

Re: Tiles CSS problem

Posted by MiB <di...@gmail.com>.
4 maj 2012 10.40 James Soper said:

> and when I got to look at either I get:
> There is no Action mapped for namespace / and action name  
> common.css(/.js) error
> It seems like it's trying to render both as pages.

What's "it"? The server? Your app? What are you logging and what's the  
context?
What's the phase in your app when you get this message? The Action is  
part of your framework?

Post a full error log to pastebin.com and refer to that.


/MiB