Optimize webserver performance

2010-10-09 Thread abhishek jain
Hi friends, I have a few different applications running on a small VPS, tomcat 5.5.x, struts 1.2 , mysql. I need to know , what can i do to optimize the server files, like can i place the mysql-..jar file in the tomcat commons lib folder. ie should i place all the common files i have in all my app

Re: Simple theme and field errors

2010-10-09 Thread Dave Newton
There can be more than one error; it's a collection. Dave On Sunday, October 10, 2010, Altenhof, David Aron wrote: > Working on first Struts2 project, and quickly found out that standard themes > can produce some quirky output. (Hoping to write my own when I get some > time). I decided to simp

Simple theme and field errors

2010-10-09 Thread Altenhof, David Aron
Working on first Struts2 project, and quickly found out that standard themes can produce some quirky output. (Hoping to write my own when I get some time). I decided to simply use the "simple" theme to give me the most control over HTML formatting. However, it doesn't display field errors from v

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Li Ying
Hi Burton: The error message looks like the TLD file does not defined the new attribute correctly. So i think maybe the execute environment is not using the modified TLD file but the old one. Can you show us how you do apply your TLD file to the execute environment? -

Re: Nasty exception in struts2 ognl

2010-10-09 Thread Chris Mawata
On 10/9/2010 2:48 AM, Ricardo Oliveira wrote: Also posted in stackoverflow: http://stackoverflow.com/questions/3895961/nasty-java-lang-numberformatexception-in-struts2-ognl Any help appreciated! - To unsubscribe, e-mail: user

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Burton Rhodes
Thanks for the email. I was afraid it might be a bit more involved. I will probably shy away from that sort of surgery. Once you start modifying the Struts source, it can make future Struts upgrades painful. On Sat, Oct 9, 2010 at 5:26 PM, Mead Lai wrote: > Hi Burton, > > I see, that would be t

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Mead Lai
Hi Burton, I see, that would be the problem cause that ERROR. You have to download the struts2 source, and take a look at the both org.apache.struts2.views.jsp.ui.CheckboxListTag and org.apache.struts2.components,CheckboxList. I think you must add the attribute "breakCount" into CheckboxList.java,

Re: 2 View, and optional JSON

2010-10-09 Thread Dave Newton
Why? Is the data returned from the service different from the data you'd return on the page? Even if it is, it's not going to be significantly different, and the pages returning data for html rendering is only going to have slightly more data. On Oct 9, 2010 6:00 PM, "Frans Thamura" wrote: > my

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Frans Thamura
U can take a look of s2 jquery plugins And also the grid example This is the only tag plugins that modular /m/ -Original Message- From: Mead Lai Date: Sun, 10 Oct 2010 06:06:15 To: Struts Users Mailing List Reply-To: "Struts Users Mailing List" Subject: Re: How to create a costume s

Effective implementation

2010-10-09 Thread Frans Thamura
Hiii I have a case study that need 5 json that will be consume by one web page, an ajax approach Is there another way that we can only create minimum action rather than 5 which I did here Is map the method with result in one action class is the best one? F /m/ --

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Mead Lai
Hello Li, Thank you for your help, I think I shall ask this question in the dev-mail-list, Maybe I will get the answer. Regards, Mead

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Burton Rhodes
I ended up not having to create a new tag. I simply overrode the current template (template/simple/checkboxlist.tld) to do what I wanted. Essentially I just did what it says on this page entitled "Creating And Applying Your Own Themes For Struts 2 Tags": http://struts.apache.org/2.2.1/docs/strut

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Mead Lai
I mean in the modified "struts-tags.tld": checkboxlist org.apache.struts2.views.jsp.ui.CheckboxListTag JSP It seems nothing changed about the tag-class

Re: 2 View, and optional JSON

