You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bernd Schiffer <11...@onlinehome.de> on 2005/03/05 19:12:12 UTC

Two css files

Hi.

I have two css files in the head of my jsp's:

         <link id="extendedStyleSheet" rel="stylesheet" type="text/css" 
charset="utf-8" title="extended sg-style"
                 href="<html:rewrite forward='extendedCssStyle'/>" />
         <link id="basicStyleSheet" rel="stylesheet" type="text/css" 
charset="utf-8" title="basic sg-style"
                 href="<html:rewrite forward='basicCssStyle'/>" />

The basicCssStyle's first line has the statement:
         @import url(../basic.css);

The idea is that the user of my webapp can edit the extendedCssStyle 
file for her own layout settings. When she updates the webapp she only 
gets a new basicCssStyle file. And because of the order of appearence 
(first extended, then basic css file) the browser will display the 
extended layout first. If the user does not edit the extended style, the 
basic style will be displayed. So far, so idea...

This does work in IE and FireFox 1.0.1 on Windows XP. When I define a 
style in the basic css file, I can see it when I choose the extended 
style, because it is inherited from the basic style.

The problem now is that this does not work in Mozilla 1.7.3 on Windows 
and FireFox 1.0 on Linux. In the same case as above I can't see the 
layout, so it seems that it was not inherited from the basic css file. 
When I switch to the basic style, everythings seems fine and I can see 
the style.

Does anyone know if this is a browser problem? Can I do anything to 
force the import (without copy'n'paste, of course)? Or is there a 
different pattern using Struts for something like that?

    Bernd

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


Re: DispatchAction - NullPointerException

Posted by Basile Passe <b....@gmail.com>.
Hey Rick,

Thanks for your reply.

On Tue, 08 Mar 2005 10:18:30 -0500, Rick Reumann <st...@reumann.net> wrote:
> Basile Passe wrote the following on 3/7/2005 12:49 PM:
> 
> > The value of the request parameter named "method" to pick the
> > appropriate "execute" method is not valid. But why? struts-config.xml
> > is correct and form (JSP) also.
> 
> Well, not sure exactly what you mean above. I'm assuming since you said
> it works 95% of the time, you do have typical dispatch method names.
> When you use a DispatchAction you typically don't code the execute
> method (that's handled by the base class). The execute method of the
> base class chooses the correct method in your dispatch action. From your

I understand your description of DispatchAction and my use is good.

> stack trace it's apparent that you are "NOT" always passing the "method"

I'm sure we passing the good "method" parameter but sometimes the
error appears in the stack trace!.

> parameter like you say you are OR the method param you are passing does
> not match the method name in the dispatch action (check for typos). Use
> a debugger or print out the request params that are being passed.

I don't have the possibilities to reproduce the error. The error
appears in production (error occurs from time to time). ;)

> 
> (PS- It's not a good idea to reply to another topic and change the
> subject, since it messes up the threading of messages. This message and
> your original is now burried within the "Two CSS files" thread)

Sorry :P

> 
> >
> > Have you an idea for resolve this problem ?
> >
> > Sorry for my poor english ;)
> >
> > Basile Passe
> >
> > Error trace :
> > java.lang.NullPointerException
> >        at java.lang.Class.getMethod0 (Native Method)
> >        at java.lang.Class.getMethod (Class.java:888)
> >        at org.apache.struts.actions.DispatchAction.getMethod
> > (DispatchAction.java:334)
> >        at org.apache.struts.actions.DispatchAction.dispatchMethod
> > (DispatchAction.java:266)
> >        at adsn.fcddv.framework.struts.BaseDispatchAction.execute
> > (BaseDispatchAction.java:76)
> >        at org.apache.struts.action.RequestProcessor.processActionPerform
> > (RequestProcessor.java:446)
> >        at adsn.fcddv.framework.struts.CustomRequestProcessor.process
> > (CustomRequestProcessor.java:101)
> >        at org.apache.struts.action.ActionServlet.process
> > (ActionServlet.java:1292)
> >        at org.apache.struts.action.ActionServlet.doGet (ActionServlet.java:492)
> >        at javax.servlet.http.HttpServlet.service (HttpServlet.java:740)
> >        at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
> >        at com.evermind.server.http.ResourceFilterChain.doFilter
> > (ResourceFilterChain.java:65)
> >        at oracle.security.jazn.oc4j.JAZNFilter.doFilter (JAZNFilter.java:283)
> >        at com.evermind.server.http.ServletRequestDispatcher.invoke
> > (ServletRequestDispatcher.java:560)
> >        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal
> > (ServletRequestDispatcher.java:306)
> >        at com.evermind.server.http.HttpRequestHandler.processRequest
> > (HttpRequestHandler.java:767)
> >        at com.evermind.server.http.HttpRequestHandler.run
> > (HttpRequestHandler.java:259)
> >        at com.evermind.server.http.HttpRequestHandler.run
> > (HttpRequestHandler.java:106)
> >        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> > (PooledExecutor.java:803)
> >        at java.lang.Thread.run (Thread.java:484)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> 
> --
> Rick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


