RE: Back Button in Struts
You can't really use the javascript:history.back() function to hit the Action class as the history.back does not even hit the webserver. It is an internal client operation, like most javascript is. One solution you might want to try is to create a stack object for each session to track what actions they have run. Then you can implement a fairly decent back button. Haven't done this myself, but know of another project that has. -Original Message- From: Larry Maturo [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 9:11 AM To: [EMAIL PROTECTED] Subject: Back Button in Struts How do you implement a generic back button in struts such that it hits the Action Class? When you use something like: A HREF=javascript:history.back()Back/A You go back to the jsp, but miss the Action Class, which is often a bad thing. -- Larry Maturo
RE: Speed issues w/ Strut Tag Library
Here's a good general optimization article... http://www.jspinsider.com/jspbuzz/aug2000/buzz_8_15_2000.html#topic -Original Message- From: John M. Corro [mailto:[EMAIL PROTECTED]] Sent: Friday, August 17, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Speed issues w/ Strut Tag Library We have a JSP page that's using between 50-75 bean:write tags to display a given bean's information. This particular project is a rewrite of an older ASP implementation and we're seeing some performance issues when comparing the two. (ASP implementation is running from IIS, Java version is Tomcat both running from the same box which has a w2k server OS) This particular page tends to take ~5 sec to load vs. the ASP page which takes ~1 sec to load. Interestingly, the ASP page is hitting a DB while the JSP version (at this point) is hitting dummy values hardcoded in the bean. Two questions. First (a little off subj), in general is ASP faster than JSP. Second, does extensive use of the Struts bean:write tags cause performance issues? (I know that there is an upperlimit of how many custom tags you can use before you exceed the max size of the resulting servlet function)
RE: Problem With Struts and Tomcat
I would highly recommend upgrading your Tomcat to 3.2.2. This may solve your problem. -Original Message- From: Thomas L Richards [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 13:49 To: [EMAIL PROTECTED] Subject: Problem With Struts and Tomcat Ok, I've got a bit of a headache and here's the cause: I'm using Visual Age for Java 3.5.2, with Tomcat 3.1. That works fine. I installed Struts 1.0-b3 with Xerces 1.4.0. Then I installed the struts-example.war file. That installed fine too (Tomcat took care of it). However, where my headache seems to be occurring is when I try to access a struts driven application. I have tried several of the sample apps, but every time I get this error: Root cause: java.lang.IllegalArgumentException: cant remove Attributes from request scope java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) void org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String, int) int org.apache.struts.taglib.html.FormTag.doEndTag() void _0002fregistration_0002ejspregistration_jsp_0. _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R equest, org.apache.tomcat.core.Response) void org.apache.tomcat.core.RequestDispatcherImpl.forward(javax.servlet.ServletRe quest, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R equest, org.apache.tomcat.core.Response) void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request , org.apache.tomcat.core.Response) void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a pache.tomcat.service.TcpConnection, java.lang.Object []) void org.apache.tomcat.service.TcpConnectionThread.run() void java.lang.Thread.run() This was generated with the Register with the MailReader Demonstration Application that came with the struts-example.war file (out of the box). However, I received this exact same type of error with a different example (that didn't come from the Jakarta project). This leads me to believe that there's some sort of incompatibility or config problem going on. If anyone has any idea about this, or has seen this before, please enlighten me. Thanks! -Tom
How do I Internationalize ActionError parameter values?
Hey, Looking through the archive I found a couple of notes about internationalizing the ActionError parameters. I'm talking about the following: public ActionError(java.lang.Stringkey, java.lang.Objectvalue0, java.lang.Objectvalue1) Construct an action error with the specified replacement values. Parameters: key - Message key for this error message value0 - First replacement value value1 - Second replacement value What I want to do is pass in keys from the properties file into the second and third parameter. Specifically I want to pass in the prompt keys to display to the user the fields that are in error. One possible solution proposed was by Craig as follows: The java.text.MessageFormat class (which is how Struts is doing thesubstitution) does not support internationalizing the replacementparameters directly. But how about doing this in two steps?* Look up the internationalized replacement value from a MessageResources bundle* Use the returned String as the replacement value in the ultimate message. However, I need to get the locale somehow. It seems alot easier to just override ActionError to accept keys as parameters. Has anyone overridden the ActionError class to accept "java.lang.Stringkey" parameters instead of "java.lang.Objectvalue0"? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 "Work joyfully and peacefully, knowing that right thoughts and right efforts inevitably bring about right results." - JamesAllen
RE: How do I Internationalize ActionError parameter values?
Thanks Hal. However, I need to get the locale in the validate() method of my ActionForm object. Any thoughts? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 13:24 To: [EMAIL PROTECTED] Subject: RE: How do I Internationalize ActionError parameter values? Getting the locale object is easy. If you are in an Action perform method, just call: getLocale(request); If you are not in the Action class, you can do what that method does, Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); if (locale == null) locale = Locale.getDefault(); -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 3:48 PM To: Struts (E-mail) Subject: How do I Internationalize ActionError parameter values? Hey, Looking through the archive I found a couple of notes about internationalizing the ActionError parameters. I'm talking about the following: public ActionError(java.lang.String key, java.lang.Object value0, java.lang.Object value1) Construct an action error with the specified replacement values. Parameters: key - Message key for this error message value0 - First replacement value value1 - Second replacement value What I want to do is pass in keys from the properties file into the second and third parameter. Specifically I want to pass in the prompt keys to display to the user the fields that are in error. One possible solution proposed was by Craig as follows: The java.text.MessageFormat class (which is how Struts is doing the substitution) does not support internationalizing the replacement parameters directly. But how about doing this in two steps? * Look up the internationalized replacement value from a MessageResources bundle * Use the returned String as the replacement value in the ultimate message. However, I need to get the locale somehow. It seems alot easier to just override ActionError to accept keys as parameters. Has anyone overridden the ActionError class to accept java.lang.String key parameters instead of java.lang.Object value0? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 Work joyfully and peacefully, knowing that right thoughts and right efforts inevitably bring about right results. - James Allen
RE: How do I Internationalize ActionError parameter values?
So are you suggesting that I pass the request object to my ActionForm constructor when I create it in my action? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 13:56 To: [EMAIL PROTECTED] Subject: RE: How do I Internationalize ActionError parameter values? Use the request argument to get the session and then get the locale out of the session using getAttribute(Action.LOCALE_KEY). If you have a shared base class for all of your forms (that extends ActionForm) it might make sense to put a getLocale(request) method in there. Hal -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 4:53 PM To: '[EMAIL PROTECTED]' Subject: RE: How do I Internationalize ActionError parameter values? Thanks Hal. However, I need to get the locale in the validate() method of my ActionForm object. Any thoughts? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 13:24 To: [EMAIL PROTECTED] Subject: RE: How do I Internationalize ActionError parameter values? Getting the locale object is easy. If you are in an Action perform method, just call: getLocale(request); If you are not in the Action class, you can do what that method does, Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); if (locale == null) locale = Locale.getDefault(); -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 3:48 PM To: Struts (E-mail) Subject: How do I Internationalize ActionError parameter values? Hey, Looking through the archive I found a couple of notes about internationalizing the ActionError parameters. I'm talking about the following: public ActionError(java.lang.String key, java.lang.Object value0, java.lang.Object value1) Construct an action error with the specified replacement values. Parameters: key - Message key for this error message value0 - First replacement value value1 - Second replacement value What I want to do is pass in keys from the properties file into the second and third parameter. Specifically I want to pass in the prompt keys to display to the user the fields that are in error. One possible solution proposed was by Craig as follows: The java.text.MessageFormat class (which is how Struts is doing the substitution) does not support internationalizing the replacement parameters directly. But how about doing this in two steps? * Look up the internationalized replacement value from a MessageResources bundle * Use the returned String as the replacement value in the ultimate message. However, I need to get the locale somehow. It seems alot easier to just override ActionError to accept keys as parameters. Has anyone overridden the ActionError class to accept java.lang.String key parameters instead of java.lang.Object value0? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 Work joyfully and peacefully, knowing that right thoughts and right efforts inevitably bring about right results. - James Allen
RE: How do I Internationalize ActionError parameter values?
Yes, sorry. I wasn't aware the request is passed into the validate. Thanks Hal -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 15:09 To: [EMAIL PROTECTED] Subject: RE: How do I Internationalize ActionError parameter values? The request is passed into the validate() function as an argument by the ActionServlet. You said you wanted the locale in the validate() method, right? -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 6:11 PM To: '[EMAIL PROTECTED]' Subject: RE: How do I Internationalize ActionError parameter values? So are you suggesting that I pass the request object to my ActionForm constructor when I create it in my action? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 13:56 To: [EMAIL PROTECTED] Subject: RE: How do I Internationalize ActionError parameter values? Use the request argument to get the session and then get the locale out of the session using getAttribute(Action.LOCALE_KEY). If you have a shared base class for all of your forms (that extends ActionForm) it might make sense to put a getLocale(request) method in there. Hal -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 4:53 PM To: '[EMAIL PROTECTED]' Subject: RE: How do I Internationalize ActionError parameter values? Thanks Hal. However, I need to get the locale in the validate() method of my ActionForm object. Any thoughts? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 13:24 To: [EMAIL PROTECTED] Subject: RE: How do I Internationalize ActionError parameter values? Getting the locale object is easy. If you are in an Action perform method, just call: getLocale(request); If you are not in the Action class, you can do what that method does, Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); if (locale == null) locale = Locale.getDefault(); -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 3:48 PM To: Struts (E-mail) Subject: How do I Internationalize ActionError parameter values? Hey, Looking through the archive I found a couple of notes about internationalizing the ActionError parameters. I'm talking about the following: public ActionError(java.lang.String key, java.lang.Object value0, java.lang.Object value1) Construct an action error with the specified replacement values. Parameters: key - Message key for this error message value0 - First replacement value value1 - Second replacement value What I want to do is pass in keys from the properties file into the second and third parameter. Specifically I want to pass in the prompt keys to display to the user the fields that are in error. One possible solution proposed was by Craig as follows: The java.text.MessageFormat class (which is how Struts is doing the substitution) does not support internationalizing the replacement parameters directly. But how about doing this in two steps? * Look up the internationalized replacement value from a MessageResources bundle * Use the returned String as the replacement value in the ultimate message. However, I need to get the locale somehow. It seems alot easier to just override ActionError to accept keys as parameters. Has anyone overridden the ActionError class to accept java.lang.String key parameters instead of java.lang.Object value0? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 Work joyfully and peacefully, knowing that right thoughts and right efforts inevitably bring about right results. - James Allen
Global forwards, targets and frames
Is there a way to specify the target of aglobal forward? I have a global forward which I want to go to another frame. For instance in my action if everything works fine I want to return to the input page but if there is an error I want to go to another frame. Any thoughts? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: icons not showing up?
Your src is different in each case. The first one includes a . at the beginning, the second does not. -Original Message- From: Alex Colic [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 13:50 To: Struts Subject: icons not showing up? Hi, I am trying to use struts to show a couple of icons. The following html works: IMG SRC=./Images/cancel.gif ALT=Cancel NAME=btnCancel onClick=doCancel(); but this does not? html:image src=/Images/cancel.gif alt=Cancel property=action alue=cancel/ In the struts way the form is submitted but the icon does not show up. Any help is appreciated. Regards Alex
RE: How can I use a Image as a submit button using struts
Uday, The code we have is quite complicated and does alot more than you want. One of our team members, Christine Robb, made a custom tag that does almost what the submit tag does. She took a copy of SubmitTag.java and instead of outputting the code for doing a gray button submit in the doEndTag(), she made it spit out the code I've shown below. Just crack open an existing tag and it's pretty easy to figure out how to make your own. Good luck... Kyle -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 06:10 To: '[EMAIL PROTECTED]' Subject: RE: How can I use a Image as a submit button using struts Kyle, Can u tell me about Ur version? I mean how U did it and if possible the code will be greatt!! Thanks, Uday. -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 6:33 PM To: '[EMAIL PROTECTED]' Subject: RE: How can I use a Image as a submit button using struts That will make a gray button with the image on top of it. I think that looks ugly. The version I use makes only the image the button so you can make your web apps look alot nicer. -Original Message- From: Scott Cressler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 16:08 To: '[EMAIL PROTECTED]' Subject: RE: How can I use a Image as a submit button using struts Um, I thought the html:image tag did this and doesn't it generate an input type=image tag? Scott -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 4:00 PM To: '[EMAIL PROTECTED]' Subject: RE: How can I use a Image as a submit button using struts The best way I've found of doing this is with a little javascript as follows: a href=javascript:submit(); img src=images/buttons/save.gif name=save border=0 /a For the purposes of using Struts we made a custom tag to create these... -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 15:45 To: '[EMAIL PROTECTED]' Subject: How can I use a Image as a submit button using struts Hi, Can anybody tell me how I can simulate the functionality of Img Type = Submit / I mean I need to use an Image as a submit button. Thanks, Uday.
RE: How can I use a Image as a submit button using struts
The best way I've found of doing this is with a little javascript as follows: a href=javascript:submit(); img src=images/buttons/save.gif name=save border=0 /a For the purposes of using Struts we made a custom tag to create these... -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 15:45 To: '[EMAIL PROTECTED]' Subject: How can I use a Image as a submit button using struts Hi, Can anybody tell me how I can simulate the functionality of Img Type = Submit / I mean I need to use an Image as a submit button. Thanks, Uday.
RE: How can I use a Image as a submit button using struts
That will make a gray button with the image on top of it. I think that looks ugly. The version I use makes only the image the button so you can make your web apps look alot nicer. -Original Message- From: Scott Cressler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 16:08 To: '[EMAIL PROTECTED]' Subject: RE: How can I use a Image as a submit button using struts Um, I thought the html:image tag did this and doesn't it generate an input type=image tag? Scott -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 4:00 PM To: '[EMAIL PROTECTED]' Subject: RE: How can I use a Image as a submit button using struts The best way I've found of doing this is with a little javascript as follows: a href=javascript:submit(); img src=images/buttons/save.gif name=save border=0 /a For the purposes of using Struts we made a custom tag to create these... -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 15:45 To: '[EMAIL PROTECTED]' Subject: How can I use a Image as a submit button using struts Hi, Can anybody tell me how I can simulate the functionality of Img Type = Submit / I mean I need to use an Image as a submit button. Thanks, Uday.
Dirty flag on forms
Has anyone implemented the concept of a dirty flag on an form in Struts? For example if the form is changed then a flag is set and if the user wants to navigate away from that form without "saving" the info changed then they will get a prompt to save. Most of this is JavaScript but each element on the form needs to have some onChange code. Is there an easy way to do this by iterating over a whole form? Ideas? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Attn: Sales Manager
FUCK OFF! -Original Message- From: Bernard Hartken [mailto:[EMAIL PROTECTED]] Sent: None To: [EMAIL PROTECTED] Subject: Attn: Sales Manager Attn: Sales Manager If you are outsourcing or need to expand your sales force for the short term or long term contract, TeleXpand will create a tailored campaign to guarantee you and your product success. We are an established, full service call center with a completely trained staff of 70 plus salespeople with a proven track record to close sales for your product or service. We currently market over $1 million dollars per month in closed sales for the largest HVAC Company in the Washington D.C. area, scheduling approximately 300 appointments per week...again, these are closed sales! We service ALL industries who would be interested in a telemarketing / e-commerce campaign of any size! Let's talk... Bernard Hartken General Manager 814.459.8238 Visit us at www.telexpand.bigstep.com
RE: Attn: Sales Manager
Excuse me, sorry... -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 02, 2001 09:22 To: '[EMAIL PROTECTED]' Subject: RE: Attn: Sales Manager FUCK OFF! -Original Message- From: Bernard Hartken [mailto:[EMAIL PROTECTED]] Sent: None To: [EMAIL PROTECTED] Subject: Attn: Sales Manager Attn: Sales Manager If you are outsourcing or need to expand your sales force for the short term or long term contract, TeleXpand will create a tailored campaign to guarantee you and your product success. We are an established, full service call center with a completely trained staff of 70 plus salespeople with a proven track record to close sales for your product or service. We currently market over $1 million dollars per month in closed sales for the largest HVAC Company in the Washington D.C. area, scheduling approximately 300 appointments per week...again, these are closed sales! We service ALL industries who would be interested in a telemarketing / e-commerce campaign of any size! Let's talk... Bernard Hartken General Manager 814.459.8238 Visit us at www.telexpand.bigstep.com
RE: Bug in tomcat or the JDK (testing it on 1.2.2)
To avoid thecosmetic ugliness, you can change the level of debug for the log in the tomcat server.xml file. The default setting is INFORMATION. This is a good setting for development but in production I would recommend putting it to ERROR. See the comments in Tomcat's server.xml file for more info. -Original Message- From: Szlapa, Michael [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 06:52 To: '[EMAIL PROTECTED]' Subject: RE: Bug in tomcat or the JDK (testing it on 1.2.2) That is not the bug. It's a feature ;-). When your browser realizes that it already has a copy of given file in browser cache, it abruptly closes the connection in order not to waste time and bandwidth. This causes exception on the server (tomcat) side of the connection. It is plainly cosmetic nuisance. There is plenty of information on this on the web if you run the search on "tomcat socket write error" Hope it helps, Michael Szlapa [EMAIL PROTECTED] -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 9:49 AM To: Struts Subject:Bug in tomcat or the JDK (testing it on 1.2.2) Hi, If i use Tomcat as a static (gifs) and dynamic (jsp) server, that is mostly used inside a debugging evironment or maybe if it is specified that everything in the webapp\app dir must be served by tomcat (still find this a very bad idee), then i noticed that i get socket exceptions on specifiek files those files have something in common they are the larger files in my app: 31290 and 23281 bytes this is the error: 2001-03-28 04:40:07 - Ctx( /financialtools ): IOException in: R( /financialtools + /overlib.js + null) socket write error (code=10053) Then i went testing in the source code of org.apache.tomcat.request.FileHandler where it is thrown. And after sometesting i found out that a picture can't be larger then 16383 because if it is 16384 then an exception will be thrown. I tested this with the read in buffer: byte[] buf = new byte[16383]; if that number is larger then 16383 i wil get a exception when i write it. so if i keept it 16383 then the first write to out.write(buf, 0, read); will pass but the next bloc will fail. And if i make it 16384, out.write(buf, 0, read); will fail the first time! As far as i can see now it comes from the jdk it self: java.net.SocketException: socket write error (code=10053) java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.io.IOException(java.lang.String) java.net.SocketException(java.lang.String) void java.net.SocketOutputStream.socketWrite(byte [], int, int, java.io.FileDescriptor) --- void java.net.SocketOutputStream.write(byte [], int, int) void org.apache.tomcat.service.http.HttpResponseAdapter.doWrite(byte [], int, int) void org.apache.tomcat.core.BufferedServletOutputStream.doWrite(byte [], int, int) void org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush() void org.apache.tomcat.core.BufferedServletOutputStream.write(byte [], int, int) void org.apache.tomcat.request.FileHandler.doService(org.apache.tomcat.core.Reque st, org.apache.tomcat.core.Response) So is this a bug of Tomcat or the JDK it self? But can't send more then 16K? that is a bit strange. I know this is not a tomcat list but when developing with struts i came accross this and i don't want to have another list that i have to monitor and i know there are a few tomcat developers here. Johan
RE: Estimating Projects with Struts
We are using: JDK 1.3 Struts 1.0b1 Tomcat 3.2.1 Apache 1.3.19 Kawa 5.0 (Pro Edition) Win2000 Oracle 8.1.6 (Stored Procedure calls from JDBC) -Original Message- From: malcolm davis [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 22:39 To: [EMAIL PROTECTED] Subject: RE: Estimating Projects with Struts Hello Kyle, What kind of development envior. are you using? -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 5:09 PM To: Struts (E-mail) Subject: Estimating Projects with Struts We have a number of projects, big and small starting up that will be using Struts as a framework. Our main concern with this is how to best estimate with it. Does anyone have any experience with estimating with Struts? For example, how long it takes to do the following: 1. A basic screen (editing, saving to a db, etc.) 2. A medium screen (same as above but maybe with a parent, child relationship) 3. A complex screen (same as above but maybe some special naivgation, extra controls) This may sound broad but any help would be appreciated... Thanks. Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Estimating Projects with Struts
Allaire's Kawa 5.0 http://www.allaire.com/products/kawa/index.cfm -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 09:25 To: [EMAIL PROTECTED] Subject: Re: Estimating Projects with Struts It is depending on how much your team are familiar with Struts. If you can explain or draw a good picture for page developers how to use the Struts tags, then to develop small screen - 1/2 day (from a scratch), big one - 1 week. Then your java developers need to make the Action and Form classes for each form (until we do not have a general purpose Action and Form). It can take 2 months, depending how big is your team. Also, installation, bugs fixes, testing on Tomcat-Apache can take 1 month. It is minimum from my point of view. By the way, what is Kawa - IDE? Can you email its link? Maya Kyle Robinson wrote: We are using: JDK 1.3 Struts 1.0b1 Tomcat 3.2.1 Apache 1.3.19 Kawa 5.0 (Pro Edition) Win2000 Oracle 8.1.6 (Stored Procedure calls from JDBC) -Original Message- From: malcolm davis [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 22:39 To: [EMAIL PROTECTED] Subject: RE: Estimating Projects with Struts Hello Kyle, What kind of development envior. are you using? -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 5:09 PM To: Struts (E-mail) Subject: Estimating Projects with Struts We have a number of projects, big and small starting up that will be using Struts as a framework. Our main concern with this is how to best estimate with it. Does anyone have any experience with estimating with Struts? For example, how long it takes to do the following: 1. A basic screen (editing, saving to a db, etc.) 2. A medium screen (same as above but maybe with a parent, child relationship) 3. A complex screen (same as above but maybe some special naivgation, extra controls) This may sound broad but any help would be appreciated... Thanks. Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Estimating Projects with Struts
We have a number of projects, big and small starting up that will be using Struts as a framework. Our main concern with this is how to best estimate with it. Does anyone have any experience with estimating with Struts? For example, how long it takes to do the following: 1. A basic screen (editing, saving to a db, etc.) 2. A medium screen (same as above but maybe with a parent, child relationship) 3. A complex screen (same as above but maybe some special naivgation, extra controls) This may sound broad but any help would be appreciated... Thanks. Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Connection Pool
http://jakarta.apache.org/struts/api/org/apache/struts/util/package-summary. html#doc.JDBC -Original Message- From: Christophe Vigny [mailto:[EMAIL PROTECTED]] Sent: Friday, March 16, 2001 08:31 To: [EMAIL PROTECTED] Subject: Connection Pool Where is the connection pool ? in tomcat, in turbine or in strut ?
logic:equal and nesting
Here's a piece of code that I want to do. However it gives a nested tag error as the closing /logic:equal tag ends up inside the html:form.I basically want the form to do different actions based on the property "title". Anyone know of a better way of doing the same thing? logic:equal name="supplierSearchBean" property="title" scope="request" value="Contractor" html:form action="contractorSearch.do"/logic:equallogic:equal name="supplierSearchBean" property="title" scope="request" value="Supplier" html:form action="supplierSearch.do"/logic:equal Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
html:select multiple=true problem
Got another problem. I have on a form a select that allows multiple selections. However, I am getting a populate error when the multiple values are stuck into my object. It is declared as an ArrayList. Anyone have a code snippet they can provide to show how this is done? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: logic:equal and nesting
Thanks. I went with option number two. It's more correct for what I want to do. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 10:28 To: '[EMAIL PROTECTED]' Subject: Re: logic:equal and nesting On Thu, 15 Mar 2001, Kyle Robinson wrote: Here's a piece of code that I want to do. However it gives a nested tag error as the closing /logic:equal tag ends up inside the html:form. I basically want the form to do different actions based on the property "title". Anyone know of a better way of doing the same thing? logic:equal name="supplierSearchBean" property="title" scope="request" value="Contractor" html:form action="contractorSearch.do" /logic:equal logic:equal name="supplierSearchBean" property="title" scope="request" value="Supplier" html:form action="supplierSearch.do" /logic:equal As the error message tells you, this is invalid nesting of tags. In order to change the destination of the submit, you will need to create some JavaScript that does so on the client side, perhaps when the submit button is presed. (If you do this, be sure you use the same form bean on all of the actions, or Struts is likely to get confused.) Alternatively, you could have the html:form tag submit to a single action, (say, "/commonSearch.do") which could then look at the title property itself and then forward to either "/contractorSearch.do" or "/supplierSearch.do" appropriately. Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 Craig
RE: html:select multiple=true problem
I looked and now I have the code. It still won't populate. Basically all I want to do is pick a couple items from a multiple select and display the picked items on the next page. -Original Message-From: Maya Muchnik [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 15, 2001 10:49To: [EMAIL PROTECTED]Subject: Re: html:select multiple="true" problemSeveral examples are in email archives (I have remembered that). Kyle Robinson wrote: Got another problem. I have on a form a select that allows multiple selections. However, I am getting a populate error when the multiple values are stuck into my object. It is declared as an ArrayList. Anyone have a code snippet they can provide to show how this is done?Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
ActionForm (DataObject) generator?
We are using Struts with an Oracle database as the backend. We don'treally feel like handwriting 100's of java files (one for each table). Does anyone know of a good db table - java object generator? Preferably open source? Thanks Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Mismatch Between html:options and logic:iterate
Sounds good to me... -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 16:21 To: '[EMAIL PROTECTED]' Subject: RE: Mismatch Between html:options and logic:iterate On Tue, 13 Mar 2001, Fickes, Vic wrote: I agree that the mismatch is odd (ie. confusing), You know how things get out of sync no matter how hard you try? Well, this was one of them :-(. but my vote would be to make the html:options collection attribute act like the logic:iterate collection attribute. My reasoning is that I have several static methods that return collections that could be used to populate the select lists, and it would be nice to access them directly instead of having to get to them via a property in a bean. I also think the current logic:iterate behavior is more useful, and suggest that we change html:options to match. As a nod towards backwards compatibility, how about if we make html:options smart enough, as a special case, so that if it receives a String it will still be treated as a bean name? This behavior would be deprecated, but would avoid instantly breaking old code. Vic Craig
RE: Struts and Multiple File Upload
Look up the MultiPartRequest section of the documentation. -Original Message- From: Christian Billen [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 04, 2001 21:59 To: [EMAIL PROTECTED] Subject: Struts and Multiple File Upload Hi there, I want to implement a form with multiple input for file upload, is there any functionality in the framework to help you process these? Any pointers to the doc would help. Thanks, Christian
Drop-down list
What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Drop-down list
I'd remove all the square brackets. If you want to keep them, the parameter type in setProviderName should be String[]. I don't know for sure though. -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 13:02 To: [EMAIL PROTECTED] Subject: Re: Drop-down list Trying to use Multiple="true" attribute for html:select Help! O.k. so I declare it like so: protected String[] providerName; Then I get it: public String[] getProviderName() { return (providerName); } Then I set it: public void setProviderName(String providerName[]) { { this.providerName = providerName; } } What am I missing? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:02 PM Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Introspection
Has anyone used the concept of introspection with the struts framework? I believe the idea of it is that you write a use bean line in your jsp and call the jsp:setProperty name="blah" property="*" and when the form is posted all the properties of object blah get set to the values in the form objects that match the names. Tell me if I'm way off-base and if this is the opposite direction from Struts or not. Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111