Would like to read more about "Flexible Cancel Buttons - Go directly to a different action on cancel."

2007-04-16 Thread Vlad2006
Hi, On the Struts 2 start page one statement reads: "Flexible Cancel Buttons - Go directly to a different action on cancel." Could anybody point me to a page where this statement is explained? /Vlad -- View this message in context: http://www.nabble.com/Would-like-to-read-more-about-%22Flexib

Map-backed forms in Struts2

2007-04-16 Thread James Navin
Hi all, A system I am developing requires forms to be generated dynamically at runtime based on data stored in a database. I have read that it is possible to use map-backed forms in Struts1 to achieve this using something of the form '' where the associated Action class has a method of the form '

Re: Interceptors and thread-safety

2007-04-16 Thread Dale Newfield
Laurie Harper wrote: Likewise, should two different users both calling an execAndWait action be able to co-exist, or will they mess with each other up? One would hope the former ;-) execAndWait obeys the thread-safety requirement, so there shouldn't be any collisions on a request-by-request b

Re: newbie alert: forward to a php script

2007-04-16 Thread Chris Pat
Hi Laurie Thanks. All I need is to send a HTTP Post request to the php script with the parameters that the Action received, but having done some processing in the Action. At this point I dont care if the client sees the results of the php output. I dont see how to generate something like a R

Struts2 select tag multiple select

2007-04-16 Thread stephanie
I have a form where I populate a select tag with a list of possible roles. What I now want to do is pre-select all of the roles that the user I am editing already belongs to. I have searched every possible place I can and have tried all possible ways people have suggested but I just can't get i

Re: newbie alert: forward to a php script

2007-04-16 Thread Laurie Harper
Chris Pat wrote: Hello Is it possible to have an Action that processes some data and then posts to a url completely out of control of the framework? I want to process and write to a db first and then using the same parameters and any added session variables post to a php script, initially run

Re: Interceptors and thread-safety

2007-04-16 Thread Laurie Harper
Dale Newfield wrote: Shahak Nagiel wrote: This was my concern exactly; Is a separate interceptor instance shared among all references to each action, or more broadly just a Struts-wide singleton? For example, if you configure an execAndWait for both actions "foo" and "bar", with delays of 2

Re: Interceptors and thread-safety

2007-04-16 Thread Laurie Harper
Dave Newton wrote: --- Laurie Harper <[EMAIL PROTECTED]> wrote: Shahak Nagiel wrote: So, how can these [interceptors] be thread-safe if new Interceptors aren't being instantiated for every request? Because the parameters don't come from (or vary with) the request. Just to add on/clarify a

Struts 1.3.8: "Sidebar: Sharing JAR Files Across Web Applications"

2007-04-16 Thread Ken Miller
I have a question regarding the above section in the user guide for Struts 1.3.8, which can be found here: http://struts.apache.org/1.3.8/userGuide/configuration.html#config_add In particular, I'm interested in the following paragraph: - When a class is loaded from a shared

newbie alert: forward to a php script

2007-04-16 Thread Chris Pat
Hello Is it possible to have an Action that processes some data and then posts to a url completely out of control of the framework? I want to process and write to a db first and then using the same parameters and any added session variables post to a php script, initially running on localhost b

Re: tiles-defs.xml and extended attributes...

2007-04-16 Thread Martin Gainty
which IDE??? M This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy t

Re: tiles-defs.xml and extended attributes...

2007-04-16 Thread Dave Newton
--- Martin Gainty <[EMAIL PROTECTED]> wrote: > Apologies for jumping in mid-thread..Can I assume by > 'extension' you mean VaLang? In which case have you > looked at implementing Validation with Spring > Validators? Whahuh? He's talking about the validation of an XML configuration file from with

Struts2, Tiles2 and Container Managed Security

2007-04-16 Thread Torsten Römer
I am trying to use Container managed security with Struts2 and Tiles2. I created a Tiles definition called "loginTiles" for the login page, and in my package called "page" with namespace "/page", I have the following action: {1}Tiles I am using this action as and in web.xml: /page/logi

Re: Change the searchLimit for the autocompleter?

2007-04-16 Thread Musachy Barroso
I didn't even know there was a limit until I saw it the other day on Dojo's code. Just adding an attribute is easy, so it can be tackled for 2.0.8: https://issues.apache.org/struts/browse/WW-1886 musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: Is there a way to change the default

