Re: s:if and locale

2013-09-10 Thread Hernán
I know this works correctly:














On Tue, Sep 10, 2013 at 3:08 PM, Chris Pratt wrote:

> locale.language is just the language, so it will never match the Language
> plus the Country.  If you need to test both you could do:
>
> 
>
> You might even be able to get away with:
>
> 
>
> But I haven't tested it to be sure.
>   (*Chris*)
>
>
> On Tue, Sep 10, 2013 at 12:39 AM, Alireza Fattahi  >wrote:
>
> > Thanks for your solution .
> > The
> > 
> > did not work! I don't know why !
> >
> > But I used your solution which seems much better tahn mine !
> >
> > ~Regards,
> > ~~Alireza Fattahi
> >
> >
> > 
> >  From: Chris 
> > To: Struts Users Mailing List ; Alireza Fattahi
> <
> > afatt...@yahoo.com>; Chris 
> > Sent: Monday, 9 September 2013, 7:49
> > Subject: Re: s:if and locale
> >
> >
> > Hello ,
> > Could you please write how do you define
> >
> > The locale is = ${locale}  //Here the correct locale is displayed!
> > I see in my browser  ( even source code )
> >
> > The locale is =   //Here the correct locale is displayed!
> >
> >
> > 
> > Please try this expresion and tell us if it works
> > 
> >
> > You will have to test your "locale" it in every jsp ?
> > Couldn't you use for example, a global.properties file and struts.xml
> > 
> >
> > in the file global.properties :cssfile=englshstyle.css
> > in the file global_es.properties :cssfile=spanishstyle.css
> > in yourjsp :  > type="text/css" />
> > It works with sample
> >
> http://struts.apache.org/development/2.x/docs/message-resource-files.html
> > but the links are with parameter like  action?request_locale=en
> > and you will need many properties file
> >
> >
> >
> > 
> > HI,
> >
> > I have used the strtuts I18n feature for managing the localization.  The
> > site works fine and the messages are selected from correct resource
> bundels.
> >
> > I have this problem
> >
> > I want to change css base on the user locale.
> > So I use below code in jsp:
> > **
> > The locale is = ${locale}  //Here the correct locale is displayed!
> >  //This condition is always false
> >  
> > 
> > 
> >
> > 
> > **
> >
> > No matter what the locale value is, always the else condition is
> triggered
> > !!
> > The jsp out puts
> > **
> > The locale is=en_US
> >
> > **
> >
> >
> > When I see the Struts ValueStack with  the locale value is
> > correct and is what it has too.
> >
> > Is there any thing wrong with my test conditin please help!
> >
> > ~Regards,
> > ~~Alireza Fattahi
> >
>



-- 
Hernán


Re: Using themes with s: select

2013-09-10 Thread Chris Pratt
Attachments don't appear to work through the mailing list.
  (*Chris*)


On Tue, Sep 10, 2013 at 11:35 AM, Srineel Mazumdar wrote:

> Hi Chris,
>
> Attached the images.
>
> Thanks,
> Srineel
>
>
> On Tue, Sep 10, 2013 at 1:17 PM, Chris Pratt wrote:
>
>> Srineel, your images didn't come through the mail list, any chance you
>> could PasteBin them or put them somewhere else accessible?
>>   (*Chris*)
>>
>>
>> On Tue, Sep 10, 2013 at 7:50 AM, Srineel Mazumdar > >wrote:
>>
>> > Hi Chris,
>> >
>> > Thanks for the help. But the change I need is bit different .
>> >
>> > What I need :
>> >
>> >
>> > [image: Inline image 1]
>> > What I am getting :
>> >
>> > [image: Inline image 2]
>> >
>> > Code for image 1 :
>> >
>> > <%@ include file="IncludeTop.jsp" %>
>> > <%@ taglib prefix="html" uri="
>> http://jakarta.apache.org/struts/tags-html";
>> > %>
>> >
>> > > > method="post" >
>> >
>> > > > bgcolor="#88">
>> > 
>> > Payment Details
>> > 
>> > Card Type:
>> > 
>> >   
>> > 
>> > 
>> >
>> >
>> > Code for image 2 :
>> >
>> > <%@ include file="IncludeTop.jsp" %>
>> > <%@ taglib prefix="html" uri="
>> http://jakarta.apache.org/struts/tags-html";
>> > %>
>> > <%@ taglib prefix="s" uri="/struts-tags" %>
>> >
>> > <%-- > styleId="workingOrderForm"
>> > method="post" > --%>
>> >
>> >  " method="POST">
>> >  
>> >  
>> > 
>> > Payment Details
>> > 
>> > > >  label = "Card Type"
>> > headerKey="-1" headerValue="Cards"
>> >  list="cardTypeList"
>> > name="cards" />
>> >  Please let me know where I am going wrong.
>> >
>> > Thanks,
>> > Srineel
>> >
>> >
>> > On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt > >wrote:
>> >
>> >> Try cssStyle="background-color:yellow;"
>> >>   (*Chris*)
>> >>
>> >>
>> >> On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar > >> >wrote:
>> >>
>> >> > Hi,
>> >> >
>> >> > I am using s:select to create a dropdown and then checked the html. I
>> >> > wanted to add bgcolor as yellow. I referred to the following link
>> >> >
>> >> > http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html
>> >> >
>> >> > but still not sure how to put the background clour as yellow. Can
>> anyone
>> >> > provide any pointers ?
>> >> >
>> >> > Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ?
>> >> >
>> >> > Thanks,
>> >> > Srineel
>> >> >
>> >>
>> >
>> >
>>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>