Best regards,

Basile

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


Re: DispatchAction - NullPointerException

Posted by Rick Reumann <st...@reumann.net>.
Basile Passe wrote the following on 3/7/2005 12:49 PM:

> The value of the request parameter named "method" to pick the
> appropriate "execute" method is not valid. But why? struts-config.xml
> is correct and form (JSP) also.

Well, not sure exactly what you mean above. I'm assuming since you said 
it works 95% of the time, you do have typical dispatch method names. 
When you use a DispatchAction you typically don't code the execute 
method (that's handled by the base class). The execute method of the 
base class chooses the correct method in your dispatch action. From your 
stack trace it's apparent that you are "NOT" always passing the "method" 
parameter like you say you are OR the method param you are passing does 
not match the method name in the dispatch action (check for typos). Use 
a debugger or print out the request params that are being passed.

(PS- It's not a good idea to reply to another topic and change the 
subject, since it messes up the threading of messages. This message and 
your original is now burried within the "Two CSS files" thread)

> 
> Have you an idea for resolve this problem ?
> 
> Sorry for my poor english ;)
> 
> Basile Passe
> 
> Error trace :
> java.lang.NullPointerException
>        at java.lang.Class.getMethod0 (Native Method)
>        at java.lang.Class.getMethod (Class.java:888)
>        at org.apache.struts.actions.DispatchAction.getMethod
> (DispatchAction.java:334)
>        at org.apache.struts.actions.DispatchAction.dispatchMethod
> (DispatchAction.java:266)
>        at adsn.fcddv.framework.struts.BaseDispatchAction.execute
> (BaseDispatchAction.java:76)
>        at org.apache.struts.action.RequestProcessor.processActionPerform
> (RequestProcessor.java:446)
>        at adsn.fcddv.framework.struts.CustomRequestProcessor.process
> (CustomRequestProcessor.java:101)
>        at org.apache.struts.action.ActionServlet.process
> (ActionServlet.java:1292)
>        at org.apache.struts.action.ActionServlet.doGet (ActionServlet.java:492)
>        at javax.servlet.http.HttpServlet.service (HttpServlet.java:740)
>        at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
>        at com.evermind.server.http.ResourceFilterChain.doFilter
> (ResourceFilterChain.java:65)
>        at oracle.security.jazn.oc4j.JAZNFilter.doFilter (JAZNFilter.java:283)
>        at com.evermind.server.http.ServletRequestDispatcher.invoke
> (ServletRequestDispatcher.java:560)
>        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal
> (ServletRequestDispatcher.java:306)
>        at com.evermind.server.http.HttpRequestHandler.processRequest
> (HttpRequestHandler.java:767)
>        at com.evermind.server.http.HttpRequestHandler.run
> (HttpRequestHandler.java:259)
>        at com.evermind.server.http.HttpRequestHandler.run
> (HttpRequestHandler.java:106)
>        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> (PooledExecutor.java:803)
>        at java.lang.Thread.run (Thread.java:484)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


-- 
Rick

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


DispatchAction - NullPointerException

Posted by Basile Passe <b....@gmail.com>.
Hello,

We use Struts on a oracle based application, the solution is used in
production. The webapp is very solicited : 2000 POST Request / Hour
(all along the day).
I have a problem with the DispatchAction of Struts. Please help me.
The error does not appear systematically. It actually works 95% of time.

The value of the request parameter named "method" to pick the
appropriate "execute" method is not valid. But why? struts-config.xml
is correct and form (JSP) also.

Have you an idea for resolve this problem ?

