File Upload into database

2008-10-21 Thread Narayana S
Hi, i am new to struts 2, want to use file upload control. once the file is uploaded i want to store its content into the database, i didn't work on the file upload previously also. so any one can please tell me the best way to access the uploaded file and store that into database? any

Re: File Upload into database

2008-10-21 Thread Mead Lai
There is Example in the show-case app, which is contain with the struts Full Releases package. simplely, U add into Action: private String uploadContentType; private String uploadFileName; private File upload; and use s:file name=upload/ Tag in the jsp Page. U can get file just call

Re: File Upload into database

2008-10-21 Thread ManiKanta G
http://struts.apache.org/2.x/docs/how-do-we-upload-files.html have some info to start. ManiKanta

Re: How to handle different div's and 1 or more ActionForms

2008-10-21 Thread Lukasz Lenart
There is some problem with div's inside form, when you want to return a content from Ajax call, I think it's only on IE, check that. The second though can be duplicated id's for div's or other tags Regards -- Lukasz http://www.lenart.org.pl/

Re: How to handle different div's and 1 or more ActionForms

2008-10-21 Thread Joris Kimpe
Thanks Lukasz, I just found the cause... I was using the same form id in the different divs. I had a jsp included in both divs, and it contained the form bean (which needs to be different for both divs). Lukasz Lenart wrote: There is some problem with div's inside form, when you want to

Re: How to set global date format?

2008-10-21 Thread Suyog Doshi
Hi I am facing same problem Do you got any solution for same? Struts2 Fan wrote: Hi all, I want to set a global date format. Is it possible? I defined format.date={0,date,dd.MM.} in package.properties file, but it does not work. Any ideas? -- View this message in context:

Re: Struts2: Custom Validation, message from property file

2008-10-21 Thread lbastil
Thank you very much! and did you know a possibility to use the existing validators manually? For instance when I manually have to do an email validation, it would be cool to be able to use the functionality of the allready existent emailfieldvalidator. Paweł Wielgus wrote: Hi Ibastil,

Re: Struts2: Custom Validation, message from property file

2008-10-21 Thread Paweł Wielgus
Hi Ibastil, i haven't tried that. But maybe searching in annotation validation will bring some solution for You. Best greetings, Paweł Wielgus. 2008/10/21 lbastil [EMAIL PROTECTED]: Thank you very much! and did you know a possibility to use the existing validators manually? For instance

RE: Struts2: Custom Validation, message from property file

2008-10-21 Thread sean . chen
Hi all: We are planning to develop a new project on Websphere 5.x (Servlet 2.3/JSP 1.2/ JDK 1.4) and wonder if struts2 could work with these components? Thanks in advance sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: File Upload into database

2008-10-21 Thread Narayana S
Hi Thanks for your reply, but when i submit my form it is not setting value for the upload properties. this is how my code is ... -- in jsp s:file name=upload label=Attachment/ -- in action private String uploadContentType; private String uploadFileName; private File upload; and

RE: File Upload into database

