Image not loaded in jsp

2009-10-27 Thread dharhsana
Hi to all, I have some query regarding viewing of images in jsp page. We are using struts with hibernate to develop our application. What we do is while inserting image ,we insert the path in the database and have images in the webapps.the image is not been loaded after uploaded.. once after

RE: Image not loaded in jsp

2009-10-27 Thread Vishnu Vyasan Nelliparmbil
Hi Rekha, Which app server are you using? Try printing the path you got from database. And are you using %=request.getContextPath()% ? Best Regards Vishnu NV Java Application Developer Ministry of Municipalities and Agriculture Affairs -Original Message- From: dharhsana

RE: Image not loaded in jsp

2009-10-27 Thread dharhsana
Hi Vishnu, i am using img tag in which struts bean tag ill be given to the src of image tag. My question is since we kept those images in webapps the images are not been shown, only after restarting the images are been shown.. we are not saving images in the database only the path is saved,and

FileUpload - Directory selection

2009-10-27 Thread RogerV
I need to allow the client to to be able the filesytem browser functionality provided with the file upload functionality, but I need the client to select a directory rather than a specific file. Can I do this with the file upload functionality? If not, pointers in the right direction would be

RE: FileUpload - Directory selection

2009-10-27 Thread Vishnu Vyasan Nelliparmbil
Hi Roger, I don't know whether its correct approach or not, but make the user zip the directory and upload it. Best Regards Vishnu NV -Original Message- From: RogerV [mailto:roger.var...@googlemail.com] Sent: Tuesday, October 27, 2009 10:59 AM To: user@struts.apache.org Subject:

RE: FileUpload - Directory selection

2009-10-27 Thread RogerV
vishnu.vyasan wrote: Hi Roger, I don't know whether its correct approach or not, but make the user zip the directory and upload it. Best Regards Vishnu NV Hm .. that's an idea, but I'd still need to be able to select an output directory ... I'm working in an Intranet

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread carl ballantyne
Okay that makes sense. Thanks for that! But your example used a hardcoded fieldname. In order to dynamically loop the fieldnames and display the errors for each of those fields I have tried: s:iterator value=fieldErrors var=fieldNameErrors s:iterator value=%{fieldNameErrors}

[Struts 2] Dynamic content of a tooltip for internationalization

2009-10-27 Thread Fernandes Celinio
Hi, How do you render the content of a tooltip dynamic ? I am using several messages_XX.properties files, one for each language. In each properties file, I have defined the key blabla.tooltip. For instance in messages_en.properties: blabla.tooltip=Pay before the end of the term. In

Adding Json to existing action

2009-10-27 Thread Michael Varlik
Hi, I need to call an existing struts action within my application from a JavaScript function. I thought it might be possible to create an additional entry in the struts mapping file like this: action name=getDataJson class=com.mypackage.MyAction method=getData result type=json / /action and

Re: Adding Json to existing action

2009-10-27 Thread Struts Two
You can either use Json plugin or write your own customized result type that return JSON. --- On Tue, 10/27/09, Michael Varlik m.var...@gmx.de wrote: From: Michael Varlik m.var...@gmx.de Subject: Adding Json to existing action To: user@struts.apache.org Received: Tuesday, October 27, 2009,

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Greg Lindholm
So, fieldErrors is a MapString, ListString, the key is the field name and the value is a ListString of messages. I don't think you can use s:iterator value=fieldErrors directly on a Map as a Map is not iteratable (check the iterator tag doc [1]). I think you will need to iterate on either the

RE: Adding Json to existing action