Sorry for my poor english ;)

Basile Passe

Error trace :
java.lang.NullPointerException
       at java.lang.Class.getMethod0 (Native Method)
       at java.lang.Class.getMethod (Class.java:888)
       at org.apache.struts.actions.DispatchAction.getMethod
(DispatchAction.java:334)
       at org.apache.struts.actions.DispatchAction.dispatchMethod
(DispatchAction.java:266)
       at adsn.fcddv.framework.struts.BaseDispatchAction.execute
(BaseDispatchAction.java:76)
       at org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:446)
       at adsn.fcddv.framework.struts.CustomRequestProcessor.process
(CustomRequestProcessor.java:101)
       at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1292)
       at org.apache.struts.action.ActionServlet.doGet (ActionServlet.java:492)
       at javax.servlet.http.HttpServlet.service (HttpServlet.java:740)
       at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
       at com.evermind.server.http.ResourceFilterChain.doFilter
(ResourceFilterChain.java:65)
       at oracle.security.jazn.oc4j.JAZNFilter.doFilter (JAZNFilter.java:283)
       at com.evermind.server.http.ServletRequestDispatcher.invoke
(ServletRequestDispatcher.java:560)
       at com.evermind.server.http.ServletRequestDispatcher.forwardInternal
(ServletRequestDispatcher.java:306)
       at com.evermind.server.http.HttpRequestHandler.processRequest
(HttpRequestHandler.java:767)
       at com.evermind.server.http.HttpRequestHandler.run
(HttpRequestHandler.java:259)
       at com.evermind.server.http.HttpRequestHandler.run
(HttpRequestHandler.java:106)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
(PooledExecutor.java:803)
       at java.lang.Thread.run (Thread.java:484)

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


Re: Two css files

Posted by Karan <ka...@resolution.com>.
lols..okay Bernd.
Thanks for the info.

Regards,
Karan

Bernd Schiffer wrote:

> Hi Karan.
>
> Karan wrote:
>
>> I don't have an answer to your problem, but I do have a question:
>> The user of your webapp can customize extendedCssStyle for his/her own
>> layout settings.
>> But a different user can modify it again for different settings.
>> How do you maintain the different layouts for different users?
>
>
> First to the answer: it was just a reference to the wrong directory. It
> works perfectly now.
>
> Second to the question: 'user' was the wrong term for the description I
> gave. I ment the customer. The customer can change the design with the
> extendedCssStyle, and whereever she does not do design, the
> basicCssStyle would be used.
>
>   Bernd
>
>> Thanks,
>> Karan
>>
>> Bernd Schiffer wrote:
>>
>>> Hi.
>>>
>>> I have two css files in the head of my jsp's:
>>>
>>>         <link id="extendedStyleSheet" rel="stylesheet" type="text/css"
>>> charset="utf-8" title="extended sg-style"
>>>                 href="<html:rewrite forward='extendedCssStyle'/>" />
>>>         <link id="basicStyleSheet" rel="stylesheet" type="text/css"
>>> charset="utf-8" title="basic sg-style"
>>>                 href="<html:rewrite forward='basicCssStyle'/>" />
>>>
>>> The basicCssStyle's first line has the statement:
>>>         @import url(../basic.css);
>>>
>>> The idea is that the user of my webapp can edit the extendedCssStyle
>>> file for her own layout settings. When she updates the webapp she only
>>> gets a new basicCssStyle file. And because of the order of appearence
>>> (first extended, then basic css file) the browser will display the
>>> extended layout first. If the user does not edit the extended style, 
>>> the
>>> basic style will be displayed. So far, so idea...
>>>
>>> This does work in IE and FireFox 1.0.1 on Windows XP. When I define a
>>> style in the basic css file, I can see it when I choose the extended
>>> style, because it is inherited from the basic style.
>>>
>>> The problem now is that this does not work in Mozilla 1.7.3 on Windows
>>> and FireFox 1.0 on Linux. In the same case as above I can't see the
>>> layout, so it seems that it was not inherited from the basic css file.
>>> When I switch to the basic style, everythings seems fine and I can see
>>> the style.
>>>
>>> Does anyone know if this is a browser problem? Can I do anything to
>>> force the import (without copy'n'paste, of course)? Or is there a
>>> different pattern using Struts for something like that?
>>>
>>>    Bernd
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>> .
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> .
>