2008-10-21 Thread Ketil Holden
Have you set enctype on the form element? Like this: s:form action=action enctype=multipart/form-data ... ?? -Original Message- From: Narayana S [mailto:[EMAIL PROTECTED] Sent: 21. oktober 2008 12:31 To: Struts Users Mailing List Subject: Re: File Upload into database Hi Thanks for

Re: File Upload into database

2008-10-21 Thread Narayana S
yes s:form action=CreateIssue theme=qxhtml method=POST enctype=multipart/form-data this is the form tag... On Tue, Oct 21, 2008 at 4:25 PM, Ketil Holden [EMAIL PROTECTED]wrote: Have you set enctype on the form element? Like this: s:form action=action enctype=multipart/form-data ... ??

Migrating from Struts 1: dynamically loading s:text name=/

2008-10-21 Thread Nick Maunder | Oathouse
Hi all I am migrating myself from JSTL/Struts 1 to Struts 2 I am looking for a way to dynamically load s:text name=somethingDynamic/ In JSTL/Struts 1 I can do this: fmt:message key=${someVariable}/ And i'd like to do this using Struts2: s:text name=somethingDynamicHere/ I

S2 ajax problem

2008-10-21 Thread emre akgün
i am using struts-2 2.0.11.2 version with eclipse europei have 2 jsp page news-alarm.jsp and category-list.jsphere is news-alarm.jsp s:form id=newsAlarmForm name=newsAlarmForm action=newsAlarmSave enctype=application/x-www-form-urlencoded; charset=UTF-8 acceptcharset=UTF-8 s:hidden

Re: Confused by Result-generation

2008-10-21 Thread Stephan Schröder
Ok, i found the answer with debugging DefaultActionInvocation.invoke()-method. It's the first case even if one interceptor doesn't call actionInvocation.invoke(). In that case the result is generated surrounded by all of the previous interceptors. If all (e.g.2) interceptors call

Re: s:if test= how to find out the NULL value?

2008-10-21 Thread Adam Hardy
Mead Lai on 20/10/08 08:25, wrote: Hi All, s:if test=${username !=null}Show something here/s:if You can do this with JSTL tags: c:if test=${not empty username} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: File Upload into database

2008-10-21 Thread Narayana S
now it is working. i could pass the values. i have added these two interceptors to my stack as described in the link given. i need to start working on strong this file content to data base blob field. (lets see ...) interceptor-ref name=fileUpload / interceptor-ref

xwork injecting parameters into requestScope

2008-10-21 Thread Adam Hardy
I have an Action and corresponding JSP form with the property portfolio. In my JSP, I have this JSTL tag test: c:if test=${not empty portfolio and portfolio.id gt 0} stuff /c:if which works fine for my purposes. But then when I submit the form and validation fails and myAction.portfolio is

Re: [S2] why is javascript executed before DOM is updated

2008-10-21 Thread lbastil
For me it is still not clear: with struts 2.0.11, how can I: modyfy DOM which is given back from an AJAX request with javascript at all? concrete: suppose, I have a form, which is updated by a dojo ajax requst. After the form is updated I wnat to execute a javascript which disables two of the

Re: Migrating from Struts 1: dynamically loading s:text name=/

2008-10-21 Thread Lukasz Lenart
I am looking for a way to dynamically load s:text name=somethingDynamic/ try s:text name=%{somethingDynamic}/ and in your action add String getSomethingDynamic() { return some.key; } Regards -- Lukasz http://www.lenart.org.pl/

Re: s:url Tag - Generate Servlet URL in a Portlet Environment

2008-10-21 Thread Torsten Krah
Am Mittwoch, 8. Oktober 2008 10:48:50 schrieb Nils-Helge Garli Hegvik: It's not directly supported (using action and namespace), but if I remember correctly you can use the value attribute to generate a regular non-portlet url. I guess did find some bug. I want to generate a regular servlet

Re: s:url Tag - Generate Servlet URL in a Portlet Environment

2008-10-21 Thread Torsten Krah
Am Dienstag, 21. Oktober 2008 16:11:54 schrieb Torsten Krah: s:url id=pdfurl value=/view/pdfaction.action s:param name=p1 value=20/s:param /s:url And additionally whats not working is something like this:

RE: Migrating from Struts 1: dynamically loading s:text name=/

2008-10-21 Thread Nick Maunder | Oathouse
This is cool, Thanks Lukasz, and it's solved one of two issues for me But I'm going to be difficult because I'm working with Tiles as well! Is there any way of doing it without going to the action class? What I really want to do is use s:text in a standard layout jsp used with Tiles For

Re: Migrating from Struts 1: dynamically loading s:text name=/

2008-10-21 Thread Lukasz Lenart
tiles:importAttribute name=pageTitle / titles:text name=%{pageTitle} //title Try titles:text name=%{#pageTitle} //title Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Migrating from Struts 1: dynamically loading s:text name=/

2008-10-21 Thread Nick Maunder | Oathouse
Good try but it doesn't work... tried #pageTitle as well, and a host of variations using tiles:useAttribute I can't be the only one to want to internationalise/localize page titles?? Couldn't find anything on the web either This is the last fmt tag in my application. It needs to go!! Nick

[s2] Problem getting basic server side field validation to work

2008-10-21 Thread 928572663
I'm trying to do a very basic test app that demonstrates the server side field validation and am getting an exception during initial JSP page rendering. The page and action work fine without the validation. Any ideas what I may be missing? I've read the confluence pages on validation, and

Re: s:url Tag - Generate Servlet URL in a Portlet Environment

2008-10-21 Thread Torsten Krah
https://issues.apache.org/struts/browse/WW-2846 -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus

RE: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread Kawczynski, David
You need to define a result of type input for your action. -Original Message- From: 928572663 [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2008 11:02 AM To: Struts Users Mailing List Subject: [s2] Problem getting basic server side field validation to work I'm trying to do a

Re: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread 928572663
Thanks David for the quick reply. Is the 'input' result type used by the validation framework? My action class does not return that. Thanks, John Kawczynski, David wrote: You need to define a result of type input for your action. -Original Message- From: 928572663 [mailto:[EMAIL

RE: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread Kawczynski, David
Yes, in the event of server-sided validation failure the framework returns the user to this input page -Original Message- From: 928572663 [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2008 11:27 AM To: Kawczynski, David Cc: Struts Users Mailing List Subject: Re: [s2] Problem

Re: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread 928572663
Great - that fixed it. Follow up: supposed this Action class can serve up 10 different JSP pages, all of which need validation. I would want the input result type to forward to whichever of the 10 JSPs that the user was in when the validation error occurred. So what is the best way to

Re: Struts2 validation with portlet

2008-10-21 Thread bakann
Did you find an example ? I think it is not working. devsahu wrote: Hi, Does stuts2 support its validation feature with portlet. Any help is highly appreciated. Thanks, Sabyasachi -- View this message in context:

RE: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread Kawczynski, David
Either have lots of actions in your struts.xml, or use wildcard mappings (http://struts.apache.org/2.0.11.2/docs/wildcard-mappings.html) -Original Message- From: 928572663 [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2008 11:43 AM To: Struts Users Mailing List Subject: Re: [s2]

Re: Struts2 validation with portlet

2008-10-21 Thread Torsten Krah
Am Dienstag, 21. Oktober 2008 17:46:41 schrieb bakann: Did you find an example ? I think it is not working. It is working. I am using 2.0.11.2 with portlets. I am using some field validators and configured validators.xml and my *.xml for the actions and validation triggers fine. -- Bitte

Re: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread 928572663
Thanks David. So are you saying that the struts2 validation framework requires one Action per JSP page? If so, it seems like that needs to be included in the full disclosure section of the validation confluence page :-) If I don't want to go that route (1 Action : 1 JSP), are there any

NoClassDefFoundError

2008-10-21 Thread Rabin Aryal
Hey all, When I deploy my application, I get the error below. Environment: IDE: Netbeans 6.1 Struts: 2.0.11.1 java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:257) at

using GET urls and parameters

2008-10-21 Thread Nick Maunder | Oathouse
Hi all My brain is fried Why won't my struts2 accept a GET URL with parameters?? What I am doing wrong? http://localhost:8080/ffRelease2/User_verifyEmail.action http://localhost:8080/ffRelease2/User_verifyEmail.actionuser=1otv=2d1afe2 118ae59288f3d79fb52abee

Re: using GET urls and parameters

2008-10-21 Thread Musachy Barroso
The url is broken: http://localhost:8080/ffRelease2/User_verifyEmail.actionuser=1otv=2d1afe2 118ae59288f3d79fb52abeehttp://localhost:8080/ffRelease2/User_verifyEmail.actionuser=1otv=2d1afe2118ae59288f3d79fb52abee user=1otv=2d1afe2118ae59288f3d79fb52abee fix to this:

FW: using GET urls and parameters

2008-10-21 Thread Nick Maunder | Oathouse
Please excuse my stupidity I was separating parameters from url with instead of ? duh!! Time for the pub Nick -Original Message- From: Nick Maunder | Oathouse [mailto:[EMAIL PROTECTED] Sent: 21 October 2008 17:18 To: 'Struts Users Mailing List' Subject: using GET urls and parameters

Re: NoClassDefFoundError

2008-10-21 Thread Torsten Krah
Am Dienstag, 21. Oktober 2008 18:20:09 schrieb Rabin Aryal: Does anybody know what might cause it? You are undeploying your app - according to your stacktrace. I am getting this error too, but not reproducable - sometimes it undeploys without those exception, sometimes not. Additionally i am

Re: Struts2 validation with portlet

2008-10-21 Thread Nils-Helge Garli Hegvik
The source for the example portlet app is here: http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_11_2/apps/portlet/ On Tue, Oct 21, 2008 at 5:46 PM, bakann [EMAIL PROTECTED] wrote: Did you find an example ? I think it is not working. devsahu wrote: Hi, Does stuts2 support

RE: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread Kawczynski, David
The action-per-jsp page is just one way to do things. Another is to use wildcard actions in your struts.xml page. Your input pages would all have to employ the same naming convention, as would the actions called by each of those pages. Check out the wildcard-mappings link and you'll see what I

RE: NoClassDefFoundError

2008-10-21 Thread Rabin Aryal
Thanks for the quick reply. I am trying to deploy the application on Tomcat 6.x. I get the error logged in log file and nothing loads. Hope anybody else know the problem. Thanking Sincerely, Rabin Aryal -Original Message- From: Torsten Krah [mailto:[EMAIL PROTECTED] Sent:

Re: s:url Tag - Generate Servlet URL in a Portlet Environment

2008-10-21 Thread Nils-Helge Garli Hegvik
Thanks for the report. I think i understand the problem. Until it's fixed, you can just created your non-portlet urls by hand (or with JSTL or equivalent). Nils-H 2008/10/21 Torsten Krah [EMAIL PROTECTED]: https://issues.apache.org/struts/browse/WW-2846 -- Bitte senden Sie mir keine Word-

Re: Remove [EMAIL PROTECTED]

2008-10-21 Thread Nils-Helge Garli Hegvik
I agree. On Mon, Oct 13, 2008 at 10:49 AM, Lukasz Lenart [EMAIL PROTECTED] wrote: Hi, Could someone remove this email from list? It's very annoying ;-( Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe,

Re: [s2] Problem getting basic server side field validation to work

2008-10-21 Thread 928572663
David, Yeah I had read the wildcard-mappings.html link, but it just isn't clear to me how this would work: 1. I'm using annotation-based action definitions (no struts.xml) so I'm not explicitly declaring the action name. 2. When invoking my actions, I'm using the method form of the

Re: xwork injecting parameters into requestScope

2008-10-21 Thread Adam Hardy
Adam Hardy on 21/10/08 14:12, wrote: I have an Action and corresponding JSP form with the property portfolio. In my JSP, I have this JSTL tag test: c:if test=${not empty portfolio and portfolio.id gt 0} stuff /c:if which works fine for my purposes. But then when I submit the form and

[ANN] VTD-XML extended edition released

2008-10-21 Thread jimmy Zhang
The Java version of extended VTD-XmL is released and available for download. This version supports 256 GB max file sizes and memory mapped capabilities. The updated documentation is also available for download. In short, you can basically do full XPath query on documents that are bigger than

Re: xwork injecting parameters into requestScope

2008-10-21 Thread dusty
Can you describe what you are doing in the Action and on the page a little bit more? It seems like you are trying to resolve if the portfolio is new or not. Where in your action do you load up the portfolio object? Are you familar with the Preparable interface for your actions? What does your

Re: [ANN] VTD-XML extended edition released

2008-10-21 Thread Mead Lai
supports 256 GB max file sizes?? Any system memory requirement? Wanne PC memory larger than 256G? There is no pc support so max memory now. On Wed, Oct 22, 2008 at 10:24 AM, jimmy Zhang [EMAIL PROTECTED] wrote: The Java version of extended VTD-XmL is released and available for download. This