Re: Using themes with s: select

2013-09-10 Thread Srineel Mazumdar
Hi Chris,

Attached the images.

Thanks,
Srineel


On Tue, Sep 10, 2013 at 1:17 PM, Chris Pratt wrote:

> Srineel, your images didn't come through the mail list, any chance you
> could PasteBin them or put them somewhere else accessible?
>   (*Chris*)
>
>
> On Tue, Sep 10, 2013 at 7:50 AM, Srineel Mazumdar  >wrote:
>
> > Hi Chris,
> >
> > Thanks for the help. But the change I need is bit different .
> >
> > What I need :
> >
> >
> > [image: Inline image 1]
> > What I am getting :
> >
> > [image: Inline image 2]
> >
> > Code for image 1 :
> >
> > <%@ include file="IncludeTop.jsp" %>
> > <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html
> "
> > %>
> >
> >  > method="post" >
> >
> >  > bgcolor="#88">
> > 
> > Payment Details
> > 
> > Card Type:
> > 
> >   
> > 
> > 
> >
> >
> > Code for image 2 :
> >
> > <%@ include file="IncludeTop.jsp" %>
> > <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html
> "
> > %>
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> >
> > <%--  > method="post" > --%>
> >
> >  " method="POST">
> >  
> >  
> > 
> > Payment Details
> > 
> >  >  label = "Card Type"
> > headerKey="-1" headerValue="Cards"
> >  list="cardTypeList"
> > name="cards" />
> >  Please let me know where I am going wrong.
> >
> > Thanks,
> > Srineel
> >
> >
> > On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt  >wrote:
> >
> >> Try cssStyle="background-color:yellow;"
> >>   (*Chris*)
> >>
> >>
> >> On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar  >> >wrote:
> >>
> >> > Hi,
> >> >
> >> > I am using s:select to create a dropdown and then checked the html. I
> >> > wanted to add bgcolor as yellow. I referred to the following link
> >> >
> >> > http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html
> >> >
> >> > but still not sure how to put the background clour as yellow. Can
> anyone
> >> > provide any pointers ?
> >> >
> >> > Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ?
> >> >
> >> > Thanks,
> >> > Srineel
> >> >
> >>
> >
> >
>

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

Re: s:if and locale

2013-09-10 Thread Chris Pratt
locale.language is just the language, so it will never match the Language
plus the Country.  If you need to test both you could do:



You might even be able to get away with:



But I haven't tested it to be sure.
  (*Chris*)


On Tue, Sep 10, 2013 at 12:39 AM, Alireza Fattahi wrote:

> Thanks for your solution .
> The
> 
> did not work! I don't know why !
>
> But I used your solution which seems much better tahn mine !
>
> ~Regards,
> ~~Alireza Fattahi
>
>
> 
>  From: Chris 
> To: Struts Users Mailing List ; Alireza Fattahi <
> afatt...@yahoo.com>; Chris 
> Sent: Monday, 9 September 2013, 7:49
> Subject: Re: s:if and locale
>
>
> Hello ,
> Could you please write how do you define
>
> The locale is = ${locale}  //Here the correct locale is displayed!
> I see in my browser  ( even source code )
>
> The locale is =   //Here the correct locale is displayed!
>
>
> 
> Please try this expresion and tell us if it works
> 
>
> You will have to test your "locale" it in every jsp ?
> Couldn't you use for example, a global.properties file and struts.xml
> 
>
> in the file global.properties :cssfile=englshstyle.css
> in the file global_es.properties :cssfile=spanishstyle.css
> in yourjsp :  type="text/css" />
> It works with sample
> http://struts.apache.org/development/2.x/docs/message-resource-files.html
> but the links are with parameter like  action?request_locale=en
> and you will need many properties file
>
>
>
> 
> HI,
>
> I have used the strtuts I18n feature for managing the localization.  The
> site works fine and the messages are selected from correct resource bundels.
>
> I have this problem
>
> I want to change css base on the user locale.
> So I use below code in jsp:
> **
> The locale is = ${locale}  //Here the correct locale is displayed!
>  //This condition is always false
>  
> 
> 
>
> 
> **
>
> No matter what the locale value is, always the else condition is triggered
> !!
> The jsp out puts
> **
> The locale is=en_US
>
> **
>
>
> When I see the Struts ValueStack with  the locale value is
> correct and is what it has too.
>
> Is there any thing wrong with my test conditin please help!
>
> ~Regards,
> ~~Alireza Fattahi
>


Re: Using themes with s: select

2013-09-10 Thread Chris Pratt
Srineel, your images didn't come through the mail list, any chance you
could PasteBin them or put them somewhere else accessible?
  (*Chris*)


On Tue, Sep 10, 2013 at 7:50 AM, Srineel Mazumdar wrote:

> Hi Chris,
>
> Thanks for the help. But the change I need is bit different .
>
> What I need :
>
>
> [image: Inline image 1]
> What I am getting :
>
> [image: Inline image 2]
>
> Code for image 1 :
>
> <%@ include file="IncludeTop.jsp" %>
> <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html";
> %>
>
>  method="post" >
>
>  bgcolor="#88">
> 
> Payment Details
> 
> Card Type:
> 
>   
> 
> 
>
>
> Code for image 2 :
>
> <%@ include file="IncludeTop.jsp" %>
> <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html";
> %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <%--  method="post" > --%>
>
>  " method="POST">
>  
>  
> 
> Payment Details
> 
>   label = "Card Type"
> headerKey="-1" headerValue="Cards"
>  list="cardTypeList"
> name="cards" />
>  Please let me know where I am going wrong.
>
> Thanks,
> Srineel
>
>
> On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt wrote:
>
>> Try cssStyle="background-color:yellow;"
>>   (*Chris*)
>>
>>
>> On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar > >wrote:
>>
>> > Hi,
>> >
>> > I am using s:select to create a dropdown and then checked the html. I
>> > wanted to add bgcolor as yellow. I referred to the following link
>> >
>> > http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html
>> >
>> > but still not sure how to put the background clour as yellow. Can anyone
>> > provide any pointers ?
>> >
>> > Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ?
>> >
>> > Thanks,
>> > Srineel
>> >
>>
>
>


Re: Using themes with s: select

2013-09-10 Thread Srineel Mazumdar
Hi Chris,

Thanks for the help. But the change I need is bit different .

What I need :


[image: Inline image 1]
What I am getting :

[image: Inline image 2]

Code for image 1 :

<%@ include file="IncludeTop.jsp" %>
<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"; %>





Payment Details

Card Type:

  




Code for image 2 :

<%@ include file="IncludeTop.jsp" %>
<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"; %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%--  --%>

 " method="POST">
 
 

Payment Details


Please let me know where I am going wrong.

Thanks,
Srineel


On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt  wrote:

> Try cssStyle="background-color:yellow;"
>   (*Chris*)
>
>
> On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar  >wrote:
>
> > Hi,
> >
> > I am using s:select to create a dropdown and then checked the html. I
> > wanted to add bgcolor as yellow. I referred to the following link
> >
> > http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html
> >
> > but still not sure how to put the background clour as yellow. Can anyone
> > provide any pointers ?
> >
> > Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ?
> >
> > Thanks,
> > Srineel
> >
>