Re: tiles-defs.xml and extended attributes...

2007-04-16 Thread Martin Gainty
Apologies for jumping in mid-thread..Can I assume by 'extension' you mean VaLang? In which case have you looked at implementing Validation with Spring Validators? https://springmodules.dev.java.net/docs/reference/0.8/html/validation.html M This email message and any files transmitted with it co

Change the searchLimit for the autocompleter?

2007-04-16 Thread Adam Ruggles
Is there a way to change the default searchLimit on the autocompleter tag? I guess the default is 30 but I need that increased. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, Ashish Kulkarni wrote: > Here is the code where i read the dom tree and then convert it to a String, > then convert this string into Byte array and then user > DocumentBuilder().parse to parse it. Silly question... why are you going that? Is

Re: [S2] How to link Tree Node to another dynamic ajax div

2007-04-16 Thread Musachy Barroso
This was fixed on trunk, which will be 2.1. The problem you are having is because Dojo changed the API, now instead of passing the id, an object is passed, with a "node" property pointing to the widget object for the selected node, so to get the id of that node, do something like: dojo.even.topic

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Joe Germuska
See, the problem is that you're not handling the character encoding correctly in general. You should use String's getBytes method only when you know what you're doing, because the whole point of character encodings is that you can represent any given string with different sequences of bytes. I'd

RE: tiles-defs.xml and extended attributes...

2007-04-16 Thread Rod Bollinger
Hi Antonio, I agree that that works. In fact, both approaches function identically. That is not the issue. The only issue I was raising was how to make the SimpleMenuItem extension attributes validate properly in an IDE. Since, they are not declared in the DTD, I fear that XML validation will not

Re: [S2] How to link Tree Node to another dynamic ajax div

2007-04-16 Thread Minerva CC
Hi Dave, Thanks for pointing out the problem. But, how can we work around before you guys post the fix? I tried to just put the dojo code that generated by the tree tag and combined with the code in the showcase and the solution posted by Manu Mahajan. My test.jsp looks like follows. Now, it

Re: error when deploying app with struts 1.2 and weblogic 8.1sp5

2007-04-16 Thread Baiyu Li
Yes it's the key. it's working now. Thanks for the great help! On 4/16/07, Dave Newton <[EMAIL PROTECTED]> wrote: -- Baiyu Li <[EMAIL PROTECTED]> wrote: > I have a ear app just upgrading to struts 1.2.9. > [ weblogic ] I know that Weblogic comes with its own version of Struts. We had various is

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Ashish Kulkarni
Hi Here is the code where i read the dom tree and then convert it to a String, then convert this string into Byte array and then user DocumentBuilder().parse to parse it. I get error in factory.newDocumentBuilder().parse(byteArray); TransformerFactory tFactory = TransformerFactory.ne

Re: struts2 equivalent of html:link tag?

2007-04-16 Thread Allen Gilliland
Dave Newton wrote: --- Allen Gilliland <[EMAIL PROTECTED]> wrote: okay, but at that point there is no real reason to use the s:url tag at all If you're not dealing with contexts, perhaps not. login page and had this in your struts config file ... In S1 my impression was that i

Re: error when deploying app with struts 1.2 and weblogic 8.1sp5

2007-04-16 Thread Dave Newton
-- Baiyu Li <[EMAIL PROTECTED]> wrote: > I have a ear app just upgrading to struts 1.2.9. > [ weblogic ] I know that Weblogic comes with its own version of Struts. We had various issues w/ classpaths--there is a setting to tell Weblogic to "prefer" the libs found in your application's WEB-INF/lib

error when deploying app with struts 1.2 and weblogic 8.1sp5

2007-04-16 Thread Baiyu Li
Hi, I have a ear app just upgrading to struts 1.2.9. After change codes according to new struts, the build was successful. But when I deploy it I always got some exceptions like these: SEVERE: Begin event threw exception java.lang.reflect.InvocationTargetException at sun.reflect.Generated

Re: pls help - > how to use document.getElementsByTagName inside html:text

2007-04-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, john lee wrote: > plain html file > > i can use javascript to access "input" tag by > document.getElementsByTagName("INPUT"); > > but for struts html file > > i can not use javascript to access "input" t

Re: [OT] Re: Force clean / reload a webapp

