Re: Graphical Configuration Utility

2008-12-16 Thread ManiKanta G
well that is not the issue with the S2GUI jar... but with the Java itself... When the jar file having dependencies is in folder names '!' (with out quotes, only exclamatory sign) in windows, is is failing to open the main class. When I moved out the '!' folder, it is working fine. This is second

Fwd: Exception when using ServletActionRedirectResult with @Result

2008-12-16 Thread Amin Mohammed-Coleman
Sent from my iPhone Begin forwarded message: From: Amin Mohammed-Coleman Date: 28 November 2008 22:07:10 GMT To: "Struts Users Mailing List" Subject: Re: Exception when using ServletActionRedirectResult with @Result Hi I do apologise, I didn't mean to send it three times. My email

RE: Disabling i18n support on Struts1/Struts2

2008-12-16 Thread nodje
Hi, I'm sorry, I'm not sure I understand. What exatly is supposed to do? Force Struts to look for all resources in a single resource-bundle instead of looking for the localized one? cheers Seshagiri V wrote: > > > Hi All, > Please use following code in struts.xml file. > >

Re: Simple Question?

2008-12-16 Thread Mark Rollins
Thanks Dave, that's sorted it. I've worked with many technologies over many years, but the quirks of OGNL with Struts2 seem to defy reason for me. Totally frustrating! But thanks again for your help. >The answer is that OGNL interprets a single character between single quotes as a character, n

Re: Invalid path was requested

2008-12-16 Thread laredotornado
Thanks for your example. It helped me realize that when I edited my path so that it was relative to the context path of my app, instead of cutting and pasting everything after the domain, everything worked just fine. - Dave Paweł Wielgus wrote: > > Hi Dave, > i have almost the same code and

A complete listing of velocity struts 2 tags?

2008-12-16 Thread James Carr
Is there a complete listing of the struts 2 tags in velocity? Specifically, I want to use the #stext tag with parameters (for a parameterized i18n property) but unfortunately cannot find any example at all anywhere. I tried this: #stext("name=foo.bar.baz") #sparam(1123) #end but no luck. I am

expression validator NPE

2008-12-16 Thread stanlick
I have encountered a validation that seems to disrupt the S2 request life cycle. If I have the following validation and foo is not found on the stack, I do not get a result! foo.startsWith(validPrefix)

Re: html:form windowstate

2008-12-16 Thread Nils-Helge Garli Hegvik
Are you using the struts 1 portlet bridge? (http://portals.apache.org/bridges/multiproject/portals-bridges-struts) Haven't used it myself, but I'd be surprised if the framework didn't support creating portlet urls. I have only used a WebSphere Portal-proprietary extension which (from what I remembe

Re: .properties variable from action class

2008-12-16 Thread Oscar Alvarez
if you extend ActionSupport try getText("name.of.your.property") 2008/12/16 elyes sallem > Hello, > i wanna know how get back a property variable defined in ".properties" file > from an exceute method, in the action class > > Regards > Elyes. >

Re: Simple Question?

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, Oscar Alvarez wrote: > try puting a comparator in your action like this > > public Boolean isPipeEditAction(){ >return "|".equals(getEditAction()); > } > > and then test it in your view I think your font is fooling you--the original question was regarding a capital

Re: Simple Question?

2008-12-16 Thread Oscar Alvarez
try puting a comparator in your action like this public Boolean isPipeEditAction(){ return "|".equals(getEditAction()); } and then test it in your view 2008/12/16 Dave Newton > > Famoso Struts OGNL :-)! > > Or typical Java. > > OGNL one-ups Java, in fact, as OGNL will treat multiple cha

Re: Simple Question?

2008-12-16 Thread Dave Newton
> Famoso Struts OGNL :-)! Or typical Java. OGNL one-ups Java, in fact, as OGNL will treat multiple characters within single-quotes as a string, but falls back to standard Java if it's a single character. Dave > Musachy Barroso wrote: > > > > I think OGNL will try 'I' as a character, so > the

Re: Simple Question?