2010-10-09 Thread Frans Thamura
my idea to spilt the WEb API (REST) with JSON with our current html code and need to make it effective or my mind worst ;) F On Sun, Oct 10, 2010 at 4:23 AM, Dave Newton wrote: > And HTML, and could be extended to create anything else you wanted. > > On Saturday, October 9, 2010, Frans Thamura

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Mead Lai
Hello all, I am trying to create my struts2 UI-Tag too. Did you change the org.apache.struts2.views.jsp.ui.CheckboxListTag to your rewritten the Tag-class and the correspond CheckboxList yet? Regards, Mead

Re: 2 View, and optional JSON

2010-10-09 Thread Dave Newton
And HTML, and could be extended to create anything else you wanted. On Saturday, October 9, 2010, Frans Thamura wrote: > the REST automatically create JSON and XML > > F > > > On Sun, Oct 10, 2010 at 3:24 AM, Dave Newton wrote: >> The REST plugin already returns data based on the URL suffix--wha

Re: 2 View, and optional JSON

2010-10-09 Thread Frans Thamura
the REST automatically create JSON and XML F On Sun, Oct 10, 2010 at 3:24 AM, Dave Newton wrote: > The REST plugin already returns data based on the URL suffix--what's > wrong with using that mechanism? > > On Saturday, October 9, 2010, Frans Thamura wrote: >> hi all >> >> we need all ur tips

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Burton Rhodes
Agreed. I think an upgrade to the checklistbox tag is in warranted. Through my searches there are many posts looking for ways to "layout" the checkboxlist better. Most frustrating on this tag is the actual checkbox and the label will break lines making this unacceptable from a UI perspective. Al

Re: 2 View, and optional JSON

2010-10-09 Thread Dave Newton
The REST plugin already returns data based on the URL suffix--what's wrong with using that mechanism? On Saturday, October 9, 2010, Frans Thamura wrote: > hi all > > we need all ur tips > > we wanna to create a REST Action but with optional JSON, and 2 view > > the idea we wanna to create a full

2 View, and optional JSON

2010-10-09 Thread Frans Thamura
hi all we need all ur tips we wanna to create a REST Action but with optional JSON, and 2 view the idea we wanna to create a full blown website, mobile edition using sencha touch, and optional JSON to make REST as service producer (consume by android) but not all the Action can become JSON any

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Dave Newton
Much cleaner to encapsulate the behavior, especially if it's used often. It might be easier to use a JSP-based tag, though, than to extend an S2 tag. On Saturday, October 9, 2010, Maurizio Cucchiara wrote: > Dave you're right, > I was not clear > I'll try to explain better: > > >   value="checkb

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Maurizio Cucchiara
Dave you're right, I was not clear I'll try to explain better: insert breaking string Maurizio Cucchiara 2010/10/9 Dave Newton : > I think encapsulating this kind of behavior in a custom tag is why > custom tags exist--and since the iteration is handled by the > checkboxlist tag i

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Dave Newton
I think encapsulating this kind of behavior in a custom tag is why custom tags exist--and since the iteration is handled by the checkboxlist tag internally, using an iterator/etc. doesn't really work. Dave On Saturday, October 9, 2010, Maurizio Cucchiara wrote: > Do you need to insert a breaking

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Maurizio Cucchiara
Do you need to insert a breaking string every 3 items? I think this approach is too much expansive in term of time. Furthermore, after that, you should deal with subcassing process. You should have valid reasons for do that. Why don't you simply use mod operator?: insert breaking string

Re: Validation Problem

2010-10-09 Thread Maurizio Cucchiara
It's a know bug. If your application doesn't run in a production environment you could download latest struts release from https://hudson.apache.org/hudson/view/Struts/job/struts2/ Maurizio Cucchiara 2010/10/9 Chris Miles : > Whenever the validation procedure returns to the "input" result, any >