2007-04-16 Thread Dave Newton
--- piloupy GOTTAPIL wrote: > That's how I configured eclipse in the Build Path. > WEB-INF/src --(compile_to)--> WEB-INF/classes. > > But eclipse doesn't seem to rebuild the classes. I > think it's because the element that needs these files > is tomcat, and not a simple java application. It shoul

Re: pls help - > how to use document.getElementsByTagName inside html:text

2007-04-16 Thread john lee
dave, tks ur reply. when i test plain html file with input tag document.getElementsByTagName("INPUT").length>0 when i test struts html file with html:text tag document.getElementsByTagName("INPUT").length=0 any clue? tks john Dave Newton

Re: pls help - > how to use document.getElementsByTagName inside html:text

2007-04-16 Thread Dave Newton
--- john lee <[EMAIL PROTECTED]> wrote: > plain html file > > i can use javascript to access "input" tag by > document.getElementsByTagName("INPUT"); > > but for struts html file > > i can not use javascript to access "input" tag > by either document.getEle

Re: struts2 equivalent of html:link tag?

2007-04-16 Thread Dave Newton
--- Allen Gilliland <[EMAIL PROTECTED]> wrote: > > > okay, but at that point there is no real reason to > use the s:url tag at all If you're not dealing with contexts, perhaps not. > login page > > and had this in your struts config file ... > > > path="/ui/login-redirect.jsp"/> > In S

pls help - > how to use document.getElementsByTagName inside html:text

2007-04-16 Thread john lee
plain html file i can use javascript to access "input" tag by document.getElementsByTagName("INPUT"); but for struts html file i can not use javascript to access "input" tag by either document.getElementsByTagName("INPUT"); or

Re: struts2 equivalent of html:link tag?

2007-04-16 Thread Allen Gilliland
Dave Newton wrote: From: Allen Gilliland <[EMAIL PROTECTED]> that works fine for any actions that i have defined, but it doesn't work for non-struts actions. okay, but at that point there is no real reason to use the s:url tag at all because i am no longer pointing to a logical name for

Re: struts2 equivalent of html:link tag?

2007-04-16 Thread Dave Newton
> From: Allen Gilliland <[EMAIL PROTECTED]> > that works fine for any actions that i have defined, but it doesn't work > for non-struts actions. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail

Re: struts2 equivalent of html:link tag?

2007-04-16 Thread Allen Gilliland
that works fine for any actions that i have defined, but it doesn't work for non-struts actions. so if i wanted "login" to point to a url like "/ui/something.jsp" or "/ui/login-old.do" then i can't do that because it will always just form the url as if the action existed. i need the ability t

Re: struts2 equivalent of html:link tag?

2007-04-16 Thread Shahak Nagiel
How about: >login This will generate a link to the "login.action" URL (as configured in struts.xml) and, if necessary, do the appropriate URL encoding for the session. - Original Message From: Allen Gilliland <[EMAIL PROTECTED]> To: user@struts.apache.org Sent: Monday, April 16, 2007 4

Re: Struts in Servlet 2.4

2007-04-16 Thread Dave Newton
I'd still try it without it, because that's just the way I am ;) I mean, it's obviously there if you're enumerating over it... - Original Message From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Monday, April 16, 2007 4:04:50 PM Subject: RE: Struts in

Re: Struts in Servlet 2.4

2007-04-16 Thread Martin Gainty
I did'nt see The bean:define for Contact before its usage in paramName M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, pl

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Joe Germuska
On 4/16/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, Ashish Kulkarni wrote: > I have java class which creates an XML file from SQL resultset, > It works fine in USA, but i am having issues when this process runs in > Germany where the

RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
> > <%@ page session="false"%> > > Whoa. > > "session="true | false" > > Whether the client must join an HTTP session in order to use > the JSP page. If the value is true, the session object refers > to the current or new session. > > If the value is false, you cannot use the session object

Re: [OT] How to handle non UTF characters in XML

2007-04-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, Ashish Kulkarni wrote: > I have java class which creates an XML file from SQL resultset, > It works fine in USA, but i am having issues when this process runs in > Germany where they have non UTF characters in there database like ü or á. I th

RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
> From: Martin Gainty <[EMAIL PROTECTED]> > >I dont understand why looping would help when your webserver > cant find a page whicgh is misconfigured or missing??? > > The problem doesn't have anything to do with a missing page, > the problem is that even though a bean is in scope and works > o

struts2 equivalent of html:link tag?