2008-12-16 Thread Milan Milanovic
Famoso Struts OGNL :-)! Musachy Barroso wrote: > > I think OGNL will try 'I' as a character, so they will never match, > just a hunch :) > > musachy > > On Tue, Dec 16, 2008 at 11:58 AM, Mark Rollins > wrote: >> >> I know this should be obvious. Perhaps I'm just too thick to use Struts2! >>

S2: using a button how can I get a value of a field in the interceptor?

2008-12-16 Thread xianwinwin
Hi all, I have a button that once clicked an Interceptor does something. So...I have a form that requires the user to input an ID, how can I check, in the interceptor, if this value is valid BEFORE it gets to the action class. in other words: say a field called resourceID (Long) and the user in

.properties variable from action class

2008-12-16 Thread elyes sallem
Hello, i wanna know how get back a property variable defined in ".properties" file from an exceute method, in the action class Regards Elyes.

[S2] Problem with testing S2 Action when JasperResult type is used

2008-12-16 Thread Milan Milanovic
Hi, I have defined a following Struts 2 action which show one simple PDF report: /reports/MainReport.jasper parameters connection PDF And I'm trying to test with JUnit 4 this act

Re: Simple Question?

2008-12-16 Thread Musachy Barroso
I think OGNL will try 'I' as a character, so they will never match, just a hunch :) musachy On Tue, Dec 16, 2008 at 11:58 AM, Mark Rollins wrote: > > I know this should be obvious. Perhaps I'm just too thick to use Struts2! > > I have an action class with a private String editAction and correspo

Simple Question?

2008-12-16 Thread Mark Rollins
I know this should be obvious. Perhaps I'm just too thick to use Struts2! I have an action class with a private String editAction and corresponding public getter/setter. I know the value for this String is "I". In the view I need to test the value of this field using , to see if it is "I" I've

RE: html:form windowstate

2008-12-16 Thread Evert Lammerts
Hi Nils, I've tried your suggestion but it doesn't seem to be possible. The action attribute in html:form expects an Action URI, while actionURL creates an absolute URL. Still, being a beginner with this, I'm pretty sure I'm missing something - I guess it IS possible to create a form tag that s

Re: Fwd: export file data using formFile