[S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Burton Rhodes
I am trying to override a struts tag template (specifically ), and I can't figure out how to add a parameter to the tag. I have successfully overridden the template by copying "checkboxlist.tld" to my template/simple directory and all works well. Now I would like to add a parameter. It appears t

Re: Nasty exception in struts2 ognl

2010-10-09 Thread Maurizio Cucchiara
Integer.MAX_VALUE is less then 1286579871769. See (http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#MAX_VALUE). Maybe Long will suit you. Maurizio Cucchiara 2010/10/9 Matthias Rakowski : > The link is Ok, stackoverflow seems to have some problems at the moment. > > >> I get

Re: Create Text Box Dynamically

2010-10-09 Thread Dave Newton
Better to use a Collection, but may not matter much. Also, if order needs to be guaranteed, use index notation (square brackets along with an index). If you need to add the text boxes dynamically (via JavaScript) just create DOM elements that match the HTML generated by the S2 tags. Dave On Satu

Re: Create Text Box Dynamically

2010-10-09 Thread Li Ying
Hi I think you can use tags looks like this: to generate 'n' text box dynamically. The html code should be: repeats 'n' times. When user input text in these text boxes and submit the form, the request should include several parameters which has the same name "data" and the different valu

Create Text Box Dynamically

2010-10-09 Thread vinodh r
Hi, I want to create 'n' text box dynamically, the 'n' should comes from database Whether 'n' should be 3 or 4 or 12 it will be vary dynamically and decided by the end user. Is it possible to create 'n' text Box dynamically or at run time with struts2, Also how text box can be accessed because

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: Of course you should extend your class from [BaseUI], so you can inherit the property [theme] in your class. But also, you should define the attribute [theme] (and all the other attributes you want to use) in you TLD file, or the jsp compiler can not recognize it in your jsp. You can rea

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Mead Lai
The same error, I have modified the extends class to BaseUI JasperException: /demo.jsp(14,4) Attribute theme invalid for tag hello according to TLD I ref the ui.CheckBox.java, but confused me. Thanks for your replies, All of them inspirit me very much. I will look insight source. Appreciate you.

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: I used to read the documents of Struts2, but mostly it can't answer my question. So i had to read the source, or debug it. For your question, i think you should read the source code of classes in package [org.apache.struts2.views.jsp.ui]. Get a look at the entire Class Hierarchy before

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Mead Lai
Thank you again. Any Demo or tutorial? I search all of the Struts2 document, but find nothing.

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: I readed some source code of Struts2, and realized that the property [theme] is defined in class [org.apache.struts2.components.UIBean] but not in class [org.apache.struts2.components.Component]. So i think if you want to render something with your tag, and appoint the theme by the attri

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Mead Lai
Thank you very much. JSP file: <%...@taglib prefix="s" uri="/struts-tags" %> <%...@taglib prefix="lab" uri="/lab" %> Hello World TLD file: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";> 2.2.3 1.2 lab /lab "Lab Tags" hello lab.str

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: The error message looks like the value of the attribute [theme] (in your jsp) is invalid. Can you show us your jsp and TLD file? 2010/10/9 Mead Lai : > I read the attribute "name" in the template, the Exception log: > > Attribute theme invalid for tag hello according to TLD >         >

Re: Nasty exception in struts2 ognl

2010-10-09 Thread Matthias Rakowski
The link is Ok, stackoverflow seems to have some problems at the moment. I get an error when I click on that. Cut and paste, don't make me work to help. Also posted in stackoverflow: http://stackoverflow.com/questions/3895961/nasty-java-lang-numberformatexception-in-struts2-ognl --

Re: Nasty exception in struts2 ognl

2010-10-09 Thread Dave Newton
I get an error when I click on that. Cut and paste, don't make me work to help. On Saturday, October 9, 2010, Ricardo Oliveira wrote: > Also posted in stackoverflow: > http://stackoverflow.com/questions/3895961/nasty-java-lang-numberformatexception-in-struts2-ognl > > Any help appreciated! > > >

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Mead Lai
I read the attribute "name" in the template, the Exception log: Attribute theme invalid for tag hello according to TLD org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407

How to create a costume struts2 tag? any demo?

2010-10-09 Thread Mead Lai
Hello all, I create a simple tag following this link http://joshuajava.wordpress.com/2008/12/27/creating-custom-components-with-struts-2/ but, I am trying to add some extra functions into that tag. Actually, I c