2007-04-16 Thread Allen Gilliland
Is there any struts2 equivalent to the struts1 html:link tag? I see that the s:a tag is available but is designed for use with ajax and the only other tag i see is s:url. The reason I ask is because in my application we used to form links like this ... login and that would build a nice htm

Re: Struts in Servlet 2.4

2007-04-16 Thread Dave Newton
From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]> > <%@ page session="false"%> Whoa. "session="true | false" Whether the client must join an HTTP session in order to use the JSP page. If the value is true, the session object refers to the current or new session. If the value is false, you can

Re: Struts in Servlet 2.4

2007-04-16 Thread Dave Newton
From: Martin Gainty <[EMAIL PROTECTED]> >I dont understand why looping would help when your webserver cant find a >page whicgh is misconfigured or missing??? The problem doesn't have anything to do with a missing page, the problem is that even though a bean is in scope and works on one version o

RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
> -Original Message- > From: Martin Gainty [mailto:[EMAIL PROTECTED] > Sent: Monday, April 16, 2007 3:20 PM > To: Struts Users Mailing List > Subject: Re: Struts in Servlet 2.4 > > Tim-- > > I dont understand why looping would help when your webserver > cant find a page whicgh is mis

Re: Struts in Servlet 2.4

2007-04-16 Thread Martin Gainty
Tim-- I dont understand why looping would help when your webserver cant find a page whicgh is misconfigured or missing??? The only reference I could see for Contact was located at keeping in mind that path="URL" where The URL can be absolute or relative to the current JSP file. If it is abs

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Dale Newfield
On Mon, 16 Apr 2007 11:31:49 -0700 "Adam Ruggles" <[EMAIL PROTECTED]> wrote: >Ok so here is where the white rabbit went. If I add the autocomplete >inside of a hidden div ("display: none;") element and then make it >visible it will not display the icon. If the div is set to be displayed >("di

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Musachy Barroso
I will give it a try tonight and let you know. thanks musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: Ok so here is where the white rabbit went. If I add the autocomplete inside of a hidden div ("display: none;") element and then make it visible it will not display the icon. If t

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Adam Ruggles
Ok so here is where the white rabbit went. If I add the autocomplete inside of a hidden div ("display: none;") element and then make it visible it will not display the icon. If the div is set to be displayed ("display: block;") then it displays fine. After load, if I hide the div and make it

Re: Struts testing

2007-04-16 Thread Ted Husted
Testing Struts 1 Action classes directly is challenging, though the StrutsTestCase extension helps quite a bit. The best solution I found was to push as much functionality as possible into a business facade that could be tested by JUnit or TestNG, and then to test the frontend with Selenium or Web

Validation and Parameter Failure

2007-04-16 Thread Zach Calvert
OK, I'm getting a combination of problems relating to interceptors and validation that is randomly causing some serious usability issues. On random occasion, I will receive Apr 15, 2007 11:47:32 AM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters SEVERE: ParametersIntercept

[OT] How to handle non UTF characters in XML

2007-04-16 Thread Ashish Kulkarni
Hi I have java class which creates an XML file from SQL resultset, It works fine in USA, but i am having issues when this process runs in Germany where they have non UTF characters in there database like ü or á. How do we handle this kind of situation in XML file, i set the XML file to be of UTF-8

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Musachy Barroso
Follow the white rabbit :) //there could be a bug in the autocompleter anyway musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: The one in the showcase works. Interesting... Musachy Barroso wrote: > 2.0.6? Does the page in showcase for the autocompleter display the arrows > for you

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Adam Ruggles
The one in the showcase works. Interesting... Musachy Barroso wrote: 2.0.6? Does the page in showcase for the autocompleter display the arrows for you? musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: Nope. Still nothing displayed. Musachy Barroso wrote: > it is indeed. Do you

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Musachy Barroso
2.0.6? Does the page in showcase for the autocompleter display the arrows for you? musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: Nope. Still nothing displayed. Musachy Barroso wrote: > it is indeed. Do you see the arrow if you don't specify anything in > "visibleDownArrow"? > >

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Adam Ruggles
Nope. Still nothing displayed. Musachy Barroso wrote: it is indeed. Do you see the arrow if you don't specify anything in "visibleDownArrow"? musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: I'm starting to play with the autocompleter tag but I'm running into one issue. No matte

RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
> tough to guess on what your configuration is without seeing > your configuration files > > Please display web.xml and struts.xml for us Thanks, that's entirely reasonable. I've followed Laurie Harper's advice, and put a loop into the JSP page immediately before it fails. That loop calls requ

Re: Autocompleter showDownArrow doesn't work

2007-04-16 Thread Musachy Barroso
it is indeed. Do you see the arrow if you don't specify anything in "visibleDownArrow"? musachy On 4/16/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: I'm starting to play with the autocompleter tag but I'm running into one issue. No matter what I set showDownArrow to it will never display a dow

Autocompleter showDownArrow doesn't work

2007-04-16 Thread Adam Ruggles
I'm starting to play with the autocompleter tag but I'm running into one issue. No matter what I set showDownArrow to it will never display a down arrow. The html that is sent to the browser looks like this: The code that is generated on the client side (view generated source on firefox) l

Re: Interceptors and thread-safety

2007-04-16 Thread Dale Newfield
Shahak Nagiel wrote: This was my concern exactly; Is a separate interceptor instance shared among all references to each action, or more broadly just a Struts-wide singleton? For example, if you configure an execAndWait for both actions "foo" and "bar", with delays of 2 and 4, respectively, wi

Re: What is the equivalent of logic:present

2007-04-16 Thread Nuwan Chandrasoma
http://struts.apache.org/2.x/docs/if.html or you can go for jstl tags Thanks. Nuwan. - Original Message - From: <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Cc: <[EMAIL PROTECTED]> Sent: Monday, April 16, 2007 3:41 PM Subject: What is the equivalent of logic:present Hi, W

What is the equivalent of logic:present

2007-04-16 Thread MS1271
Hi, We are trying to implement the following scenario with Struts 2.0 - Where the userinfo is present in request. Are there any tag in Struts 2.0 that will help us implementing this? Any pointers will be highly appriciated. Thanks, Mayookh

Re: Struts testing

2007-04-16 Thread puchacz
I was thinking about Struts 1. But Laurie what + and - do You see in Struts1 testing ? Laurie Harper wrote: Laurie Harper wrote: > > puchacz wrote: >> Hi >> >> I would like to ask if You (as Struts programmers) see some + or - of >> testing Struts? I know JSF where I can test all components a

Re: Problem with file upload in struts2

2007-04-16 Thread Eric Rank
I had the same problem with file uploads using Struts 2.0.6 I tracked down the source of this problem. To summarize, it's a bug that's specific to the Struts 2.0.6 tag; it has since been fixed in the repository. The class in question is the FilterDispatcher. In short when uploading a file,

Re: Problem with file upload in struts2

2007-04-16 Thread Mahdi Milani Fard
That solved the problem. I also had some problem with url objects in jsps. Sometimes they did not include the params I indicated. That was also solved with the cleanup filter. Dave Newton-4 wrote: > > --- Mahdi Milani Fard <[EMAIL PROTECTED]> wrote: >> I'm trying to upload a file with struts2 [

Re: Form data to Vector

2007-04-16 Thread Lance
ok, i hadn't realised you were a newb. yes, vector is on your form... i'd use an ArrayList tho (Vector is synchronized = slower) eg public ActionForward execute(ActionMapping mapping, ActionForm f, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

Re: Form data to Vector

2007-04-16 Thread Balazs Michnay
OK, we're getting closer and closer to the solution... :) It seems that only the first options works for me, because the data are held by two controls that are created dynamically and are populated from the db. So when you click on the first one, the form is submitted by a Javascript function s

Re: Struts in Servlet 2.4

2007-04-16 Thread Martin Gainty
tough to guess on what your configuration is without seeing your configuration files Please display web.xml and struts.xml for us M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed.

Re: [OT] Re: Force clean / reload a webapp

2007-04-16 Thread piloupy GOTTAPIL
If you set the build output directory to WEB-INF/classes you shouldn't need to build a WAR file during development. That's how I configured eclipse in the Build Path. WEB-INF/src --(compile_to)--> WEB-INF/classes. But eclipse doesn't seem to rebuild the classes. I think it's because the element

[OT] Re: Force clean / reload a webapp

2007-04-16 Thread Dave Newton
--- piloupy GOTTAPIL <[EMAIL PROTECTED]> wrote: > What you said was right : I need to recompile the > classes to make it work correctly. eclipse is > configured to rebuild automatically, but it > seems to only work with a standard java application. If you set the build output directory to WEB-INF

Re: Force clean / reload a webapp

2007-04-16 Thread Martin Gainty
please display contents of /WEB-INF/struts-config.xml M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immedi

Re: Force clean / reload a webapp

2007-04-16 Thread piloupy GOTTAPIL
Hi Nuwan, It helps me a lot. I'm working on it : I'm writing an ant script for building a .war and make tests on the production server. What you said was right : I need to recompile the classes to make it work correctly. eclipse is configured to rebuild automatically, but it seems to only work w

Re: Problem with file upload in struts2

2007-04-16 Thread Dave Newton
--- Mahdi Milani Fard <[EMAIL PROTECTED]> wrote: > I'm trying to upload a file with struts2 [...] Try including the action context cleanup filter as the first filter in your web.xml. If that fixes it for you as well I'll add something to the upload wiki docs, so please follow up. struts-cleanu

Re: Form data to Vector

2007-04-16 Thread Lance
Ok, so your add button creates a new blank record on your page Your save button posts the form to some save action which validates / saves to the db Two options: 1. When you click on your "add" button you submit the form You submit the form to /add.do instead of /save.do Your add action adds an

RE: Struts in Servlet 2.4

2007-04-16 Thread Slattery, Tim - BLS
> Sounds as if your ejb compiler didnt generate and compile the > necessary interfaces for what its worth here is a sample of a > build for my wl env Eh?? Who said anything about EJBs? This is an exploded directory that will become a WAR file. The bean that can't be found is a plain old Java bea

Re: Form data to Vector

2007-04-16 Thread Balazs Michnay
This is how I need to do it: I have a form with two submit buttons. One should add the content of a text field to a Vector (which is therefore in the form bean) without leaving the page, and the other submit button should point to another page that has access to the Vector values. So I have two

Re: Interceptors and thread-safety

2007-04-16 Thread Shahak Nagiel
This was my concern exactly; Is a separate interceptor instance shared among all references to each action, or more broadly just a Struts-wide singleton? For example, if you configure an execAndWait for both actions "foo" and "bar", with delays of 2 and 4, respectively, will Struts instantiate a

Problem with file upload in struts2

2007-04-16 Thread Mahdi Milani Fard
Hi, I'm trying to upload a file with struts2 on tomcat 5.5. I'm using the method described in the struts2 documentation (using file upload interceptor with setters for file, filename and contenttype on the action object). After I deploy the web application, the first time (and only the first time

Re: Form data to Vector

2007-04-16 Thread Lance
Ok, im not sure how exactly you are using it but this is how I tend to do it. In your load() action, you hit the db and generate some object for each row and put them into your vector. Your jsp loops over all of the objects in the vector and displays s for each object (row) Sometimes, you ma

Re: Force clean / reload a webapp

2007-04-16 Thread Nuwan Chandrasoma
Hi, Only .jsp file are complied at runtime by a server. your .java files will not be complied by the server. thats why we compile our .java files and put them in the WEB-INF/classes folder or package it in a .war file. cleaning these files will not make your webapp reload. if you have done any

Re: Force clean / reload a webapp

2007-04-16 Thread Nuwan Chandrasoma
Hi, dont you create a .war file and deploy your application? , if you delete the files inside /WEB-INF/classes you will loose all the .class files. make sure you have auto build enabled in eclipse and also if you delete the files inside /WEB-INF/classes folder in production sever you will loos

Force clean / reload a webapp

2007-04-16 Thread piloupy GOTTAPIL
Hi, I'm developing a site using struts (bean, tiles, logic taglibs) and after cleaning my webapp by deleting the directories /work and /WEB-INF/classes, when I access to my site, there's only the header which is displayed. The only way to repair this problem is to remove all my librairies from e

Re: Form data to Vector

2007-04-16 Thread Balazs Michnay
Struts does not seem to accept a Vector-typed field as a property value. The form simply fails to load. I'd happily use LazyList and a Factory together instead of a Vector if it's easy to implement... First I wanted to get it working with Vector, then I can easily switch to a different container

AW: AW: AW: AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Peter Neu
Good remarks. I will add the stuff. Parse position is something I don't use although the constructor requests it. Cheers, Pete > -Ursprüngliche Nachricht- > Von: Lance [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 16. April 2007 12:10 > An: Struts Users Mailing List > Betreff: Re: AW: A

Re: Interceptors and thread-safety

2007-04-16 Thread Dave Newton
--- Laurie Harper <[EMAIL PROTECTED]> wrote: > Shahak Nagiel wrote: >> So, how can these [interceptors] be thread-safe if >> new Interceptors aren't being instantiated for every >> request? > Because the parameters don't come from (or vary > with) the request. Just to add on/clarify a little bit

Re: Form data to Vector

2007-04-16 Thread Lance
Lance wrote: Sorry, it helps if i read your question fully. The way to do this is to name your html form elements using in the struts (BeanUtils) conventions If you have a form element named "myVector[3]" then struts will call myForm.getMyVector().set(3, ?) It is sometimes easiest to use t

Re: AW: AW: AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Lance
Looks ok to me altho im not familiar with parse position You might wanna allow blank too if (price != null && price.trim().length() != 0) { And catch NumberFormatException / set an error And setPriceDouble(null) in your forms reset() method Peter Neu wrote: OK so what I did is: --jsp---

AW: AW: AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Peter Neu
OK so what I did is: --jsp--- " /> -> Value gets displayed with commas. --action-form- NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.GERMAN); DecimalFormat df = (DecimalFormat) nf; df.setDecimalSeparatorAlwaysShown(false); df.applyPattern("#,###,###,###,###.#"); if (pr

Re: Form data to Vector

2007-04-16 Thread Lance
Only way to get data into a Vector is by a scriptlet or in your action. Struts 2's OGNL has a nice way of doing this but unfortunately with S1 we're left with dirty scriptlets in JSPs some of the time. JSTL has a that sometimes comes in handy where you provide a comma separated list of String

Re: Form data to Vector

2007-04-16 Thread Balazs Michnay
Thanks for the reply. Yes, I know how to use the to display the elements of a Vector (or ArrayList), I just don't see how to put these values into the Vector. I mean if I have a Vector (or an ArrayList) property in my form bean, how do I put some of my form data into my bean property. Do I need

Re: AW: AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Lance
Your brute force approach does not use tho? Also, I have a suspicion that struts will either throw an exception or set nulls for inputted numbers that contain commas, you might need to use Strings on your form and format / parse to numbers in your action(s). Peter Neu wrote: But that's more c

AW: AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Peter Neu
But that's more code than the brute force approach: " /> If have about 20-30 items. :o( > -Ursprüngliche Nachricht- > Von: Lance [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 16. April 2007 11:05 > An: Struts Users Mailing List > Betreff: Re: AW: HowTo Format Numbers in html:text tag

Re: AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Lance
You could combine with struts-el var="formattedNumber" /> Peter Neu wrote: That looks cool but I need to embed the value in the html:text field so the user is able to edit the value. That won't work with 2 tags. :o( -Ursprüngliche Nachricht- Von: Lance [mailto:[EMAIL PROTECTED

AW: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Peter Neu
That looks cool but I need to embed the value in the html:text field so the user is able to edit the value. That won't work with 2 tags. :o( > -Ursprüngliche Nachricht- > Von: Lance [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 16. April 2007 10:45 > An: Struts Users Mailing List > Betreff

Re: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Lance
Oops, i mean Lance wrote: You could use in JSTL http://bellsouthpwp.net/b/i/billsigg/jstl-quick-reference.pdf Peter Neu wrote: Hello, I need to format a number string in a html:text tag because the default value must be writt

Re: HowTo Format Numbers in html:text tag?

2007-04-16 Thread Lance
You could use in JSTL http://bellsouthpwp.net/b/i/billsigg/jstl-quick-reference.pdf Peter Neu wrote: Hello, I need to format a number string in a html:text tag because the default value must be written with a comma sperator. e.g

HowTo Format Numbers in html:text tag?

2007-04-16 Thread Peter Neu
Hello, I need to format a number string in a html:text tag because the default value must be written with a comma sperator. e.g. 4,5 while the value of my value bean is in fact like this: 4.5. Normally I would use bean:message and the format attribute. But this does not work in html:text. How c

Re: Take me out of your user group mail list

2007-04-16 Thread Antonio Petrelli
2007/4/16, Jose Cardoso <[EMAIL PROTECTED]>: Dear Sir, Please take my email out of your mailing list. http://struts.apache.org/mail.html Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Posting Java 5 Enum values

2007-04-16 Thread Adam Ruggles
Thanks, yes that is what I wanted to do. I wrote a custom converter and it works fine. I was just hoping that struts2 would have a built in convert for this type since it's part of java 5. That might be a good item to add to a future version of struts2. Of course it only took me 10 minutes

  1   2   >