RE: Websphere specific config

2013-09-10 Thread Martin Gainty
while we are on that subject i took a weekend to locate a workable copy of 
wsadmin.sh

the contents of which are illustrated below

 

MG> start wsadmin.sh script

 

#!/usr/bin/bash --debug
# example wsadmin launcher
# WAS_HOME should point to the directory for the thin client
JAVA_HIGH_ZIPFDS="0"
WAS_HOME="/IBM/ThinClient"
USER_INSTALL_ROOT="/IBM/ThinClient"
# JAVA_HOME should point to where java is installed for the thin client
#JAVA_HOME="$WAS_HOME/java"
WAS_LOGGING="-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager 
-Djava.util.logging.configureByServer=true"
if [[ -f ${JAVA_HOME}/bin/java ]]; then
   JAVA_EXE="${JAVA_HOME}/bin/java"
else
   JAVA_EXE="${JAVA_HOME}/jre/bin/java"
fi
# For debugging the utility itself
# WAS_DEBUG=-Djava.compiler="NONE -Xdebug -Xnoagent -

# the usual JMX Admin client is accessed via SOAP (thus the reference on 
soap.client.props)

Xrunjdwp:transport=dt_socket,server=y,suspend=y,address="
CLIENTSOAP="-Dcom.ibm.SOAP.ConfigURL=file:${USER_INSTALL_ROOT}/properties/soap.client.props"
CLIENTSAS="-Dcom.ibm.CORBA.ConfigURL=file:${USER_INSTALL_ROOT}/properties/sas.client.props"
CLIENTSSL="-Dcom.ibm.SSL.ConfigURL=file:${USER_INSTALL_ROOT}/properties/ssl.client.props"
CLIENTIPC="-Dcom.ibm.IPC.ConfigURL=file:${USER_INSTALL_ROOT}/properties/ipc.client.props"
# the following are wsadmin property 
# you need to change the value to enabled to turn on trace
wsadminTraceString=-Dcom.ibm.ws.scripting.traceString=com.ibm.*=all=enabled
wsadminTraceFile=-Dcom.ibm.ws.scripting.traceFile=${USER_INSTALL_ROOT}/logs/wsadmin.traceout
wsadminValOut=-Dcom.ibm.ws.scripting.validationOutput=${USER_INSTALL_ROOT}/logs/wsadmin.valout
# this will be the server host that you will be connecting to
#wsadminHost=-Dcom.ibm.ws.scripting.host=myhost.warzawa.ibm.com
wsadminHost=-Dcom.ibm.ws.scripting.host=localhost
# you need to make sure the port number is the server SOAP port number you want 
to connect to, in this example the server SOAP port is 8875
wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=SOAP
wsadminPort=-Dcom.ibm.ws.scripting.port=8875
# you need to make sure the port number is the server RMI port number you want 
to connect to, in this example the #server RMI port is 2811
#wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=RMI
#wsadminPort=-Dcom.ibm.ws.scripting.port=2811
# you need to make sure the port number is the server JSR160RMI port number you 
want to connect to, in this example #the server JSR160RMI port is 2811
#wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=JSR160RMI
#wsadminPort=-Dcom.ibm.ws.scripting.port=2811
# you need to make sure the port number is the server IPC port number you want 
to connect to, in this example the #server IPC port is 9630..be aware under 
Windows.. IPC uses "Windows specific RPC"
#wsadminHost=-Dcom.ibm.ws.scripting.ipchost=localhost
#wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=IPC
#wsadminPort=-Dcom.ibm.ws.scripting.port=9630
# specify what language you want to use with wsadmin
wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jacl
#wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jython

#make SURE com.ibm.ws.admin.client_.jar is on CLASSPATH to invoke 
WasXShell
SHELL=com.ibm.ws.scripting.WasxShell
# If wsadmin properties is set, use it
if [[ -n "${WSADMIN_PROPERTIES+V}" ]]; then
 
WSADMIN_PROPERTIES_PROP="-Dcom.ibm.ws.scripting.wsadminprops=${WSADMIN_PROPERTIES}"
else
 # Not set, do not use it
 WSADMIN_PROPERTIES_PROP=
fi
# If config consistency check is set, use it
if [[ -n "${CONFIG_CONSISTENCY_CHECK+V}" ]]; then
 
