Re: Datasource problem again..

2004-07-20 Thread Koon Yue Lam
yes, clearly a context file for each web app is a better / wiser choice, thanks for the advice ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Datasource problem again..

2004-07-20 Thread jthompson
Good point. I've done the same, ie setup a within the of server.xml, and defined my data-source there. I've still got a context.xml, but it's now down to just a couple of lines ie to specify docBase, path and a logger. It looks like this now: Just to make it clear what this is all abou

Re: Datasource problem again..

2004-07-20 Thread Peng Tuck Kwok
Great, that's always good to hear. Also consider providing your own context xml for each app with the war file, might save you some time in server restarts. Unless you changed server.xml through the administrative interface. On Wed, 21 Jul 2004 10:24:21 +0800, Koon Yue Lam <[EMAIL PROTECTED]> wrot

Re: Datasource problem again..

2004-07-20 Thread Koon Yue Lam
Tthanks for the help for all of u ! Finally I get it done, I create a element and nest a with details of MySql in server.xml and it just work smoothly~~~ Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: OT: Best practice for access to file from multiple web apps

2004-07-20 Thread Craig McClanahan
On Tue, 20 Jul 2004 15:35:51 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote: > We have PDF's that can be created by one webapp, but must also be served by other > webapps. Forgive me for coming in late, but it's not obvious to me how big a problem the "other webapps" part of this really is. Lets

Re: OT: Best practice for access to file from multiple web apps

2004-07-20 Thread Andrew Close
well, depending on your build process (and who is in control), setting up ANT really isn't all that difficult. and then you can have a config file for each platform you build to. i haven't had a chance (or taken the time) to play with Maven yet. it's built on top of ANT and apparently adds a lot

RE: OT: Best practice for access to file from multiple web apps