2008-12-16 Thread elyes sallem
it forwarded me to page with "unreadable data" comapred to the first example, you omit the resp.setHeader("Content-Disposition", ... here is the code ,i have the export method in a dispatch action : public ActionForward exportSelectedIntaff(ActionMapping mapping, ActionForm form, H

Re: Oops... ignore the stupid job posting I just allowed through.

2008-12-16 Thread Antonio
2008/12/16 Dave Newton : > I hit the wrong button. I hope it wasn't red and big Antonio - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Oops... ignore the stupid job posting I just allowed through.

2008-12-16 Thread Dave Newton
I hit the wrong button. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Softwareart Requirement List - 12/16/2008

2008-12-16 Thread Vinit
Click here to Remove (struts-u...@jakarta.apache.org) from our mailing list. Dear Yahoo: These are the requirements currently open. Req. ID: Req-0207 - System Analyst,

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, red phoenix wrote: > How to look if I use the default stack? > > > [...] It's important to know how the framework you're using works (IMO). You are extending the default package. You can see how the default package is configured by understanding what's in the default

Re: S2 V2.0.14: with HTML in property key value

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, Robert Graf-Waczenski wrote: > I would like to avoid the HTML encoding, so that the button > caption is instead " OK " (i.e. with spaces to > the left and the right next to "OK"). > > Any ideas? Personally I'd use CSS for this. Dave -

S2 V2.0.14: with HTML in property key value

2008-12-16 Thread Robert Graf-Waczenski
Hello all, I'm using and my properties file looks like this: myproperties.caption.buttoncaption=  OK   This yields a button with the label "  OK  ", i.e. the button text has been HTML-encoded before it was sent to the browser. I would like to avoid the HTML encoding, so that the button ca

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
>How to look if I use the default stack? My configure file is follows: /demo/upload.jsp Is it "fileUpload" interceptor? phoenix On Tue, Dec 16, 2008 at 11:55 PM, Dave Newton wrote: > --- On Tue, 12/16/08, red phoenix wrote: > > It says: Ensure that {{fileUpload }} Inter

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, red phoenix wrote: > It says: Ensure that {{fileUpload }} Interceptor is included in the > Action's stack. .*The default stack already includes {{fileUpload }}.* > > I don't know how to determine 'Ensure that {{fileUpload }} Interceptor > is included in the Action's stack",w

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
>Use the *preferred* method, the interceptor. It says: Ensure that {{fileUpload }} Interceptor is included in the Action's stack. .*The default stack already includes {{fileUpload }}.* I don't know how to determine 'Ensure that {{fileUpload }} Interceptor is included in the Action's stack",which

Re: Fwd: export file data using formFile

2008-12-16 Thread Robert Graf-Waczenski
Hi Elyes, something like this here should work: OutputStream out = resp.getOutputStream(); FileInputStream fileStream = new FileInputStream("path/to/your/excelFile.xls"); int bufferLen = 1024 * 8;// 8 KB byte[] buffer = new byte[bufferLen]; while (tru

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread Dave Newton
Use the *preferred* method, the interceptor. I haven't looked in to what caused the breaking change. Dave --- On Tue, 12/16/08, red phoenix wrote: > From: red phoenix > Subject: Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be > cast to org.apache.struts2.dispatcher.multipart

Re: get file path from FormFile

2008-12-16 Thread elyes sallem
ok, for the upload, i saved the file on the server so i create a tmp file in this directory "servlet.getServletContext().getRealPath("/")" is it ok for the place , or i must create temporary file in an other location? if not OK, where do i have to create them? Thanks Regards Elyes 2008/12/16

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
In http://struts.apache.org/2.0.14/docs/how-do-we-upload-files.html , it use MultiPartRequestWrapper multipartRequest = (MultiPartRequestWrapper) ServletActionContext.getRequest(); It still raise java.lang.ClassCastException: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.

Re: preparable inceptor and validation

2008-12-16 Thread srinivasa_v .
Hi, Can u explain me in more detail. On Tue, Dec 16, 2008 at 7:37 PM, Andy Sykes wrote: > Hi, > > My simple solution to the same problem was to check if any validation > errors had occurred at the end of the validation method [with > hasFieldErrors()], then call my prepareXXX method from there

Re: Fwd: export file data using formFile

2008-12-16 Thread elyes sallem
Hello Robert , so assume that i have an excel file on the server and i have a button to download it for the client (of course with a browse dialog) could you show me how develop it , in your example , you call writePDFDataToOutputStream and it is a pdf file which is not my case Thanks Regards Ely

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, red phoenix wrote: > [...] > MultiPartRequestWrapper multipartRequest = > (MultiPartRequestWrapper) ServletActionContext.getRequest(); > [...] > > org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to > org.apache.struts2.dispatcher.multipart.MultiPartReque

org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
I use struts2.0.14,I want to use upload function,my jsp file is follows: ... struts action is follows: public String uploadFile() throws Exception{ MultiPartRequestWrapper multipartRequest=((MultiPartRequestWrapper)ServletActionContext.getRequest()); ... return SUCCESS; } when I s

Re: Graphical Configuration Utility

2008-12-16 Thread mpeccorini
ManiKanta G-2 wrote: > > It is good to hear some one started and done some thing reg gui console. > I'm very glad this was something that people wanted, I was afraid I could get 100 messages pointing me to already developed applications :p ManiKanta G-2 wrote: > > Well I got the below erro

Re: preparable inceptor and validation

2008-12-16 Thread Andy Sykes
Hi, My simple solution to the same problem was to check if any validation errors had occurred at the end of the validation method [with hasFieldErrors()], then call my prepareXXX method from there. On 16 Dec 2008, at 05:39, srinivasa_v . wrote: Hi All, I have sistutation where I need to

Re: alignment problem in struts2

2008-12-16 Thread Andy Sykes
Hi, No idea why it doesn't work - I found the XHTML theme to be a bit cumbersome for anything other than a stack of fields, one on top of the other. Use the simple theme - it'll give you more flexibility. You can write your own themes as well. For getting the validation errors in the si

Re: get file path from FormFile

2008-12-16 Thread Nils-Helge Garli Hegvik
So... are you: 1) Trying to upload a file to the server? 2) Trying to send a file the browser? 3) Both? If 1) See if http://wiki.apache.org/struts/StrutsFileUpload can help. If your API only accepts a file path, save the file as a temp file locally on the server. If 2) The solution has been provi