WORKSPACE_PROPERTIES="-Dconfig_consistency_check=${CONFIG_CONSISTENCY_CHECK}"
else
 WORKSPACE_PROPERTIES=
fi
# Parse the input arguments
isJavaOption=false
nonJavaOptionCount=1
# for option in "$@";
# do
  if [ "$option" = "-javaoption" ] ; then
 isJavaOption=true
  fi
#  else
  if [ "$isJavaOption" = "true" ] ; then
javaOption="$javaOption $option"
isJavaOption=false
  fi
#  else
  if [ "$nonJavaOption[$nonJavaOptionCount]"="$option" ] ; then
nonJavaOptionCount=$((nonJavaOptionCount+1))
  fi
# done
DELIM=" "
C_PATH="/IBM/ThinClient/com.ibm.ws.admin.client_8.5.0.jar:/IBM/Websphere/AppServer/plugins/com.ibm.ws.admin.services.jar:${WAS_HOME}/properties:${WAS_HOME}/com.ibm.ws.admin.client_7.0.0.jar:${WAS_HOME}/com.ibm.ws.security.crypto.jar"
#Platform specific args...
PLATFORM=`/usr/root/bin/uname.exe`
case $PLATFORM in
  AIX® | Linux® | SunOS | HP-UX)
CONSOLE_ENCODING=-Dws.output.encoding=console ;;
  OS/390®)
CONSOLE_ENCODING=-Dfile.encoding=ISO8859-1
EXTRA_X_ARGS="-Xnoargsconversion" ;;
esac
# Set java options for performance
PLATFORM=`/usr/root/bin/uname.exe`
case $PLATFORM in
  AIX)
  PERF_JVM_OPTIONS="-Xms256m -Xmx256m -Xquickstart" ;;
  Linux)
  PERF_JVM_OPTIONS="-Xms256m -Xmx256m -Xj9 -Xquickstart" ;;
  SunOS)
  PERF_JVM_OPTIONS="-Xms256m -Xmx256m -XX:PermSize=40m" ;;
  HP-UX)
  PERF_JVM_OPTIONS="-Xms256m -Xmx256m -XX:PermSize=4

Re: Re: Websphere specific config

2013-09-10 Thread Lukasz Lenart
Done!

https://cwiki.apache.org/confluence/display/WW/WebSphere

Thanks!

2013/9/10 Lukasz Lenart :
> I'm going update it but I wanted to know the version - as you see it matters 
> ;-)
>
> 2013/9/10 Christoph Nenning :
>>> Can you post more details about Websphere version?
>>>
>>>
>>
>> Well, I'm a little embarrassed to say this.
>>
>> We still use the old WebSphere 6.5 in production. For this one it is
>> required.
>>
>>
>> Your question made me test it in current WebSphere 8.5, and suprise: it is
>> not required anymore.
>>
>> So, that means I can throw it out of our deployment scripts (at least for
>> the new server).
>> And you can forget about it.
>>
>>
>>
>> On the other hand, that wiki page is quite outdated and you may want to
>> remove it.
>>
>>
>>
>> Regards,
>> Christoph
>>
>> This Email was scanned by Sophos Anti Virus

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



Re: Re: Websphere specific config

2013-09-10 Thread Lukasz Lenart
I'm going update it but I wanted to know the version - as you see it matters ;-)

2013/9/10 Christoph Nenning :
>> Can you post more details about Websphere version?
>>
>>
>
> Well, I'm a little embarrassed to say this.
>
> We still use the old WebSphere 6.5 in production. For this one it is
> required.
>
>
> Your question made me test it in current WebSphere 8.5, and suprise: it is
> not required anymore.
>
> So, that means I can throw it out of our deployment scripts (at least for
> the new server).
> And you can forget about it.
>
>
>
> On the other hand, that wiki page is quite outdated and you may want to
> remove it.
>
>
>
> Regards,
> Christoph
>
> This Email was scanned by Sophos Anti Virus

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



Antwort: Re: Websphere specific config

2013-09-10 Thread Christoph Nenning
> Can you post more details about Websphere version?
> 
> 

Well, I'm a little embarrassed to say this.

We still use the old WebSphere 6.5 in production. For this one it is 
required.


Your question made me test it in current WebSphere 8.5, and suprise: it is 
not required anymore.

