Re: S2: Design Input suggestion

2007-04-06 Thread Harring Figueiredo
Joey, Thank you so much for you input. I will take a look again at the showcase application code and see the detail of it. I was not aware that we could setup interceptors like that -- Your input on this is greatly appreciated. Regards, Harring Figueiredo On 4/5/07, joey [EMAIL PROTECTED]

Appending url to every jsp

2007-04-06 Thread kapils
I am using struts My Jsp has action like form action=/LoginAction.do and also it contains certain href =/SomeAction.do I want to append the URL e.g When we click submit it should appear as http://host.com/en/Loginaction.do instead of http://host.com/Loginaction.do Same way in href also

[S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan
1. How can I redirect a result from an action to an action in another namespace? I have separate configuration files for each namespace. 2. What is the significance of packages? Should the package name always be the same as the namespace?

Memory leak when using DB connection ??

2007-04-06 Thread Balazs Michnay
Dear Struts users, Finally I managed to get DB-handling working, but I'm experiencing problems. When I query the database for about the 10th time, I get the following error message: java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at

Re: [S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan
Manu Mahajan wrote: 1. How can I redirect a result from an action to an action in another namespace? I have separate configuration files for each namespace. 2. What is the significance of packages? Should the package name always be the same as the namespace?

Re: [S2] redirect-action to different namespace

2007-04-06 Thread joey
Package 's name is the key to for other packages to reference like extend. Namespace could be different to name. On 4/6/07, Manu Mahajan [EMAIL PROTECTED] wrote: Manu Mahajan wrote: 1. How can I redirect a result from an action to an action in another namespace? I have separate

eclipse + struts2?

2007-04-06 Thread אלחנן מעין
hi.. how do i setup and eclipse project (dynamic web project) for struts2 ? _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Re: [S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan
Ok. So what happens when I extend a package? Do i inherit its namespaces, interceptors and actionmappings in the sub package? joey wrote: Package 's name is the key to for other packages to reference like extend. Namespace could be different to name. On 4/6/07, Manu Mahajan [EMAIL

Struts2 and Tiles, still not clear for me :(

2007-04-06 Thread Pedro-1
Hi, I'm new in Struts, and bought the complete reference (second edition) to start with it. I discovered that Struts2 is different, and begin to understand how to develop some struts2 on Eclipse. Now, my problem is that I am completly lost with Tiles, and

Re: [S2] redirect-action to different namespace

2007-04-06 Thread joey
only interceptors,results will be inherited from parent package. On 4/6/07, Manu Mahajan [EMAIL PROTECTED] wrote: Ok. So what happens when I extend a package? Do i inherit its namespaces, interceptors and actionmappings in the sub package? joey wrote: Package 's name is the key to for

JMap, jsp

2007-04-06 Thread Balazs Michnay
Hi there, Is there a way to get the process ID of a web application? I'd like to use jmap to see the memory state of my app, but I don't know which pid identifies my web app. When deploying and launching my app, jps doesn't show my app... How can I use jmap (or any other memory-watch tool) with

Re: resume after login feature

2007-04-06 Thread meeboo
One last question regarding this. As I beforehand don't know where to redirect the user after the login action I will have to implement the ServletResponseAware interface and then use the HttpServletResponse for this. This seems like an ugly way to redirect the user, are there other ways maybe?

Re: Struts2 and Tiles, still not clear for me :(

2007-04-06 Thread Dave Newton
--- Pedro-1 [EMAIL PROTECTED] wrote: Could some one give me a pointer to a simple example showing all the configuration files, and where to put them? -- web.xml fragment !-- - If you want to use tiles config files other - than the default /WEB-INF/tiles.xml you can - configure them

Re: resume after login feature

2007-04-06 Thread Dave Newton
--- meeboo [EMAIL PROTECTED] wrote: One last question regarding this. As I beforehand don't know where to redirect the user after the login action I will have to implement the ServletResponseAware interface and then use the HttpServletResponse for this. This seems like an ugly way to

Re: [S2] redirect-action to different namespace

2007-04-06 Thread Manu Mahajan
joey wrote: only interceptors,results will be inherited from parent package. Ok. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Struts2 and Tiles, still not clear for me :(

2007-04-06 Thread Pedro-1
Many thanks Dave Newton-4, I understand better how it works with the different configuration files :) -- View this message in context: http://www.nabble.com/Struts2-and-Tiles%2C-still-not-clear-for-me-%3A%28-tf3535994.html#a9871359 Sent from the Struts - User mailing list archive at

Re: WildCards and Results

2007-04-06 Thread stanlick
since '!' is already a special character which specifies the method name automatically see struts.properties configuration file for more details about how to enable/disable dynamic method invocation Can you explain this? I read all I could find on this topic and their was discussion dating back

Re: WildCards and Results

2007-04-06 Thread Ted Husted
There's a feature embedded in WebWork that lets the ! character invoke a method other than execute. In WebWork, it doesn't really have a name. During the S2 discussions, we coined the term dynamic method invocation to describe how WW/S2 use the ! notation. For Struts 2, we added a switch to

[S2 Tip] Within a namespace, reuse names for common concepts

2007-04-06 Thread Ted Husted
In practice, most applications are composed of a small number of workflows that repeat within the application. When configuration elements in different namespaces serve the same role, use the same identifier for each element. If each namespace includes a Menu or a Help action, use those same

Re: WildCards and Results

2007-04-06 Thread Aram Mkhitaryan
! is a special character means that if you have action which name is do and in struts.properties you have struts.enable.DynamicMethodInvocation=true which is the default value, then if the request is do_namespace/do!firstMethod will invoke the firstMethod. If you specify action name already

Re: WildCards and Results

2007-04-06 Thread stanlick
Ted, you are 2 for 2! Now it's back to changing code. I read the notes on this several times and could never glean this understanding. You really need to finish that book my brother. Thanks, Scott On 4/6/07, Ted Husted [EMAIL PROTECTED] wrote: There's a feature embedded in WebWork that lets

Re: autocompleter with JSON plugin

2007-04-06 Thread Musachy Barroso
The autocompleter is expecting the datasource to be an array, not a map(or object), so in this case it should be: {foos: [ [1, chance], [10, test] ] } Although it would be convenient if it would take a map also: https://issues.apache.org/struts/browse/WW-1872 musachy On

Re: FreeMarker evaluating result of s.url?

2007-04-06 Thread Musachy Barroso
You will have to escape it so freemarker doesn't expand it, like: $\{test} http://freemarker.sourceforge.net/docs/dgui_template_exp.html regards musachy On 4/6/07, River Tarnell [EMAIL PROTECTED] wrote: hello, i have a FreeMarker template which looks like this: @s.url id=viewurl

Re: Struts 2 and Validation Testing

2007-04-06 Thread Rich Thornett
Tried extending XWorkTestCase in a sample test, but sgot the same error. I'm extending MockObjectTestCase anyway, so inheritance wouldn't be the best solution for me. Doesn't look like there's been any traction on this issue in Jira yet: https://issues.apache.org/struts/browse/WW-1868 qmnonic

Re: CompositeActionMapper

2007-04-06 Thread Skylark
I can propose you workaround. Simply replace org.apache.struts2.dispatcher.FilterDispatcher.class in struts2 core library with attached one. http://www.nabble.com/file/7722/FilterDispatcher.class FilterDispatcher.class PS: struts2 2.06 -- View this message in context:

Struts with Tabbed page

2007-04-06 Thread samk
Hi , I am using Struts frame work to develop my app, which have 5 to 6 tabs in a page . I am using a Single form bean to capture all of the information which have all together of more than 100 fields . is it a good idea to impliment or should i go for the 1 actiionClass, 1 Action Form for each

STRUTS2 Custom Properties

2007-04-06 Thread Love, Andrew
How do I access custom properties defined in struts.properties. For instance: ### Load custom property files (does not override struts.properties!) struts.custom.properties=/test/myprops Also, can the properties be referenced in a free marker template? Thanks, Andrew

Re: MVC 2 design, how to

2007-04-06 Thread mansour77
Ted Husted wrote: It sounds like that you might want to use the ModelDriven approach, How many approach there is ? Where can I read about them ? where the AccountManager is the model object. If I move the business logic to the action class then this becomes MVC1. From my understanding

caching and reload

2007-04-06 Thread Chris Pat
Hello Is/how it possible to clear the cache on an action? My action works perfectly, however when the user hits reload the previous values are repeated. I have coded a reset with = and still it uses the old values. What am I missing? I will trap the null or values in the action(I know I

[s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

2007-04-06 Thread Wesley Wannemacher
Hello, I'm feeling a bit lazy right now and was wondering if anyone here has an example that can help me out. If you are using Eclipse WebTools (Callisto) and you have an ant build file that takes your dynamic web project and creates a deployable war file (and if it runs unit tests and deploys

Re: [s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

2007-04-06 Thread Leon Rosenberg
https://moskito.dev.java.net/source/browse/*checkout*/moskito/moskito-demo/build.xml not the best probably but it works. leon On 4/6/07, Wesley Wannemacher [EMAIL PROTECTED] wrote: Hello, I'm feeling a bit lazy right now and was wondering if anyone here has an example that can help me out.

RE: [s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

2007-04-06 Thread Wesley Wannemacher
Awesome, this is exactly what I was hoping for... -Wes -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Friday, April 06, 2007 11:08 AM To: Struts Users Mailing List Subject: Re: [s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

Re: FreeMarker evaluating result of s.url?

2007-04-06 Thread River Tarnell
On Fri, 2007-04-06 at 09:29 -0400, Musachy Barroso wrote: You will have to escape it so freemarker doesn't expand it, like: $\{test} thanks, but i'm not sure i understand... does this mean that whenever i use s.url, i need to do something like @s.url id=viewurl includeParams=none action=view

Re: [s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

2007-04-06 Thread mansour77
If you are using tomcat plug-in www.sysdeo.com/*eclipse*/*tomcat**plugin , *you will have the option to deply the application to a war file. just right click on the project in the Navigation View, --- tomcat --- Export to war file sets in project properties. Wesley Wannemacher wrote:

populating a bean

2007-04-06 Thread mansour77
how do I populate a bean values from a jsp page ? here's what I need to do: s:form action=accountManager method=post s:textfield name=accountBean.firstName label=First Name / s:submit /s:submit /s:form this page

RE: populating a bean

2007-04-06 Thread Hartrich, James CTR USTRANSCOM J6
So you are going from the jsp to the action, correct? That being the case, you are doing this correctly so far. Make certain to have an encapsulated property for accountBean in your accountManager action. On submit the accountBean object will be constructed and setFirstName will be called. The

Re: populating a bean

2007-04-06 Thread mansour77
Hartrich, James CTR USTRANSCOM J6 wrote: So you are going from the jsp to the action, correct? That being the case, you are doing this correctly so far. Make certain to have an encapsulated property for accountBean in your accountManager action. On submit the accountBean object will be

Re: populating a bean

2007-04-06 Thread mansour77
I found it. Never mind. And thank you a lot for your help. [EMAIL PROTECTED] wrote: Hartrich, James CTR USTRANSCOM J6 wrote: So you are going from the jsp to the action, correct? That being the case, you are doing this correctly so far. Make certain to have an encapsulated property for

Re: Filtering multipart content

2007-04-06 Thread Chris Pratt
Looks like you need a MultipartFilter earlier in the Filter Chain than your Filter. That way both your Filter and the Action will get the results. It will bypass Strut's built-in Multipart support, but it should work fine. (I think com.oreilly.servlets has one) (*Chris*) On 3/27/07, Lance

Does struts 1.2.x or 1.3.x support the attribute autocomplete f or forms?

2007-04-06 Thread Crawford, Preston
I'm sure many of you know about this. The originally IE specific attribute autocomplete, that when set to off would prevent the browser from saving the data in the form for autocompletion later. I'm working on a project that uses Struts 1.1. So I have a few questions. #1 - Is autocomplete

Re: MVC 2 design, how to

2007-04-06 Thread Ted Husted
On 4/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How many approach there is ? Where can I read about them ? Just the two. Either put the properties on the Action class, or implement ModelDriven. A third might be to create your own interceptor that did the same thing as ModelDriven, but

Re: Action Validator ans s:url...

2007-04-06 Thread Ted Husted
On 4/5/07, Dave Newton [EMAIL PROTECTED] wrote: Having the validation files key off of method names would be pretty handy (and avoid some extra action defs). I poked around, and it seems the design justification is to allow the methods to be validated differently in different contexts. I do

RE: Does struts 1.2.x or 1.3.x support the attribute autocomplet e f or forms?

2007-04-06 Thread Crawford, Preston
Oh, and the other question is if there are issues upgrading from 1.1 to 1.2.x or 1.3.x? Any reason this would be a difficult upgrade, assuming this is the answer to my problem. Preston CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended

Re: Action Validator ans s:url...

2007-04-06 Thread stanlick
Amen! I really don't know if I have this straight or not. On 4/6/07, Ted Husted [EMAIL PROTECTED] wrote: On 4/5/07, Dave Newton [EMAIL PROTECTED] wrote: Having the validation files key off of method names would be pretty handy (and avoid some extra action defs). I poked around, and it seems

Re: Does struts 1.2.x or 1.3.x support the attribute autocomplete f or forms?

2007-04-06 Thread Niall Pemberton
On 4/6/07, Crawford, Preston [EMAIL PROTECTED] wrote: I'm sure many of you know about this. The originally IE specific attribute autocomplete, that when set to off would prevent the browser from saving the data in the form for autocompletion later. I'm working on a project that uses Struts 1.1.

Re: populating a bean

2007-04-06 Thread Martin Gainty
Assuming you are using Struts-2? http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/DefaultActionSupport.html#getSuccessResultValue() you will need these methods public String getSuccessResultValue() public void setSuccessResultValue(String successResultValue)

Re: FreeMarker evaluating result of s.url?

2007-04-06 Thread Musachy Barroso
FreeMarker will replace ${X} fot the value of X anywhere on your ftl file, if you want to have a literal ${X} that is not expanded, you need to use $\{X} musachy On 4/6/07, River Tarnell [EMAIL PROTECTED] wrote: On Fri, 2007-04-06 at 09:29 -0400, Musachy Barroso wrote: You will have to

RE: Does struts 1.2.x or 1.3.x support the attribute autocomplet e f or forms?

2007-04-06 Thread Crawford, Preston
Thanks for the information. I think I will stick with Struts 1.1 for now, then. We have the opportunity at some point on a later project to perhaps do a Struts 2 migration. I think it's probably wiser to implement the Javascript way of handling this for now and save the Struts migration (sometimes

[Struts2] How to get instance of ActionSupport class after redirect?

2007-04-06 Thread Neil Aggarwal
Hello: I have this scenario: I have a form in a jsp file that submits to an ActionSupport class. The ActionSupport class captures the submitted data and validates the input. If the data is valid, it sends the user back a redirect to a servlet url to give them the data file generated for their

Re: autocompleter with JSON plugin

2007-04-06 Thread Rohit Dewan
Hi Musachy, That was it. It works now! Especially given that the autocompleter is structured as a key value pair, supporting maps would be a natural fit. Thanks for creating the enhancement request on JIRA. Regards, Rohit On 4/6/07, Musachy Barroso [EMAIL PROTECTED] wrote: The autocompleter

Struts Dispatch Action

2007-04-06 Thread samk
Hi , I am new to struts , I am using a Tabbed page with multiple buttons on the page (submit, save, clear) can some one let me know the process in doing it? As i have read some article that we can do it with dispatch Action or LookUpDispatch action. Thx in Adv Sunny -- View this message in

Re: S2: Better passing of fields by link

2007-04-06 Thread Scott Nesbitt
Ok, figured it out. I did try what you mentioned but it also required this at the top to work: s:head theme=ajax/ It would not pass the params with just the ajax theme in the s:a tag. Thank you for your help. Scott --- Musachy Barroso [EMAIL PROTECTED] wrote: What problem are you having?

now inscrutable

2007-04-06 Thread Chris Pat
Hello Sorry for a second post, however I cant also fathom this. A TC5.028 project was working fine several months ago. Went back to it and it apparently still works however if I put in a simple queryStr=request.getQueryString(), I impossibly get WebappClassLoader.java cannot be found.

Re: FreeMarker evaluating result of s.url?

2007-04-06 Thread River Tarnell
On Fri, 2007-04-06 at 14:03 -0400, Musachy Barroso wrote: FreeMarker will replace ${X} fot the value of X anywhere on your ftl file, sure, but in this case the ${X} is not in the ftl file, it's returned by @s.url - i never explictily write ${foo} anywhere, but FreeMarker expands it to bar

Re: Action Validator ans s:url...

2007-04-06 Thread Dave Newton
--- Ted Husted [EMAIL PROTECTED] wrote: but I don't see a case for a context beyond the method. I would think that the method is the context. If a method needs to be validated, then it needs to be validated. That was more or less my thought, perhaps not quite as well-stated ;) then we

Re: Action Validator ans s:url...

2007-04-06 Thread Musachy Barroso
Does anybody know what is the status of that JSR? musachy On 4/5/07, Ted Husted [EMAIL PROTECTED] wrote: On 4/5/07, Dave Newton [EMAIL PROTECTED] wrote: Turns out the annotations are class-based as well (again, I had just been lucky so far)... If the validation files were based off of

Accesssing a bean from a jsp without struts tags

2007-04-06 Thread mansour77
I have a bean that is set in an action class. I can access it using struts tag, but what do I do if I need to access it from somewhere else ? for example, if I need to access it from a list iterator. Thanks. - To

Eclipse WTP/Tomcat/Struts 2 - 404 error

2007-04-06 Thread Manickam-Periaswamy . Vignesh
Hi all This might sound off topic, but I had already posted this in Eclipse WTP newsgroup, but couldn't resolve it yet. So I thought someone here might have already faced this problem. I configured Eclipse WTP for a struts-enabled web application. When I ran my application using run on server

Re: Accesssing a bean from a jsp without struts tags

2007-04-06 Thread mansour77
OK, let me include more details, may be someone will understand what I am talking about. I have a list that belongs to a Bean that's wet in an action class. public AccountBean getAccountBean() { return accountBean; } AccountBean has an ArrayListInvoices calles invoices. now im my jsp, I

Re: Memory leak when using DB connection ??

2007-04-06 Thread mansour77
This is one of the problem using connection pooling. This page explains it and offers a solution: http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html I hope it helps. Balazs Michnay wrote: Dear Struts users, Finally I managed to get DB-handling working, but I'm

Re: [Struts2] How to get instance of ActionSupport class after redirect?

2007-04-06 Thread Laurie Harper
Neil Aggarwal wrote: Hello: I have this scenario: I have a form in a jsp file that submits to an ActionSupport class. The ActionSupport class captures the submitted data and validates the input. If the data is valid, it sends the user back a redirect to a servlet url to give them the data

Re: form filed populated wrongly

2007-04-06 Thread Laurie Harper
Guna wrote: Hi, I have two jsp pages with different form bean. on first jsp page, i have field called LastName. on first jsp page if user press cancel the request. the user is navigated to second jsp page which has also a field called lastName. The problem is what ever value i enter on first

Re: [OT] Memory leak when using DB connection ??

2007-04-06 Thread Laurie Harper
This doesn't appear to have much to do with Struts... :-/ Anyway, it looks like you're not closing your DB connections. I don't know anything about dbtags, but I would guess it provides a way to do this. Of course ideally you wouldn't be doing database stuff in a JSP in the first place :-)

Re: caching and reload

2007-04-06 Thread Laurie Harper
Chris Pat wrote: Hello Is/how it possible to clear the cache on an action? My action works perfectly, however when the user hits reload the previous values are repeated. I'm not sure what cache you're talking about, but isn't this behaviour as you would expect? If I refresh a page, I

Re: [OT] JMap, jsp

2007-04-06 Thread Laurie Harper
Again, not Struts related. The answer depends on your operating system (Windows? Linux?). Consult the documentation for the tools you are using for guidance. L. Balazs Michnay wrote: Hi there, Is there a way to get the process ID of a web application? I'd like to use jmap to see the memory

Re: Struts Dispatch Action

2007-04-06 Thread Niall Pemberton
On 4/6/07, samk [EMAIL PROTECTED] wrote: Hi , I am new to struts , I am using a Tabbed page with multiple buttons on the page (submit, save, clear) can some one let me know the process in doing it? As i have read some article that we can do it with dispatch Action or LookUpDispatch action.

Unable to find resource error after upgrade from S12 to S13

2007-04-06 Thread Chinenova, Tatyana
I got the following exception after upgrading the project from Struts 1.1 to 1.3: VelocityViewServlet : Error processing a template for path '/tile/common/shlogon.vm' org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/tile/common/shlogon.vm' at

RE: [Struts2] How to get instance of ActionSupport class after redirect?

2007-04-06 Thread Neil Aggarwal
Laurie: I alyways use a redirect after a form post to avoid the stupid page expired warning if the user hits the reload button. I think we will save the ActionSupport instance in the session and get it back from there. Thanks, Neil -- Neil Aggarwal, (214)986-3533,

Re: Accesssing a bean from a jsp without struts tags

2007-04-06 Thread joey
add request.setAttribute(invoices,accountBean.getInvoices()) in your action execute method. On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK, let me include more details, may be someone will understand what I am talking about. I have a list that belongs to a Bean that's wet in an

Re: caching and reload

2007-04-06 Thread joey
do you have this? meta http-equiv=Cache-Control content=no-store/ meta http-equiv=Pragma content=no-cache/ meta http-equiv=Expires content=0/ On 4/7/07, Laurie Harper [EMAIL PROTECTED] wrote: Chris Pat wrote: Hello Is/how it possible to clear the cache on an action? My action works

Re: Accesssing a bean from a jsp without struts tags

2007-04-06 Thread mansour77
joey wrote: add request.setAttribute(invoices,accountBean.getInvoices()) in your action execute method. On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I thought that was set automatically by struts through the getters ! OK, let me include more details, may be someone will understand

Re: Accesssing a bean from a jsp without struts tags

2007-04-06 Thread mansour77
[EMAIL PROTECTED] wrote: joey wrote: add request.setAttribute(invoices,accountBean.getInvoices()) in your action execute method. How do I do this is struts 2. I couldn't find any way to get my hand on the Request object. On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I thought