Re: tag

2008-12-16 Thread Dave Newton
Use the html:options [1] or html:optionsCollection tag [2]? [1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#options [2] http://struts.apache.org/1.2.9/userGuide/struts-html.html#optionsCollection Dave --- On Tue, 12/16/08, m.harig wrote: > From: m.harig > Subject: Re: tag > To

Re: get file path from FormFile

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, elyes sallem wrote: > to avoid any confusion, Too late! > 1- i have data in a file, so through the formfile, i get > the file path (now i make the test locally, but after it > will be deployed on a server) and i load this data in a > database, depending on the file's meta

Re: tag

2008-12-16 Thread m.harig
is there anyone to answer my question%-| m.harig wrote: > > hi all > > am getting no.of users from DAO class and all username are in the form of > User Object. > > ArrayList list = new ArrayList(); > while(rs.next()){ > User user = new User();

Re: get file path from FormFile

2008-12-16 Thread elyes sallem
to avoid any confusion, all i want to do is that : 1- i have data in a file, so through the formfile, i get the file path (now i make the test locally, but after it will be deployed on a server) and i load this data in a database, depending on the file's meta data, and its content 2- i allow the us

Re: get file path from FormFile

2008-12-16 Thread Nils-Helge Garli Hegvik
Ah...finally someone cracked the code! Nils-H On Tue, Dec 16, 2008 at 1:55 PM, Dave Newton wrote: > --- On Tue, 12/16/08, elyes sallem wrote: >> this library, take as input a file and depending on this >> file's metadata generates tables in a database and make trt >> after this (so as a constrai

TypeConversionException and the conversionError interceptor

2008-12-16 Thread Daniel Baldes
Hello, I got a problem with type conversion errors. I have several custom type converters which throw a TypeConversionException in case the conversion fails. However, the conversionError interceptor does not add any field errors to the action in that case; furthermore, it seems that struts ra

Re: get file path from FormFile

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, elyes sallem wrote: > this library, take as input a file and depending on this > file's metadata generates tables in a database and make trt > after this (so as a constraint, i can't modify the class in > this jar) So... you're *uploading* a file to the server (from the use

error and messages in jsp page

2008-12-16 Thread elyes sallem
Hello, i want to display some message and some errors, if there is an exception but the problem is that , in the jsp page, i get only the first line of the error message here is the code : ActionMessage message = new ActionMessage("error.fichierEntree.chargement",e.getCause().getMessage());

Re: get file path from FormFile

2008-12-16 Thread elyes sallem
this library, take as input a file and depending on this file's metadata generates tables in a database and make trt after this (so as a constraint, i can't modify the class in this jar) Regards Elyes 2008/12/16 Nils-Helge Garli Hegvik > What library (jar) is this? I assume that you mean tha

Re: get file path from FormFile

2008-12-16 Thread Robert Graf-Waczenski
Looking at your previous posts, i think that you are wasting your time even thinking about using a java applet. Go back a few steps and think again, maybe answering the following simple sequence of questions: 1) Your web application server has access to some data somewhere. The data can be any

Re: html:form windowstate

2008-12-16 Thread Nils-Helge Garli Hegvik
You can probably use the 'var' attribute of the portlet:actionURL tag to store the url as a variable which you can reference by an expression in the html:form tag. Take a look at the tag reference for the portlet tags (PLT.22.2) in the JSR168 spec [1] for details. Nils-H [1] - http://jcp.org/abou

html:form windowstate

2008-12-16 Thread Evert Lammerts
Hi all, Using struts 1.3.8 I'm trying to use the struts-html taglib to create a form attribute that submits the form to a maximized window state, like possible with the actionURL tag: "> " method="POST"> Is there a way to do this? Maybe with a hidde

Re: howto get useable protocol string