So, that means I can throw it out of our deployment scripts (at least for 
the new server).
And you can forget about it.



On the other hand, that wiki page is quite outdated and you may want to 
remove it.



Regards,
Christoph

This Email was scanned by Sophos Anti Virus


Re: Websphere specific config

2013-09-10 Thread Lukasz Lenart
Can you post more details about Websphere version?


Thanks in advance
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/9/10 Christoph Nenning :
> Dear List,
>
>
> to make struts2 work in Websphere, one has to set Websphere specific
> properties, you may want to add that to the wiki:
>
> https://struts.apache.org/release/2.3.x/docs/websphere.html
>
>
>
> The properties are:
> com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true
> com.ibm.ws.webcontainer.invokefilterscompatibility = true
>
> At least that is necessary when using StrutsPrepareAndExecuteFilter.
>
>
> In Websphre admin console one has to add those properties here:
>
> Servers > Application servers > {server name} > Web container > Custom
> Properties
>
>
>
> A wsadmin jython script to set those properties could look like this:
>
>
>
>
>
> def findObjectName(objectId):
> index = objectId.find('(')
> return objectId[0 : index]
>
>
> node = AdminNodeManagement.listNodes()[0]
> server = AdminConfig.list('Server')
>
> nodeName = findObjectName(node)
> serverName = findObjectName(server)
>
> webContainer = AdminConfig.list('WebContainer', node)
> webContainerDetails = AdminConfig.show(webContainer)
>
> if
> webContainerDetails.find("com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror")
> == -1:
> print "creating prop:
> com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror"
> AdminServerManagement.configureCustomProperty(nodeName,
> serverName, "WebContainer",
> "com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror", "true")
> if
> webContainerDetails.find("com.ibm.ws.webcontainer.invokefilterscompatibility")
> == -1:
> print "creating prop:
> com.ibm.ws.webcontainer.invokefilterscompatibility"
> AdminServerManagement.configureCustomProperty(nodeName,
> serverName, "WebContainer",
> "com.ibm.ws.webcontainer.invokefilterscompatibility", "true")
>
>
>
>
> Regards,
> Christoph
>
> This Email was scanned by Sophos Anti Virus

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



Websphere specific config

2013-09-10 Thread Christoph Nenning
Dear List,


to make struts2 work in Websphere, one has to set Websphere specific 
properties, you may want to add that to the wiki:

https://struts.apache.org/release/2.3.x/docs/websphere.html



The properties are:
com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true
com.ibm.ws.webcontainer.invokefilterscompatibility = true

At least that is necessary when using StrutsPrepareAndExecuteFilter.


In Websphre admin console one has to add those properties here:

Servers > Application servers > {server name} > Web container > Custom 
Properties 



A wsadmin jython script to set those properties could look like this:





def findObjectName(objectId):
index = objectId.find('(')
return objectId[0 : index]


node = AdminNodeManagement.listNodes()[0]
server = AdminConfig.list('Server')

nodeName = findObjectName(node)
serverName = findObjectName(server)

webContainer = AdminConfig.list('WebContainer', node)
webContainerDetails = AdminConfig.show(webContainer)

if 
webContainerDetails.find("com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror")
 
== -1:
print "creating prop: 
com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror"
AdminServerManagement.configureCustomProperty(nodeName, 
serverName, "WebContainer", 
"com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror", "true")
if 
webContainerDetails.find("com.ibm.ws.webcontainer.invokefilterscompatibility") 
== -1:
print "creating prop: 
com.ibm.ws.webcontainer.invokefilterscompatibility"
AdminServerManagement.configureCustomProperty(nodeName, 
serverName, "WebContainer", 
"com.ibm.ws.webcontainer.invokefilterscompatibility", "true")




Regards,
Christoph

This Email was scanned by Sophos Anti Virus


Re: s:if and locale

2013-09-10 Thread Chris
Hello, 


When you said : "But I used your solution" Did you mean with parameters in the 
links like the sample ? 
http://struts.apache.org/development/2.x/docs/message-resource-files.html
This sample works with the second jsp, called register.jsp , with links and 
parameter given in the first jsp , called index.jsp
like this :

Please register for our prize drawing.
    
http://localhost:/message_resource/registerInput.action;jsessionid=xxx?request_locale=en

