Re: OutOfMemoryError: PermGen space!!!! Dont know why?

2010-07-13 Thread RogerV
abhishek jain-11 wrote: Hi friends, I need urgent help, i have developed an application but when i run that on server i get the following error, I am using Tomcat 5.5 and Struts 1.1 , i develpoed application using Myeclipse, do i need to optimize application by removing some libraries

how can i get the validation in japanese

2010-07-13 Thread Salish S
Hi all I'm facing a problem , in a sample there is a username and password there two has to show in japanese if the user didnt enter the values the validation also has also be shown in japanese i had changed the page encoding ,changed to validation.xml to property file there also on saving eclise

Session error while loading an object

2010-07-13 Thread abhishek jain
Hi friends, I am using tomcat 5.5 , struts 1.x and i encounter the following error: I actually store the object in session and retrieve that(for a shopping cart application), pl. advice what i can do to remove this error: Exception loading sessions from persistent

Model Driven Preparable

2010-07-13 Thread Amol Ghotankar
Dear List members, I have implemented model driven prepare able interface in S2, also included interceptor stack My method call flow is 1.prepare 2.getModel 3.getModel Why does getModel gets called twice. Is it to useful to call it twice or is my config setting wrong somewhere. Also I

RE: how can i get the validation in japanese

2010-07-13 Thread Martin Gainty
UTF-8 wont handle dbcs or tbcs languages i would suggest change all encodings (parameter and file,input and output) to UTF-16 ?xml version=1.0 encoding=UTF-8 ? change all XML declaration tags for all XML files to UTF-16 e.g. ?xml version=1.0 encoding=UTF-16 ? freemarker and velocity

result-type using annotations

2010-07-13 Thread JP Cafaro
Is it possible to declare result-type using annotations? For example, when trying to return an object, that gets serialized to json, is it possible to move away from the struts.xml result-type and do it via annotations - To

Struts2 validation

2010-07-13 Thread kisja
I have two textfield and I would like to validate that at least one of both have data. How I can do? (I apologize for my bad English) Thanks -- View this message in context: http://old.nabble.com/Struts2-validation-tp29149892p29149892.html Sent from the Struts - User mailing list archive at

Re: Struts2 validation

2010-07-13 Thread jake
You can use the fieldexpression validator. See http://struts.apache.org/2.1.8.1/docs/fieldexpression-validator.html for details. On Tue, Jul 13, 2010 at 05:39:52AM -0700, kisja wrote: I have two textfield and I would like to validate that at least one of both have data. How I can do?

Re: Session error while loading an object

2010-07-13 Thread Robert Taylor
Greetings, Does the Customer object implement Serializable interface? If not, try modifying Customer to implement Serializable and see if the error still persists. /robert - Original Message - From: abhishek jain abhishek.netj...@gmail.com To: Struts Users Mailing List

Re: Struts2 remote commands execution

2010-07-13 Thread Greg Lindholm
Thanks for pushing this, your right it is critical and needs to be fixed asap. On Sat, Jul 10, 2010 at 4:02 AM, Meder Kydyraliev mede...@gmail.com wrote: There's a critical remote commands execution vulnerability in XWork(used by Struts2), which fixed in 2.2.0, which isn't released yet but can

Re: Struts2 remote commands execution

2010-07-13 Thread Johannes Geppert
is version 2.2.0 also available with maven? Johannes Meder Kydyraliev-2 wrote: There's a critical remote commands execution vulnerability in XWork(used by Struts2), which fixed in 2.2.0, which isn't released yet but can be downloaded here: http://people.apache.org/builds/struts/2.2.0/

Re: Javascript issues

2010-07-13 Thread Fabio Alves de Araujo Ebner - DnaSolution
Hey man, did u see the email i send? with my class and struts.xml?? tks - Original Message - From: JP Cafaro jcafar...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Monday, July 12, 2010 2:38 PM Subject: Re: Javascript issues I think the problem has to do with

Re: Help Struts2 + interceptor