2008-12-16 Thread cpanon
Hi Dave Thanks, however where can I get a list of the methods of the available implicit object that I can get access to with struts beans and their proper syntax calls? I tried the object and they just provide generic calls. Also is it possible to just get http/https or do I have to parse out

Re: get file path from FormFile

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, elyes sallem wrote: > after publishing this question, i conclude that it is not > possible de get back the absolute path from FormFile but > the problem is that i import a jar file, in which i call > a method that accept only path of file so what do you propose, > i get the

Re: get file path from FormFile

2008-12-16 Thread Nils-Helge Garli Hegvik
What library (jar) is this? I assume that you mean that this library generates the actual file content that you want to send back to the browser? As you suggest, one way is to create a temp file which you read and stream back to the browser. Or you could save the file in a public area where it can

Re: Login twice

2008-12-16 Thread Lorenzo Carnevale
Put a check in the Login Action : if there is alreay an user logged in, the check should return an error to the user. Hi All, I could logged in twice in the same session. How to block it second time in struts oriented . Please send with solution. Thank you, Seshagiri V seshagi...@ken

get file path from FormFile

2008-12-16 Thread elyes sallem
Hello, after publishing this question, i conclude that it is not possible de get back the absolute path from FormFile but the problem is that i import a jar file, in which i call a method that accept only path of file so what do you propose, i get the inputstream , then i create temporarly a file a

Re: alignment problem in struts2

2008-12-16 Thread VSG
Hi Manikanta, I have gone throgh the documents. so,With the default(XHTML) theme Im unable to put two fileds in the same row? Can u pls tell why? Could u provide me a solution. i try to see with the following lines of code but it is not w

Re: preparable inceptor and validation

2008-12-16 Thread Lukasz Lenart
Do you use custom interceptor stack? Please check that [1] [1] http://struts.apache.org/2.x/docs/why-isnt-our-prepare-interceptor-being-executed.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-

Re: alignment problem in struts2

2008-12-16 Thread ManiKanta G
> > It should appear in the same row.But the problem is here it is apperaing > in two rows. > Which i want in one row.And the same thing with the buttons cancel and > reset button should appear in same row. > If u've seen the S2 docs, S2 uses templates/themes while constructing the views. By

alignment problem in struts2

2008-12-16 Thread VSG
Hi, I am using default form theme.Means i am not putting any thing in the form attribute In this form i need two fields in the same row. Like It should appear in the same row.But the problem is here it is apperaing in two rows. Which i want in one row

Re: Message properties on actions level

2008-12-16 Thread Marsman
newton.dave wrote: > > I don't really see it as a problem, quite frankly; it sounds like your > package layout is either too tightly-coupled or you're trying to make your > messages too fine-grained. > Yes, maybe I do so. But I had classified the action dependent properties as a nice feature a

Re: [S2] ServletDispatcherResult (dispatcher) and forwarding to Actions

2008-12-16 Thread Dirk Forchel
okay, I could strip off the context path from my "referer", but using a relative URL like "/welcome.action" or "/demostore/welcome.action" doesn't work either. Only something like "/jsp/pages/welcome.jsp" or similiar (a relative URL with a JSP resource) works for me. But I wanna use Tiles, so this

Re: Login twice

2008-12-16 Thread Nils-Helge Garli Hegvik
Sessions are managed by the container, so there's no "Struts" way to block this. It all depends on what you're doing, and how you're doing security/login. Are you for instance using the correct scope in your beans if you're using Spring? Without more information about your setup, we can't help you.

Login twice

2008-12-16 Thread Seshagiri V
Hi All, I could logged in twice in the same session. How to block it second time in struts oriented . Please send with solution. Thank you, Seshagiri V seshagi...@kensium.com. US Main: 877 KENSIUM (536.7486) US Fax: 312.242.3029 Kensium 200 S Wacker Dr, Suite 3100 Chicago,

RE: Disabling i18n support on Struts1/Struts2

2008-12-16 Thread Seshagiri V
Please same code commented in strus.xml file. Thank you, Seshagiri V seshagi...@kensium.com. US Main: 877 KENSIUM (536.7486) US Fax: 312.242.3029 Kensium 200 S Wacker Dr, Suite 3100 Chicago, IL 60606 Confidentiality Note: -