2009-10-27 Thread Mike Baranski
I do this to pass parameters, using prototype js: s:set name=foo value=%{'door' + door.id}/ s:set name=form_name value=%{'form_door' + door.id}/ s:set name=door_description value=getText(#foo)/ s:if test=door.state == 1 s:url id=door_url

Re: [Struts 2] Dynamic content of a tooltip for internationalization

2009-10-27 Thread Greg Lindholm
s:textfield name=blabla key=pay.blabla tooltip=%{getText('blabla.tooltip')}/ On Tue, Oct 27, 2009 at 8:16 AM, Fernandes Celinio cfernan...@sopragroup.com wrote: Hi, How do you render the content of a tooltip dynamic ? I am using several messages_XX.properties files, one for each

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread carl ballantyne
Thanks Greg, that does the trick. I am now able to display the validation errors at the top of the form. Quoting Greg Lindholm greg.lindh...@gmail.com: So, fieldErrors is a MapString, ListString, the key is the field name and the value is a ListString of messages. I don't think you can use

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Paweł Wielgus
Hi Greg, i was about writing that one should read iterator tag docs because one can use maps in s:iterator value, but instead i've just read it myself and the info about iterating maps is not there. I use s:iterator where value is a map and it works in 2.1.6 just adding key or value inside

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Greg Lindholm
Hey, you are correct. Just dove into the code and I found that is uses a MakeIterator utility class that if given a Map will call entrySet(). Maybe a commiter will be kind enough update the iterator tag doc to include a Map example and a note on how Map is converted to an Iterator.

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Greg Lindholm
More info for the committer: It looks like the javadoc on org.apache.struts2.components.IteratorComponent contains info that Map is supported but it is not getting into the tag doc perhaps because the !-- END SNIPPET: javadoc -- is messed up and not on it's own line. Also a note that a Map will

Re: RE: Adding Json to existing action

2009-10-27 Thread Michael Varlik
Thanks for that hint. I have extended my mapping by adding param name=rootjsonData/param to my action mapping's result tag. Now I don't get any Exception and the server log looks just fine. However, the value returned by the action is just null. Do you have any idea what could be wrong here?

Re: RE: Adding Json to existing action

2009-10-27 Thread Michael Varlik
I just noticed a mistake I made. When adding the parameter to the result I also have to add a getJsonData() method to the action, right? I have added this method which actually calls execute(). Now I don't get null as a result anymore but I get success which is also not what I expected. I guess

RE: [Struts 2] Dynamic content of a tooltip for internationalization

2009-10-27 Thread Fernandes Celinio
Thanks, it works of course :) -Message d'origine- De : Greg Lindholm [mailto:greg.lindh...@gmail.com] Envoyé : mardi 27 octobre 2009 14:42 À : Struts Users Mailing List Objet : Re: [Struts 2] Dynamic content of a tooltip for internationalization s:textfield name=blabla key=pay.blabla

Re: RE: Adding Json to existing action

2009-10-27 Thread Struts Two
What I meant was either to use Json Plugin for struts 2. Read the following Wiki page: http://cwiki.apache.org/WW/json-plugin.html The JSON plugin is bundled with Struts since 2.1.7. Or you can write your customized Struts 2 Result type for JSON and register it in your struts2.xml for use

Re: RE: Adding Json to existing action

2009-10-27 Thread Musachy Barroso
can you show us your action mapping and the relevant parts of your code? musachy On Tue, Oct 27, 2009 at 8:50 AM, Michael Varlik m.var...@gmx.de wrote: I just noticed a mistake I made. When adding the parameter to the result I also have to add a getJsonData() method to the action, right? I

/struts-tags not found

2009-10-27 Thread Bhaarat Sharma
hello, on our app we are getting error: PWC6117: File /struts-tags not found App is running on Sun App Server 9.1 struts2-core-2.0.6.jar is in class path of the application server. Code in the JSP: %@ taglib prefix=s uri=/struts-tags % What can we do to fix this error? I assume since the

Re: /struts-tags not found

2009-10-27 Thread Musachy Barroso
There are other ways to define a tag library, from jsp spec: The container searches for all files with a .tld extension under /WEB-INF or a subdirectory, and inside JAR files that are in /WEB-INF/lib. When examining a JAR file, only resources under /META-INF or a subdirectory are considered. The

DefaultObjectTypeDeterminer Error

2009-10-27 Thread Pam Teerink
I am receiving the following error and do not know how to resolve the issue DEBUG DefaultObjectTypeDeterminer - Error while retrieving generic property class for property=parameters java.lang.NullPointerException at

Re: /struts-tags not found

2009-10-27 Thread Bhaarat Sharma
If I just extract it in /WEB-INF then I dont have to go back and change all my jsp's If I create a map in web.xml to point to tags on app server class path then I will have to change all my jsp's But just curious. what will the mapping look like? taglib

Re: /struts-tags not found

2009-10-27 Thread Musachy Barroso
I have never used this approach, but I am guessing it would be: taglib taglib-uri/struts-tags/taglib-uri !-- the value of taglib's uri-- taglib-location/WEB-INF/struts-tags.tld/taglib-location /taglib On Tue, Oct 27, 2009 at 1:29 PM, Bhaarat Sharma bhaara...@gmail.com wrote: taglib

Re: DefaultObjectTypeDeterminer Error

2009-10-27 Thread Musachy Barroso
can we see the java class? it seems like it is missing setParameters On Tue, Oct 27, 2009 at 1:19 PM, Pam Teerink pamela.a.web...@wellsfargo.com wrote: I am receiving the following error and do not know how to resolve the issue DEBUG DefaultObjectTypeDeterminer - Error while retrieving generic

Re: i18n within dojo attribute

2009-10-27 Thread larryreed
It occurred to me to use an OGNL form to do this, but I am still having a challenge getting it to work. I've tried s:textfield key=fieldName dojoType=dijit.form.ValidationTextBox promptMessage=${getText('fieldPrompt)} / This gets me past the first problem, but still doesn't work. I am

deserializable ActionSupport

2009-10-27 Thread Lee Clemens
Hello, I (my IDE) noticed a warning showing that my Struts 2 Actions (they extend com.opensymphony.xwork2.ActionSupport) may be deserialized, compromising security. The IDE (IntelliJ 8.1) further states that the class may be deserializable as it supports the Serializable interface (ActionSupport