2010-07-13 Thread JP Cafaro
I'm fairly new to this myself so maybe someone else can jump in. First things first, put a print statement in the intercept methods of your interceptors so you at least know if the interceptor is even getting called. Secondly, I didn't ever use a line like this:interceptorRefs = {

Re: Help Struts2 + interceptor

2010-07-13 Thread Fabio Alves de Araujo Ebner - DnaSolution
The problem is: When he pass through interceptor and go to action cadastrarOrdemServico my var cdProjetoOS are set with null :( thanks, follow my all code: CLASS LoginClienteInterceptor .java --- package br.com.dnasolution.site.interceptor;

Re: Session error while loading an object

2010-07-13 Thread abhishek jain
Hi, thanks for the comments, i will check but i get this error only at times, and not always. Can this still be the cause of the problem. thanks abhishek On Tue, Jul 13, 2010 at 6:39 PM, Robert Taylor rtay...@dtgresults.comwrote: Greetings, Does the Customer object implement Serializable

Re: Struts2 remote commands execution

2010-07-13 Thread Lukasz Lenart
2010/7/13 Johannes Geppert jo...@web.de: is version 2.2.0 also available with maven? Not yet, still in stagging repo only and still under the Vote :-( Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl

How to use indexOf in s:if using struts2.

2010-07-13 Thread sharath karnati
Hi All,      Say I have an String[] colors which is populated with thse values{red,blue,green,yellow,white,black}, the colors are declared in action class.      I have an colorList(java.util.ListString) which is having all colors. In UI when I use s:iterator for looping colorList, when color

Re: How to modify Struts2 start up process.

2010-07-13 Thread Chris Pratt
It's being called twice because, since you defined it as scope=singleton, Spring is creating a singleton instance for you automatically on start-up. Then your code is creating another instance in your getStartupService() method. You don't need to explicitly instantiate one, just let Spring inject

Re: Currency Formatting

2010-07-13 Thread Chris Miles
At the moment I have in my struts.xml constant name=struts.custom.i18n.resources value=ApplicationResources / ApplicationResources.properties is being packaged within WEB-INF\classes within a WAR within an EAR. The file contains: format.currency={0,number,currency} In my JSP I have s:text

Re: Currency Formatting

2010-07-13 Thread Chris Pratt
try s:param instead of s:property. (*Chris*) On Tue, Jul 13, 2010 at 12:11 PM, Chris Miles ch...@chrismiles.org wrote: At the moment I have in my struts.xml constant name=struts.custom.i18n.resources value=ApplicationResources / ApplicationResources.properties is being packaged within

Re: How to modify Struts2 start up process.

2010-07-13 Thread hisameer
So basically you are saying is that remove scope=singleton right? Chris Pratt wrote: It's being called twice because, since you defined it as scope=singleton, Spring is creating a singleton instance for you automatically on start-up. Then your code is creating another instance in your

Re: How to modify Struts2 start up process.

2010-07-13 Thread Chris Pratt
Umm, no I'm saying let Spring manage the singleton, you don't need to do it yourself. Especially since the original question was how to have it created at initialization time. If you remove scope=prototype, it won't be auto-created for you, and you will have defeated the whole point. (*Chris*)

Problem with using json plugin

2010-07-13 Thread JP Cafaro
I was trying to use the json plugin that's bundled with struts but I'm running into a few snags. Firstly, I like using annotations whenever possible so this is what my struts.xml looks like: struts constant name=struts.devMode value=true / !-- Declare global results in this package

Where to find struts.xml documentation

2010-07-13 Thread Ken
I am looking for documentation for the struts.xml configuration file. Are there different tags for different versions of struts.xml? I'm using struts 2.1.8.1

Re: How to modify Struts2 start up process.

2010-07-13 Thread hisameer
Thanks for the input. The default scope is Singleton anyway. Also I am not calling getStartUPService() method in my application. I have deleted this method. But keeping the scope to singleton and init-method=init. The init method is called twice. Not able to figure that out. I know something is

Re: How to modify Struts2 start up process.

2010-07-13 Thread Chris Pratt
One thing I find odd is that you're creating a static reference to an instance of your class, from an instance of your class, why? Spring has already created and is managing an instance for you, there's no reason to instantiate a second singleton instance (kinda defeats the whole singleton thing

Re: Currency Formatting

2010-07-13 Thread Chris Miles
Chris, Hi that works perfectly for s:text name=format.currencys:param value=total//s:text where total is public Double getTotal but causes all rendering to stop at the following within an iterator. s:text name=format.currencys:param value=#product.price/ where ListProduct getProducts (for

Re: Currency Formatting

2010-07-13 Thread Chris Pratt
s:iterator puts the value on the top of the stack, so if you have a list of doubles, we'll call it amounts, it would look something like this: s:iterator value=%{amounts} s:text name=format.currencys:param value=%{top}//s:text /s:iterator (*Chris*) On Tue, Jul 13, 2010 at 2:43 PM, Chris

Finding out version of Struts2 by introspecting the struts2-core jar

2010-07-13 Thread Rohan Ranade
Hi all, I want to find out the version of Struts2 (2.0.x or 2.1.x) by introspecting the struts2 core jar file. Is there a class which can be introspected to find this out? (similar to http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/core/SpringVersion.htmlin Spring)?

Re: Currency Formatting

2010-07-13 Thread Chris Miles
Chris, I have a list of products which contain a double price. I now have. s:iterator value=products var=product span class=product-names:property value=#product.name//span span class=product-pricepound;s:text name=format.currencys:param value=#product.price//s:text/span /s:iterator

Re: Currency Formatting

2010-07-13 Thread Chris Pratt
I've never used the iterator tag like that, the standard way to use the Struts 2 Iterator would be: s:iterator value=products span class=product-names:property value=name http://product.name/ //span span class=product-pricepound;s:text name=format.currencys:param value=price//s:text/span

Re: Currency Formatting

2010-07-13 Thread Chris Miles
Thanks Chris. The reason I use this method in my iterators is there are a few places where I use nested iterators so the # notation is the only way to access the current iterator but also the parent iterator. This specific iterator is not nested so I have changed it for learning and trial

Re: Currency Formatting

2010-07-13 Thread Chris Pratt
Define fails, you get a stack trace? you don't get the output you expected? If so, what were you expecting vs. what did you get? I've used that code a thousand times, so I'm not sure what could be going wrong... (*Chris*) On Tue, Jul 13, 2010 at 3:56 PM, Chris Miles ch...@chrismiles.org wrote:

Re: Currency Formatting

2010-07-13 Thread Chris Miles
HTML rendering just completely stops at that point. I get the following: span class=product-nameThis is a product name/span span class=product-price And nothing else for the rest of the page. Nothing in the logs. Nothing :) Chris - Original Message - From: Chris Pratt

Re: Currency Formatting

2010-07-13 Thread Chris Pratt
That's weird I've never experienced anything like that were rendering stops without putting anything into the logs. Looks like you'll have to dig into the code. (*Chris*) On Tue, Jul 13, 2010 at 4:05 PM, Chris Miles ch...@chrismiles.org wrote: HTML rendering just completely stops at that

Re: result-type using annotations

2010-07-13 Thread Allen Lee
You can do this via the json plugin (https://cwiki.apache.org/WW/json-plugin.html - bundled with struts 2.1.7+) that provides the json result type, i.e., @Result(name=foo, type=json, ...) or you could set the contentType in your @Result params as application/json and have your associated template

Re: Currency Formatting

2010-07-13 Thread Chris Miles
Yeah I was hoping I did not need to. Not at midnight though. Will look tomorrow now haha. Thanks very much for the help. Chrid - Original Message - From: Chris Pratt thechrispr...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 14, 2010 12:10 AM

Re: result-type using annotations

2010-07-13 Thread JP Cafaro
Thanks for the response. I've been actually looking into the json plugin but having problems... I'm using the json plugin that comes with struts 2 (json-lib-2.1.jar) and trying to follow the website to set it up. Here's my struts.xml struts package name=example

Re: Finding out version of Struts2 by introspecting the struts2-core jar

2010-07-13 Thread Don Brown
On Wed, Jul 14, 2010 at 8:08 AM, Rohan Ranade rohan.ran...@gmail.com wrote: Hi all, I want to find out the version of Struts2 (2.0.x or 2.1.x) by introspecting the struts2 core jar file. Is there a class which can be introspected to find this out? (similar to

Re: Finding out version of Struts2 by introspecting the struts2-core jar

2010-07-13 Thread Rohan Ranade
IDE integration. I maintain the NetBeans Struts2 plugin ( http://nbstruts2support.dev.java.net). To quote one use case: When creating a new project, the user has a choice of selecting Struts 2.0.x or Struts2.1.x libraries to be added to the classpath from a location specified by the user.

Re: Finding out version of Struts2 by introspecting the struts2-core jar

2010-07-13 Thread Don Brown
Gotcha, so in that case, yes, that properties file is exactly what you want. Don On Wed, Jul 14, 2010 at 11:31 AM, Rohan Ranade rohan.ran...@gmail.com wrote: IDE integration. I maintain the NetBeans Struts2 plugin ( http://nbstruts2support.dev.java.net). To quote one use case: When creating a

Re: how can i get the validation in japanese

2010-07-13 Thread Salish S
Thanks for the reply but my problem is not solved, i had a jsp page in which user enter japanese char there has to use client side validation so that validation message has to be in japanese and if all are correct that has to enter in the mysql db's table in that i'm not sure what the encoding