2004-07-20 Thread Jim Barrows
> -Original Message- > From: Andrew Close [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 20, 2004 3:44 PM > To: Struts Users Mailing List > Subject: Re: OT: Best practice for access to file from > multiple web apps > > > Jim, > > do you use ANT or Maven to build/deploy your projects?

Re: OT: Best practice for access to file from multiple web apps

2004-07-20 Thread Andrew Close
Jim, do you use ANT or Maven to build/deploy your projects? if so you can have them set up a config file for you based on the environment you're building to. andy On Tue, 20 Jul 2004 15:35:51 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote: > We have PDF's that can be created by one webapp, but mu

OT: Best practice for access to file from multiple web apps

2004-07-20 Thread Jim Barrows
We have PDF's that can be created by one webapp, but must also be served by other webapps. Obviously, fun is ensuing in trying to figure out the best to avoid hard coding paths, even in a configuration file. Dev, Test and Production are of course different enought that each environment require

Re: Tag question

2004-07-20 Thread Erik Weber
Heh, thanks Jim. Yeah, my memory is about like yours! But you are right, I can work from that. Cheers, Erik (Time to call it a day and go play some softball!) Jim Barrows wrote: -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 2:17 PM To: Strut

RE: Tag question

2004-07-20 Thread Jim Barrows
> -Original Message- > From: Erik Weber [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 20, 2004 2:17 PM > To: Struts Users Mailing List > Subject: Re: Tag question > > > Thanks guys! Seems like there was a method I used to call in > my Servlets > that would only return the Servlet po

Validation headaches

2004-07-20 Thread Matthew Van Horn
Does anyone know if it is posible to use validatewhen in conjunction with mask (or other validators)? I cannot figure out how to make it work. Separately they work fine, but when I try to use them together it never validates. Here is the non-working config. tes

Re: Tag question

2004-07-20 Thread Erik Weber
Thanks guys! Seems like there was a method I used to call in my Servlets that would only return the Servlet portion of the request URI . . . I must have gone loco! I see that Struts puts a key to the servlet mapping "/services/*" in some scope -- perhaps I can substring on that. I guess I'll ha

Re: Tag question

2004-07-20 Thread atta-ur rehman
howdy Erik! well, i was actually answering your original question about how to set a var using and scriptlet! As Erez has mentioned you'd need to use some String.substring() to do the trick! ATTA On Tue, 20 Jul 2004 16:56:13 -0400, Erik Weber <[EMAIL PROTECTED]> wrote: > Hmm I must be doing so

RE: Tag question

2004-07-20 Thread Erez Efrati
That's what this method is supposed to return it's not something you are doing wrong. Maybe that will help: http://javaalmanac.com/egs/javax.servlet/GetReqUrl.html?l=new Erez -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 10:56 PM To: Struts

Re: [OT] RTF & PDF export options

2004-07-20 Thread Juan Alvarado
I know you mentioned open source tools, but I wasn't 100% sure if you were limited to open source. Windward Reports seems like a tool for the job. http://www.windwardreports.com. It's not free and in fact it's pretty expensive. We are leaning towards using this tool because of the ease of use t

Re: Tag question

2004-07-20 Thread Erik Weber
Hmm I must be doing something wrong. That's giving me the same value as Erez's example. Strange, I would have expected it to give me "/services". I wonder how I am causing it to give me "/usecase/page.jsp". atta-ur rehman wrote: Hi Erik, This one worked for me: <%= request.getServletPat

RE: Tag question

2004-07-20 Thread Erez Efrati
Erik, The getServletPath () returns the whole path to the servlet. As far as I know, there's no method that returns exactly what you need ,so you'll need to do the parsing (remove what is after the last "/") by yourself. Perhaps using scriptlet (nasty but will work). <% ... the code .. %

Re: Tag question

2004-07-20 Thread atta-ur rehman
Hi Erik, This one worked for me: <%= request.getServletPath() %> HTH, ATTA On Tue, 20 Jul 2004 16:20:30 -0400, Erik Weber <[EMAIL PROTECTED]> wrote: > How can I set a variable (I assume with c:set) that will hold the value > of request.getServletPath, so that I can use it in el ta

Re: Tag question

2004-07-20 Thread Erik Weber
Hmm actually that renders everything *after* the servlet path, oddly. My controller is mapped to /services/*. I need a var that is equal to "/services". The example below is printing out the end of the path -- "/usecase/page.jsp" Erik Erez Efrati wrote: Try the following: Regards, Erez -Origin

RE: Tag question

2004-07-20 Thread Erez Efrati
Try the following: Regards, Erez -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 10:21 PM To: Struts Users Mailing List Subject: Tag question How can I set a variable (I assume with c:set) that will hold the value of request.getServletPath

Re: Multipart forms

2004-07-20 Thread Diego
Thanks again Niall. I had already put the code in my Action, as you suggested. I'm using a DispatchAction with a somewhat large number of methods on it and now I need to call my new method in several of them, this is why I would have preferred this code in the reset(), but this way works fine. reg

Tag question

2004-07-20 Thread Erik Weber
How can I set a variable (I assume with c:set) that will hold the value of request.getServletPath, so that I can use it in el tags? Thanks, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [OT] RTF & PDF export options

2004-07-20 Thread Wendy Smoak
From: "Barnett, Brian W." <[EMAIL PROTECTED]> > Forgive my naivety, Wendy, but what are the benefits of redirecting to a Servlet? My reasons, in no particular order... - I wanted a ".pdf" URL showing in the browser address line - the redirect lets me show a 'please wait' page - the sample code I s

RE: Multiple Values In Form Hidden Parameter

2004-07-20 Thread Gupta, Sahil
that worked. thanks S -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 12:38 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Values In Form Hidden Parameter Alternatively, tokenize the String parameter to your setter and store it as appropri

RE: Looking for Multiple file upload at once example

2004-07-20 Thread David Friedman
RE: Looking for Multiple file upload at once examplePaul, I believe the problem lies with the Commons FileUpload package. Another way to go over it is mentioned in this link: http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] apache.org&by=subject&from=367131&to=367131&first=1&count=2 Essentia

Re: url rewriting

2004-07-20 Thread Craig McClanahan
On Tue, 20 Jul 2004 09:08:39 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote: > > > > > I think you can use url rewriting, and that won't put the > > jsessionid on it. > > > > It's sort of the other way around :-). The "jsessionid" parameter is > > the *result* of performing URL rewriting. If your b

Re: Multiple Values In Form Hidden Parameter

2004-07-20 Thread Frank Zammetti
Alternatively, tokenize the String parameter to your setter and store it as appropriate in your array in your bean. From: Rob McBride <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: Multiple Values In Fo

Re: Multiple Values In Form Hidden Parameter

2004-07-20 Thread Rob McBride
Hi Sahil, You can do this sort of thing by using indexed properties: But in your bean you will need to add getters and setters that include the index as a parameter: private void setSvalues(int index, String val) { svalues[index] = val; } private String getSvalues(int index) { return

RE: [OT] RTF & PDF export options

2004-07-20 Thread William T Hansley
I've used iText for straight PDF generation, but I don't know how applicable it is to your problem. It's a great tool with TONS of examples. http://www.lowagie.com/iText/ -Bill "Barnett, Brian W." <[EMAIL PROTECTED]> 07/20/2004 12:07 PM Please respond to "Struts Users Mailing List"

RE: [OT] RTF & PDF export options

2004-07-20 Thread Barnett, Brian W.
I've been exposed to JasperReports, but in this case, I think it would be overkill for what I need. Thanks for the idea. -Original Message- From: Coyne, Jimmy [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 3:23 AM To: 'Struts Users Mailing List' Subject: RE: [OT] RTF & PDF export

File Upload

2004-07-20 Thread Erez Efrati
Hi, A simple question: after working with a FormFile, do I need to call the destroy() method? Thanks, Erez

RE: url rewriting

2004-07-20 Thread Jim Barrows
> -Original Message- > From: Craig McClanahan [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 20, 2004 8:57 AM > To: Struts Users Mailing List > Subject: Re: url rewriting > > > > I think you can use url rewriting, and that won't put the > jsessionid on it. > > It's sort of the other

RE: [OT] RTF & PDF export options

2004-07-20 Thread Barnett, Brian W.
Forgive my naivety, Wendy, but what are the benefits of redirecting to a Servlet? -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 4:46 PM To: Struts Users Mailing List Subject: Re: [OT] RTF & PDF export options From: "Barnett, Brian W." <[EMAIL

Re: url rewriting

2004-07-20 Thread Craig McClanahan
> I think you can use url rewriting, and that won't put the jsessionid on it. It's sort of the other way around :-). The "jsessionid" parameter is the *result* of performing URL rewriting. If your browser client is using cookies, this will only show on the first request for a session - the conta

RE: form focus

2004-07-20 Thread Gupta, Sahil
You could use the focus attribute of the form tag in the html api html:form action="/xyz" focus="abc" where abc is your property. sahil -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 11:47 AM To: Struts Users Mailing List Subject: Re: for

[OT] How to get Role/Group info only in JAAS client/tagish package

2004-07-20 Thread lixin chu
Hi, A bit OT question: how to get the Role/Group info only in JASS client - I am using Tagish package but I guess it is common. In my login.java, I use: ~~~ lc = new LoginContext(); lc.login(); Set p = lc.getSubject().getPrincipals();

RE: form focus

2004-07-20 Thread Jim Barrows
> -Original Message- > From: news [mailto:[EMAIL PROTECTED] Behalf Of j h > Sent: Tuesday, July 20, 2004 7:44 AM > To: [EMAIL PROTECTED] > Subject: form focus > > > Can someone explain how the focus of a form can be set to one > of the elements > that failed validation when the form i

Re: form focus

2004-07-20 Thread Niall Pemberton
Why not customize the tag? You could override the renderFocusJavascript() method in FormTag to retrieve the errors and highlight the appropriate field Niall - Original Message - From: "j h" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 3:43 PM Subject: form f

Multiple Values In Form Hidden Parameter

2004-07-20 Thread Gupta, Sahil
Hi, I'd like to pass multiple values in my form hidden parameter. Is there any way i can do this? Bean: private String []svalues; private String []getSvalues(){ return svalues; } private void setSvalues(String []vals){ svalues = vals; } TIA S ---

RE: url rewriting

2004-07-20 Thread Jim Barrows
> -Original Message- > From: news [mailto:[EMAIL PROTECTED] Behalf Of j h > Sent: Tuesday, July 20, 2004 7:41 AM > To: [EMAIL PROTECTED] > Subject: url rewriting > > > Is there a way to disable the jsessionid from being appended > to the url when a > form is submitted? I think you ca

RE: Datasource problem again..

2004-07-20 Thread Jim Barrows
> -Original Message- > From: Koon Yue Lam [mailto:[EMAIL PROTECTED] > Sent: Monday, July 19, 2004 7:46 PM > To: Struts Users Mailing List > Subject: Re: Datasource problem again.. > > > Thx ! > Since I am using Tomct 5 with auto-depoly, my Webapp DOESN'T has a > element in server.xml.

RE: Datasource problem again..

2004-07-20 Thread Jim Barrows
> -Original Message- > From: Koon Yue Lam [mailto:[EMAIL PROTECTED] > Sent: Monday, July 19, 2004 6:54 PM > To: Struts Users Mailing List; Asif Rahman > Subject: Re: Datasource problem again.. > > > Yes, it helps and I know I can get it done if I set the context > element in server.xml,

form focus

2004-07-20 Thread j h
Can someone explain how the focus of a form can be set to one of the elements that failed validation when the form is re-displayed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

url rewriting

2004-07-20 Thread j h
Is there a way to disable the jsessionid from being appended to the url when a form is submitted? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: form display

2004-07-20 Thread mike . raath
I find it's better to use Strings for ActionForm attributes, which can then be validated, and copied to correctly typed attributes in DTO beans once validation has passed. This would allow you to hold your null value, as this would be an empty string. -Original Message- From: Isaac Mosquer

form display

2004-07-20 Thread Isaac Mosquera
In my form i have an integer, which cannot be initialized to null, however, it shows up in the html:text box as a "0", and i would prefer that it shows up blank when a user FIRST reaches the page. After that, i would like the variable to retain the value which the user has entered. -isaac ---

RE: Looking for Multiple file upload at once example

2004-07-20 Thread David Friedman
RE: Looking for Multiple file upload at once examplePaul, I'm cc'ing the list so other can learn about this. The problem is (unless it has been solved and I haven't heard about it) with the commons file uploads cannot upload multiple files as the very same form field name. Your velocity template

Multiple Resource Bundles

2004-07-20 Thread Ralf Schneider
Hi, I try to use multiple resource bundles that get the strings from a database in an environment using JBoss, Struts and Velocity. I have defined two in struts-config.xml: During startup of JBoss the createResource() method of both factories is called. But when I call a page on which

Re: Multipart forms

2004-07-20 Thread Niall Pemberton
I can't think of anything you can do in Struts currently to get this to work in the "reset" method - all the relevant code is in the RequestUtils.populate() method and we would have to refactor the multipart processing to resolve this (maybe you should open an enhacement request in bugzilla for it

RE: [OT] RTF & PDF export options

2004-07-20 Thread Coyne, Jimmy
Did you have a look at JasperReports ( http://jasperreports.sourceforge.net/index.html) ? Jimmy > -Original Message- > From: Barnett, Brian W. [mailto:[EMAIL PROTECTED] > Sent: 19 July 2004 23:22 > To: '[EMAIL PROTECTED]' > Subject: [OT] RTF & PDF export options > > > Any suggestions for

RE: [OT] RTF & PDF export options

2004-07-20 Thread Daniel Perry
fop - http://xml.apache.org/fop/index.html In my opinion better than iText - gives a bit more control. I had problems with layout in iText - it adds funny paragraph spacing (especially with big fonts). For fop - generate an XML file with data, write some XSL to translate data into fop xml, and t

Re: Multipart forms

2004-07-20 Thread Diego
Thanks for your answer Niall. If I can't get the parameters in the reset() method, then I don't know how to solve my problem. My ActionForm is on session and it's a wizard-like one. The jsp has tabs to go to any page at any time. What I do with non-multipart forms is something like this in the rese