I don't know if I'll have to work with country's parameter in links

But for your example, do you have to find the user's country ? I mean with his 
browser or when he send his parameter himself with the link ( like the sample)

Or do you use the server's value , Locale.getDefault(), ...so the same for 
everybody ?





 Thanks for your solution .
The 
 
did not work! I don't know why !

But I used your solution which seems much better tahn mine !

~Regards,
~~Alireza Fattahi



From: Chris 
To: Struts Users Mailing List ; Alireza Fattahi 
; Chris  
Sent: Monday, 9 September 2013, 7:49
Subject: Re: s:if and locale
  

Hello ,
Could you please write how do you define 

The locale is = ${locale}  //Here the correct locale is displayed!
I see in my browser  ( even source code ) 

The locale is =   //Here the correct locale is displayed!



Please try this expresion and tell us if it works
 

You will have to test your "locale" it in every jsp ? 
Couldn't you use for example, a global.properties file and struts.xml


in the file global.properties :cssfile=englshstyle.css
in the file global_es.properties :cssfile=spanishstyle.css
in yourjsp :  
It works with sample 
http://struts.apache.org/development/2.x/docs/message-resource-files.html
but the links are with parameter like  action?request_locale=en
and you will need many properties file  




HI,
 
I have used the strtuts I18n feature for managing the localization.  The site 
works fine and the messages are selected from correct resource bundels.
 
I have this problem
 
I want to change css base on the user locale.
So I use below code in jsp:
**
The locale is = ${locale}  //Here the correct locale is displayed!
 //This condition is always false
 


   

**

No matter what the locale value is, always the else condition is triggered !!
The jsp out puts 
**
The locale is=en_US
   
**


When I see the Struts ValueStack with  the locale value is correct 
and is what it has too.

Is there any thing wrong with my test conditin please help!

~Regards,
~~Alireza Fattahi

Re: Possible bug in URL validator

2013-09-10 Thread Lukasz Lenart
2013/9/5 Bruno Klava :
> Hi folks,
>
> in Struts 2.3.15 the form-close-validate.ftl template was updated to use
> the regex field, but there is no such field in
> com.opensymphony.xwork2.validator.annotations.UrlValidator neither a
> default value for it
> in com.opensymphony.xwork2.validator.validators.URLValidator (like is done
> in com.opensymphony.xwork2.validator.validators.EmailValidator).
>
> Or am I missing something?

It's a bug - there is no option to set regex in URLValidator as it
bases on URLUtil and URL directly.

> My current workaround: override the form-close-validate.ftl setting the
> regex directly in the template code.
>
> A better solution would be: make
> com.opensymphony.xwork2.validator.validators.URLValidator
> extends com.opensymphony.xwork2.validator.validators.RegexFieldValidator
> and set a default value for regex in
> com.opensymphony.xwork2.validator.validators.URLValidator.
> An interesting improvement would be to expose the regex field in the
> UrlValidator and EmailValidator annotations to be set in custom scenarios.

Please register an issue.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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



Re: s:if and locale

2013-09-10 Thread Alireza Fattahi
Thanks for your solution .
The 
 
did not work! I don't know why !

But I used your solution which seems much better tahn mine !

~Regards,
~~Alireza Fattahi
 


 From: Chris 
To: Struts Users Mailing List ; Alireza Fattahi 
; Chris  
Sent: Monday, 9 September 2013, 7:49
Subject: Re: s:if and locale
  

Hello ,
Could you please write how do you define 

The locale is = ${locale}  //Here the correct locale is displayed!
I see in my browser  ( even source code ) 

The locale is =   //Here the correct locale is displayed!



Please try this expresion and tell us if it works
 

You will have to test your "locale" it in every jsp ? 
Couldn't you use for example, a global.properties file and struts.xml


in the file global.properties :cssfile=englshstyle.css
in the file global_es.properties :cssfile=spanishstyle.css
in yourjsp :  
It works with sample 
http://struts.apache.org/development/2.x/docs/message-resource-files.html
but the links are with parameter like  action?request_locale=en
and you will need many properties file  




HI,
 
I have used the strtuts I18n feature for managing the localization.  The site 
works fine and the messages are selected from correct resource bundels.
 
I have this problem
 
