how to update/persist associate entity?

2009-03-17 Thread xnpeng
class Site{ String id; String name; Set properties; ...setter/getter } class SiteProperty{ String typeId; String typeName; Site site; ... setter/getter } SiteController.java class SiteController extends ActionSupport{ Site site; setter/getter... public String update(){ S

Re:how to update/persist associate entity?

2009-03-17 Thread xnpeng
class Site{ String id; String name; Set properties; ...setter/getter } class SiteProperty{ String propId; String propName; Site site; .. setter/getter } SiteController.java class SiteController extends ActionSupport{ Site site; setter/getter... public String update(){ Session s

Web Services

2009-03-17 Thread Rafael Taboada
Hi list! I have a Struts2+Dojo+JPA+Spring project working fine in a production environment, but suddenly I have the requirement of exposing web services from my project. I mean, I need to implement web services about my project funcionality which other systems can consume. I'm completely new at w

Re: Web Services

2009-03-17 Thread Paweł Wielgus
Hi Rafael, i use axis from apache with no problems. Best greetings, Paweł Wielgus. 2009/3/17 Rafael Taboada : > Hi list! > > I have a Struts2+Dojo+JPA+Spring project working fine in a production > environment, but suddenly I have the requirement of exposing web services > from my project. I mean,

Re : springOpenEntityManagerInViewFilter (with Hibernate)

2009-03-17 Thread François Rouxel
no but I'm gonna try it I'll tell you   - Message d'origine De : Burton Rhodes À : Struts Users Mailing List Envoyé le : Dimanche, 15 Mars 2009, 18h27mn 56s Objet : Re: springOpenEntityManagerI

RE: Web Services

2009-03-17 Thread Sidharth Bhatia
Hey Rafael, I think Spring webservices are a great point to start at. If you already know spring. The learning curve is not quite so steep. thanks, Sid Bhatia "Try not. Do... or do not. There is no try" -- Yoda _ _ mailto:sidharth.bhat...@gmail.com -Original Messag

Re: Struts 2 Container Security problem

2009-03-17 Thread Musachy Barroso
Just as a reference, there is a ticket open for this: https://issues.apache.org/struts/browse/WW-2642 musachy On Mon, Mar 16, 2009 at 5:37 PM, Struts Two wrote: > > There is a problem running Struts 2.1.6 on Websphere when security is > enabled. The case happens when url is an action not a res

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Sorry to revive an old thread here, but I've run into another issue with this. I decided to go with the second of Hernan's recommendations here, so I now have the following "flow". 1. User visits "ViewForm.action". 2. User submits the form and we go to "AddData.action" 3. If the data validated

RE: Web Services

2009-03-17 Thread Griffith, Michael *
Spring has excellent remoting abilities. If you are already using Spring, I'd check out Spring Remoting as my first option. -Original Message- From: Rafael Taboada [mailto:kaliman.fore...@gmail.com] Sent: Tuesday, March 17, 2009 7:39 AM To: user@struts.apache.org Subject: Web Services H

Re: Best Practices for Forms

2009-03-17 Thread Paweł Wielgus
Hi Timothy, You may consider flow like this: 1. request from browser 2. action on server 3. result returned to browser That way You can do as follows: 1. when receiving request for AddData 2. perform AddData action 3. then dispatch to apropriate forward 3.1. when with success redirect to ViewData

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Ok, I think this works. If I do: ViewData.action?id=%{dataId} ViewForm.action And remove the redirect on "input", instead of ViewData.action?id=%{dataId} ViewForm.action Then I think this will be ok. On the chance that the user does have a validation error,

Re: Struts 2 Container Security problem

2009-03-17 Thread pblatner
I don't see how this fix applies to the problem I mentioned below: http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK31377 The text there doesn't say anything about resolving an issue where WebSphere doesn't seem to be recognizing servlet filters as resources to secure using web contain

Re: Struts 2 Container Security problem

2009-03-17 Thread Struts Two
To be able to run Struts 2 on Websphere 6.1, you definitely need to set com..ibm.ws.webcontainer.invokeFiltersCompatibility for the custom properties of your server. However, once the flag is set, you will not be able to access any action directly once container security is turned on. That is

RE: Required field only works with text fields?

2009-03-17 Thread Griffith, Michael *
Can anyone help me with this? By adding the @RequiredField annotation to the relationship field (status in my example below) the form did not submit, which is good because the status had not been specified from the list. However, the form did not present a message too the user saying why the form

Multiple select

2009-03-17 Thread Stanley, Eric
All, I cannot get my select to preselect items from groupList using user.groups. This is my select: This is the actual contents of groupList, and user.groups. Both collections are List. groupList: bmg 1 groupList: wholesale 2 groupList: repair 3 groupList: ebiz 4 groupList: actuate 5

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
So this actually doesn't seem to work. Seems that I can't have the dispatcher result have an action as a parameter. Seems like it can only find a jsp even if I write out the full path to the action. Does anyone have any other suggestions on this? Thanks, Tim Orme Timothy Orme wrote: Ok, I thin

Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Duan, Bin
I was trying to get a parameter from a Http GET. The get from jsp looks like this: Provider Name The providerDetail.action maps to ProviderAction class. In the action class, I have a setDrProviderId() method, but found the id was not set. Then I tried to get the id from ServletActionRequest.get

Re: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Struts Two
Why do n't you let your action implement RequestAware interface and then get parameter from the request map. --- On Tue, 3/17/09, Duan, Bin wrote: > From: Duan, Bin > Subject: Problem getting request parameters in HTTP GET in Struts 2 > To: user@struts.apache.org > Received: Tuesday, March 17

RE: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Duan, Bin
Thanks for the response. I did that. The request obtained by implementing RequestAware is the same as the one obtained from ServletActionRequest.getRequest(). None of them worked. Actually, I did get the parameter map from the request, and it contained null data. Have you tried the scenario,

Re: Best Practices for Forms

2009-03-17 Thread Greg Lindholm
To preserve your action errors and messages across a redirect you can use this interceptor. http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ Timothy Orme wrote: > > Sorry to revive an old thread here, but I've run into another issue with > this. > >

Re: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Musachy Barroso
Something is very wrong in your configuration. Can you post your web.xml? musachy On Tue, Mar 17, 2009 at 3:50 PM, Duan, Bin wrote: > Thanks for the response. > > I did that. The request obtained by implementing RequestAware is the same as > the one obtained from ServletActionRequest.getRequest

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Hi Greg, Thanks, I actually just stumbled across this. I'm actually having some problems with it however. I have it setup as follows: /form.jsp?id=${id} /form.jsp?id=${id} ViewData.action?id=${id}

RE: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Duan, Bin
Musachy, The web.xml is very simple since we just started this project. Here it is. Please advise: http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4" xmlns="http://java.sun.com/xml/n

Re: Best Practices for Forms

2009-03-17 Thread Greg Lindholm
Well that's about the most common question one sees on this list. Check this out: http://struts.apache.org/2.1.6/docs/how-do-we-repopulate-controls-when-validation-fails.html Timothy Orme wrote: > > Hi Greg, > > Thanks, I actually just stumbled across this. I'm actually having some > pr

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Awesome, thank you! Greg Lindholm wrote: Well that's about the most common question one sees on this list. Check this out: http://struts.apache.org/2.1.6/docs/how-do-we-repopulate-controls-when-validation-fails.html Timothy Orme wrote: Hi Greg, Thanks, I actually just stumbled acros

Re: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Musachy Barroso
can you try the new filters? struts-prepare org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter struts-execute org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter struts-prepare /* strut

Tiles defination.How to pass dynamic value of an attribute ?

2009-03-17 Thread Kumar_Sinha, Sumit
Hi Shrish, I was finding some solution in Google. My requirement is similar of your question posted on April 08 2003 Could you provide some idea/solution for this. http://mail-archives.apache.org/mod_mbox/struts-user/200304.mbox/%3C483B 0c156d0f3944bc52c6228044bd2c275...@s01b1f4h-bu.fl

RE: Multiple select

2009-03-17 Thread Stanley, Eric
Figured it out in case anyone has this same issue. Added a value attribute, and used OGNL to grab a list of id's from List instead of just the List which works just fine in a select where multiple="true". -Good luck -Original Message- From: Stanley, Eric [mailto:eric.r.stan...@qwest.co

Re: Required field only works with text fields?

2009-03-17 Thread Dave Newton
Griffith, Michael * wrote: Can anyone help me with this? By adding the @RequiredField annotation to the relationship field (status in my example below) the form did not submit, which is good because the status had not been specified from the list. However, the form did not present a message too

RE: Required field only works with text fields?

2009-03-17 Thread Griffith, Michael *
Dave, Thanks for the reply. I've had some success...tinkering... The following validation annotation seems to work: @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch=FetchType.EAGER) @JoinColumn(name = "STATUS") @ExpressionValidator(message = "Default message", key="vali

Re: Type conversion exceptions

2009-03-17 Thread Lukasz Lenart
2009/3/16 ryangr : > com.opensymphony.xwork2.util.XWorkConverter  - processing conversion file > [com/rjssoft/webdocs/admin/SettingAction-conversion.properties] [class=class > com.rjssoft.webdocs.admin.SettingAction] As I see you have only SettingAction-conversion.properties, could you try to use

RE: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Duan, Bin
It doesn't work. I still get null for the parameter. Some additional info. The request is actually a StrutsRequestWrapper instance. I did the debug, the whole http content on the server side looks like this. You can see the drProviderId is in the get. GET /providerDetail.action?drProv

Re: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Musachy Barroso
Why don't you try the blank application or showcase? if they work, then at least you know it is not some container config, but your app. musachy On Tue, Mar 17, 2009 at 5:06 PM, Duan, Bin wrote: > It doesn't work. I still get null for the parameter. > > Some additional info. The request is actua

Re: Type conversion exceptions

2009-03-17 Thread ryangr
I do have the global xwork-conversion.properties in the proper WEB-INF/classes which is loaded above the section of the log that I copied along with the SettingAction-conversion.properties in the SettingAction class directory. The Setting-Action-conversion.properties only contains: Element_settin

Re: Type conversion exceptions

2009-03-17 Thread Lukasz Lenart
2009/3/17 ryangr : > Element_settings=com.rjssoft.webdocs.setting.Setting But you should put there com.rjssoft.webdocs.setting.SettingList = com.rjssoft.webdocs.setting.Setting Regards -- Lukasz http://www.lenart.org.pl/ - To

Re: Struts 2 Container Security problem

2009-03-17 Thread pblatner
I installed the latest fix pack for WebSphere, bringing my version up to 6.1.0.21 and it did the trick. The Web container authentication now works as I expected it to. Thanks for the feedback. Pete. pblatner wrote: > > I don't see how this fix applies to the problem I mentioned below: > ht

Re: Type conversion exceptions

2009-03-17 Thread ryangr
If I do that, then there will be two lines as such in the properties file: com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.setting.Setting com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter How will it know the difference? I followed the docume

Re: Type conversion exceptions

2009-03-17 Thread Lukasz Lenart
2009/3/17 ryangr : > com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.setting.Setting What this is for? > com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter This tells Xwork which converter to call if it will need to convert Array to SettingList

Re: Type conversion exceptions

2009-03-17 Thread ryangr
Okay, I'm officially very confused as to what should and shouldn't be used since apparently the documentation example is not correct. Let me level set with what each of my files contains again: [xwork-conversion.properties] Element_settings=com.rjssoft.webdocs.setting.Setting According to the d

RE: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Duan, Bin
We found a post in the mailing list that reported the same problem. Check it out. The final solution of it was that the user had to implement a customized map class, which was pretty nasty. Is this something we have to go through, or is there better solution? Is this a bug in S2? Check it out.

Re: Required field only works with text fields?

2009-03-17 Thread Dave Newton
Griffith, Michael * wrote: The following validation annotation seems to work: @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch=FetchType.EAGER) @JoinColumn(name = "STATUS") @ExpressionValidator(message = "Default message", key="validate.status", expression = "status != null

Re: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Dave Newton
What's the action mapping look like (along with its package definition)? Dave Duan, Bin wrote: We found a post in the mailing list that reported the same problem. Check it out. The final solution of it was that the user had to implement a customized map class, which was pretty nasty. Is this

RE: Problem getting request parameters in HTTP GET in Struts 2

2009-03-17 Thread Relph,Brian
First, the post you referenced had a follow up a few days later, and the custom mapper was not actually needed, there was instead a bug in the oracle app server that was fixed in a later release. Second, let struts handle the type conversion for you. You don't need to convert from a string to

Re: Struts 2 Container Security problem

2009-03-17 Thread Struts Two
Are you able to Access a URL that goes to an action directly? I myself have Websphere 6.1.0.21 for my RAD 7.5 and I am not able to do so. Hm...I am going to try this on our AIX test servers to double check. --- On Tue, 3/17/09, pblatner wrote: > From: pblatner > Subject: Re: St

Re: Web Services

2009-03-17 Thread Miguel
You may take a look at Spring-WS. Remoting is like "RMI over http", meanwhile Spring-WS is a contract-first approach. Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Tue, Mar 17, 2009 at 09:02, Griffith, Michael * wrote: > Spring has excellent remoting abilities. If y

RE: Web Services

2009-03-17 Thread Martin Gainty
WebService(s) allow client to consume published services identified by WSDL contract some of the older RMI implementations default to CORBA (not configured on most machines by default) ..personally i prefer RPC the more recent versions of Axis are moving to doc-literal and away from RPC.. Spri

Re: Mapping FreeMarker results in struts-rest-plugin

2009-03-17 Thread wkbutler
Update - as it turns out, URL http://localhost:8080/lotmap/subdivision/id1 resolves to template WEB-INF/content/subdivision-show.ftl *if* and only if the correlating JSP template WEB-INF/content/subdivision-show.jsp does *not* exist. While that is not terribly surprising, this is:

RE: Multiple select

2009-03-17 Thread Martin Gainty
interested to know how groupList was populated ? Martin __ Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine

Changing parameters via interceptor

2009-03-17 Thread Miguel
I have a basic question. How do I change or remove parameters from a request? What I need is to have some fields "secured" from modification in a bean in the action? Like deleteing a "bean.name" parameter if it comes in the request. Also, is there any way for the interceptor to interact with the se

redirect parameters lost when using convention plugin 2.1.6

2009-03-17 Thread John Liptak
I'm in the process of upgrading an app from 2.0.11.2 to 2.1.6. I've been following the instructions at http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html#TroubleshootingguidemigratingfromStruts2.0.xto2.1.x-Updatestruts.xmlConfiguration converting from 2.0