-- 
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/


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


Re: Two css files

Posted by Bernd Schiffer <11...@onlinehome.de>.
Hi Karan.

Karan wrote:

> I don't have an answer to your problem, but I do have a question:
> The user of your webapp can customize extendedCssStyle for his/her own 
> layout settings.
> But a different user can modify it again for different settings.
> How do you maintain the different layouts for different users?

First to the answer: it was just a reference to the wrong directory. It 
works perfectly now.

Second to the question: 'user' was the wrong term for the description I 
gave. I ment the customer. The customer can change the design with the 
extendedCssStyle, and whereever she does not do design, the 
basicCssStyle would be used.

   Bernd

> Thanks,
> Karan
>
> Bernd Schiffer wrote:
>
>> Hi.
>>
>> I have two css files in the head of my jsp's:
>>
>>         <link id="extendedStyleSheet" rel="stylesheet" type="text/css"
>> charset="utf-8" title="extended sg-style"
>>                 href="<html:rewrite forward='extendedCssStyle'/>" />
>>         <link id="basicStyleSheet" rel="stylesheet" type="text/css"
>> charset="utf-8" title="basic sg-style"
>>                 href="<html:rewrite forward='basicCssStyle'/>" />
>>
>> The basicCssStyle's first line has the statement:
>>         @import url(../basic.css);
>>
>> The idea is that the user of my webapp can edit the extendedCssStyle
>> file for her own layout settings. When she updates the webapp she only
>> gets a new basicCssStyle file. And because of the order of appearence
>> (first extended, then basic css file) the browser will display the
>> extended layout first. If the user does not edit the extended style, the
>> basic style will be displayed. So far, so idea...
>>
>> This does work in IE and FireFox 1.0.1 on Windows XP. When I define a
>> style in the basic css file, I can see it when I choose the extended
>> style, because it is inherited from the basic style.
>>
>> The problem now is that this does not work in Mozilla 1.7.3 on Windows
>> and FireFox 1.0 on Linux. In the same case as above I can't see the
>> layout, so it seems that it was not inherited from the basic css file.
>> When I switch to the basic style, everythings seems fine and I can see
>> the style.
>>
>> Does anyone know if this is a browser problem? Can I do anything to
>> force the import (without copy'n'paste, of course)? Or is there a
>> different pattern using Struts for something like that?
>>
>>    Bernd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>> .
>>
>


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


Re: Two css files

Posted by Karan <ka...@resolution.com>.
I don't have an answer to your problem, but I do have a question:
The user of your webapp can customize extendedCssStyle for his/her own 
layout settings.
But a different user can modify it again for different settings.
How do you maintain the different layouts for different users?

Thanks,
Karan

Bernd Schiffer wrote:

> Hi.
>
> I have two css files in the head of my jsp's:
>
>         <link id="extendedStyleSheet" rel="stylesheet" type="text/css"
> charset="utf-8" title="extended sg-style"
>                 href="<html:rewrite forward='extendedCssStyle'/>" />
>         <link id="basicStyleSheet" rel="stylesheet" type="text/css"
> charset="utf-8" title="basic sg-style"
>                 href="<html:rewrite forward='basicCssStyle'/>" />
>
> The basicCssStyle's first line has the statement:
>         @import url(../basic.css);
>
> The idea is that the user of my webapp can edit the extendedCssStyle
> file for her own layout settings. When she updates the webapp she only
> gets a new basicCssStyle file. And because of the order of appearence
> (first extended, then basic css file) the browser will display the
> extended layout first. If the user does not edit the extended style, the
> basic style will be displayed. So far, so idea...
>
> This does work in IE and FireFox 1.0.1 on Windows XP. When I define a
> style in the basic css file, I can see it when I choose the extended
> style, because it is inherited from the basic style.
>
> The problem now is that this does not work in Mozilla 1.7.3 on Windows
> and FireFox 1.0 on Linux. In the same case as above I can't see the
> layout, so it seems that it was not inherited from the basic css file.
> When I switch to the basic style, everythings seems fine and I can see
> the style.
>
> Does anyone know if this is a browser problem? Can I do anything to
> force the import (without copy'n'paste, of course)? Or is there a
> different pattern using Struts for something like that?
>
>    Bernd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> .
>

-- 
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/


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