I want to change css base on the user locale.
So I use below code in jsp:
**
The locale is = ${locale}  //Here the correct locale is displayed!
 //This condition is always false
 


   

**

No matter what the locale value is, always the else condition is triggered !!
The jsp out puts 
**
The locale is=en_US
   
**


When I see the Struts ValueStack with  the locale value is correct 
and is what it has too.

Is there any thing wrong with my test conditin please help!

~Regards,
~~Alireza Fattahi

Antwort: Re: Re: Framework provided text key resolving issue

2013-09-10 Thread Christoph Nenning
> 
> Done, resolved!
> 

Awesome, thanks :)





> 2013/9/10 Christoph Nenning :
> >> 2013/9/9 Christoph Nenning :
> >> > In this case the following happens:
> >> > - struts2's algorithm is performed (search packages hierarchically)
> >> > - for global resources the JVM tries the file
> >> > "struts-messages_en.properties" which is not present
> >> > - then the JVM tries the language from system property 
"user.language"
> >> > which is "de" in my case
> >> > - a file for that locale is present and hence I get the german text
> >> > instead of the requested english one
> >>
> >> This is strange, struts-messages bundle should be investigate fully -
> >> first _en then default one. Which JVM version do you use?
> >>
> >
> > Oh, yes that is surely the problem.
> > We use IBM WebSphere with an IBM JVM.
> >
> > Sorry, didn't think about that.
> >
> >
> >
> >> > We provide our application texts for english in 2 files (of course
> >> > scripted):
> >> > - bundle.properties
> >> > - bundle_en.properties
> >> >
> >> > I propose as workaround that english framework texts are provided 
the
> > same
> >> > way in 2 files.
> >>
> >> Can you register issue for that?
> >>
> >>
> >
> > Done:
> >
> > https://issues.apache.org/jira/browse/WW-4195
> >
> > This Email was scanned by Sophos Anti Virus
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

This Email was scanned by Sophos Anti Virus


Re: Re: Framework provided text key resolving issue

2013-09-10 Thread Lukasz Lenart
Done, resolved!

2013/9/10 Christoph Nenning :
>> 2013/9/9 Christoph Nenning :
>> > In this case the following happens:
>> > - struts2's algorithm is performed (search packages hierarchically)
>> > - for global resources the JVM tries the file
>> > "struts-messages_en.properties" which is not present
>> > - then the JVM tries the language from system property "user.language"
>> > which is "de" in my case
>> > - a file for that locale is present and hence I get the german text
>> > instead of the requested english one
>>
>> This is strange, struts-messages bundle should be investigate fully -
>> first _en then default one. Which JVM version do you use?
>>
>
> Oh, yes that is surely the problem.
> We use IBM WebSphere with an IBM JVM.
>
> Sorry, didn't think about that.
>
>
>
>> > We provide our application texts for english in 2 files (of course
>> > scripted):
>> > - bundle.properties
>> > - bundle_en.properties
>> >
>> > I propose as workaround that english framework texts are provided the
> same
>> > way in 2 files.
>>
>> Can you register issue for that?
>>
>>
>
> Done:
>
> https://issues.apache.org/jira/browse/WW-4195
>
> This Email was scanned by Sophos Anti Virus

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



Antwort: Re: Framework provided text key resolving issue

2013-09-10 Thread Christoph Nenning
> 2013/9/9 Christoph Nenning :
> > In this case the following happens:
> > - struts2's algorithm is performed (search packages hierarchically)
> > - for global resources the JVM tries the file
> > "struts-messages_en.properties" which is not present
> > - then the JVM tries the language from system property "user.language"
> > which is "de" in my case
> > - a file for that locale is present and hence I get the german text
> > instead of the requested english one
> 
> This is strange, struts-messages bundle should be investigate fully -
> first _en then default one. Which JVM version do you use?
> 

Oh, yes that is surely the problem.
We use IBM WebSphere with an IBM JVM.

Sorry, didn't think about that.



> > We provide our application texts for english in 2 files (of course
> > scripted):
> > - bundle.properties
> > - bundle_en.properties
> >
> > I propose as workaround that english framework texts are provided the 
same
> > way in 2 files.
> 
> Can you register issue for that?
> 
> 

Done:

https://issues.apache.org/jira/browse/WW-4195

This Email was scanned by Sophos Anti Virus