You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kal stevens <ka...@gmail.com> on 2008/05/06 02:35:20 UTC

struts2 migration

My company has migrated from struts1 to struts2, and we have had a few
continual problems that we can not figure out how to deal with.

First when we redeploy our application we have to remove everything in the
work/Catalina directory, or the application may not be redeployed correctly.

we have tried both a symbolic link from the webapps directory to a war file,
and from the webapps directory to an exploded directory.

Can someone point me to any information on how to fix this?  or what might
be causing the issue.

Another issue is that when someone types in a bogus url we get an entry in
the log4j logging

So if someone types in www.example.com/member/visitors.do

we get

2008-05-05 17:23:31,898 ERROR [Dispatcher] Could not find action or result
There is no Action mapped for namespace /member and action name visitors. -
[unknown location]


Is there a recommended way of dealing with this?
My boss wants no errors in the logfile.

Kal

Re: struts2 migration

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
kal stevens wrote:
> We  use EL/JSP in some of our pages,  and I have been told by a coworker
> that after 2.0.9 EL is disabled.
> So moving would be difficult, unless there is some way to re-enable it?
> What is the standard way of referencing variables.
>
>   
EL expressions are disabled within the attributes of struts2 tags.
EL can use used elsewhere on the page.
The OGNL used by struts tags can reference variables in the page 
context, request, session, application, action or valuestack, so in 
almost all cases there's a reasonable way to reference the same variable 
in EL and OGNL (see the #attr OGNL expression)

> My boss prefers that I not disable errors, is there a way to disable it for
>
> log4j.rootLogger=ERROR, file1
>
> and enable it for another file?  When I tried this, I got a "Duplicate
> property key" error.
>
> log4j.logger.org.apache.struts2.dispatcher.Dispatcher=OFF,file1
> log4j.logger.org.apache.struts2.dispatcher.Dispatcher=WARN,struts
>
>   
Sorry, you'll need to check the documentation for log4j.  Yes, it's 
should be possible.


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


Re: struts2 migration

Posted by kal stevens <ka...@gmail.com>.
We  use EL/JSP in some of our pages,  and I have been told by a coworker
that after 2.0.9 EL is disabled.
So moving would be difficult, unless there is some way to re-enable it?
What is the standard way of referencing variables.

My boss prefers that I not disable errors, is there a way to disable it for

log4j.rootLogger=ERROR, file1

and enable it for another file?  When I tried this, I got a "Duplicate
property key" error.

log4j.logger.org.apache.struts2.dispatcher.Dispatcher=OFF,file1
log4j.logger.org.apache.struts2.dispatcher.Dispatcher=WARN,struts


On Mon, May 5, 2008 at 6:44 PM, Jeromy Evans <
jeromy.evans@blueskyminds.com.au> wrote:

> kal stevens wrote:
>
> > My company has migrated from struts1 to struts2, and we have had a few
> > continual problems that we can not figure out how to deal with.
> >
> > First when we redeploy our application we have to remove everything in
> > the
> > work/Catalina directory, or the application may not be redeployed
> > correctly.
> >
> > we have tried both a symbolic link from the webapps directory to a war
> > file,
> > and from the webapps directory to an exploded directory.
> >
> > Can someone point me to any information on how to fix this?  or what
> > might
> > be causing the issue.
> >
> >
> >
> Struts2 leaves some threadlocals active that prevent it from shutting down
> cleanly.
> There is no fix in 2.0.11.x.  There is a fix in 2.1.x.
>
> https://issues.apache.org/struts/browse/WW-2167
>
>
> If there is a 2.0.12 release I'd vote for this 'fix' to be applied.
>
>  Another issue is that when someone types in a bogus url we get an entry
> > in
> > the log4j logging
> >
> > So if someone types in www.example.com/member/visitors.do
> >
> > we get
> >
> > 2008-05-05 17:23:31,898 ERROR [Dispatcher] Could not find action or
> > result
> > There is no Action mapped for namespace /member and action name
> > visitors. -
> > [unknown location]
> >
> >
> > Is there a recommended way of dealing with this?
> >
> >
> Change the setting for log4j.  Set the logging level for
> org.apache.struts2.dispatcher.Dispatcher to none.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: struts2 migration

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
kal stevens wrote:
> My company has migrated from struts1 to struts2, and we have had a few
> continual problems that we can not figure out how to deal with.
>
> First when we redeploy our application we have to remove everything in the
> work/Catalina directory, or the application may not be redeployed correctly.
>
> we have tried both a symbolic link from the webapps directory to a war file,
> and from the webapps directory to an exploded directory.
>
> Can someone point me to any information on how to fix this?  or what might
> be causing the issue.
>
>   
Struts2 leaves some threadlocals active that prevent it from shutting 
down cleanly.
There is no fix in 2.0.11.x.  There is a fix in 2.1.x.

https://issues.apache.org/struts/browse/WW-2167


If there is a 2.0.12 release I'd vote for this 'fix' to be applied.

> Another issue is that when someone types in a bogus url we get an entry in
> the log4j logging
>
> So if someone types in www.example.com/member/visitors.do
>
> we get
>
> 2008-05-05 17:23:31,898 ERROR [Dispatcher] Could not find action or result
> There is no Action mapped for namespace /member and action name visitors. -
> [unknown location]
>
>
> Is there a recommended way of dealing with this?
>   
Change the setting for log4j.  Set the logging level for 
org.apache.struts2.dispatcher.Dispatcher to none.



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