[Tiles] Insert URL Restrictions?
From the Tiles documentation, the insert page URL restrictions aren't clear to me. For example, with the JSTL tag, one can import content from: 1. the same web context 2. another context in the same web container 3. anywhere in the world via a URL (this is what I need) Tiles API Guide: "The page attribute is any valid URL pointing to a resource inside the current site." "The Tiles body can be a simple JSP page, a Struts action or any URI pointing to a resource inside the current web site." Which of the numbered items above can be specified as a source of content with Tiles? Thank you. - Jim ______ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best Practice for data source access
On this list, I recall a debate regarding whether or not it's best to cache a javax.sql.DataSource. Some thought that caching the DataSource would allow your code to run faster. Others claimed, on Tomcat at least, that there is no observable performance penalty when getting a DataSource and that by not caching the DataSource and getting it whenever you get your Connection, your code will be more robust in the event your database server should be restarted while your application is running. Although I haven't tested these claims, I'm getting my javax.sql.DataSource every time I get a Connection (with Connection and PreparedStatement pooling on Tomcat): connection = getDataSource().getConnection();. I'm not sure if this answers your question. - Jim At 11:32 AM 1/12/2004 -0500, you wrote: What is the best practice for establishing a data source connection using JNDI. I am using the DAO pattern for database access but where is the best location for placing the code that initializes the data source? I am using connection pooling. I am moving a Struts application into a Portlet. The core servlet is com.ibm.wps.portlets.struts.WpsStrutsPortlet. Thanks __________ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Pitfalls..
There are many Java-based web application frameworks. Which framework should you use? Who will give you the unbiased advice you're looking for? Things to include in your evaluation: source code availability and support from books, forums, and tools. From Sun Java BluePrints Enterprise Guidelines, "Designing Enterprise Applications with the J2EE Platform, Second Edition" ISBN: 02017879: Page 93, Section 4.3: "The BluePrints recommended best practice is to choose an existing, proven Web-tier application framework for a J2EE application rather than designing and building a custom framework layer." Page 114, Section 4.4.5: "Struts has a great deal of mindshare, and can be considered an industrial-strength framework suitable for large applications." http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/index.html - Jim At 12:43 PM 5/27/2003 +0530, you wrote: Hello Gurus, For the prototype of our project we have chosen Struts (as proof of model2 concept & technology). I was googling to find any pitfalls or downside of Struts framework or any failure (or success) story. I was looking for any inheret performace issue or limitation. However Struts being ralatively new framework, I found none. Can anybody will provide any related links? Thanks in advance Ashutosh __ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:out output problem
I was able to duplicate your problem. The solution: change to - Jim At 08:47 PM 3/24/2003 -0500, you wrote: The following jsp: Where ${list} is a Bean with a getHeaders() that returns a Collection which, in this case, is an ArrayList of Strings. The ${list} object is used elsewhere and works perfectly so I know it is being properly set. The above outputs: [EMAIL PROTECTED] [EMAIL PROTECTED] (There suppose to be two headers.) Any ideas? Thanks, A. -- Adam Sherman Tritus CG Inc. http://www.tritus.ca/ +1 (613) 797-6819 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Datasource
See the following message for Craig McClanahan's take on this. http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=594323 - Jim At 10:28 PM 3/24/2003 -0500, you wrote: I've read the literature and nothing seems definitive. Apparently we can declare a data source by: 1. Declaring it in struts-config; 2. Declaring it in the container app; 3. Declaring it in the source code; 4. Declaring it in the deployment descriptor; 5. Declaring it in the EJB deployment descriptor. Is it just me or is this a pile of this? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ______ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Size Limitation When Using logic:iterate on Object[][]?
Regarding the problem that I posted earlier, I've discovered that if I replace: with the following tag from the JSTL Core: the problem goes away. It's funny though how works through most of the iterations. - Jim At 09:16 PM 3/20/2003 -0800, you wrote: The following example works on small sets of data. But it fails on a dataset of about 570 rows and 12 columns. When it fails, the resulting page appears in the browser but the the content stops in mid row after about 475 rows. The servlet throws the following exception when it fails: StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.jasper.JasperException: Cannot find bean column in scope null "tableData" is a two dimensional array (Object[][]) stored in request scope. If you vary the specified text in the example, you can change the row of failure. In some cases, making that text longer actually allowed me to print more rows. Vary the length of this text to affect the row of failure. Why does it work on some datasets but not larger ones? Am I exceeding a size limitation? Am I misusing the logic:iterate tag? Environment: Struts 1.0.2 Tomcat 4.1.18 Windows 2000 Professional Thank you. - Jim __________ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __________ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Size Limitation When Using logic:iterate on Object[][]?
The following example works on small sets of data. But it fails on a dataset of about 570 rows and 12 columns. When it fails, the resulting page appears in the browser but the the content stops in mid row after about 475 rows. The servlet throws the following exception when it fails: StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.jasper.JasperException: Cannot find bean column in scope null "tableData" is a two dimensional array (Object[][]) stored in request scope. If you vary the specified text in the example, you can change the row of failure. In some cases, making that text longer actually allowed me to print more rows. Vary the length of this text to affect the row of failure. Why does it work on some datasets but not larger ones? Am I exceeding a size limitation? Am I misusing the logic:iterate tag? Environment: Struts 1.0.2 Tomcat 4.1.18 Windows 2000 Professional Thank you. - Jim ______ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Searching the Struts Mail List Archive
I'd like to give some constructive feedback on the two different interfaces to the Struts Mail List Archive. http://www.mail-archive.com/[EMAIL PROTECTED]/ and http://nagoya.apache.org/eyebrowse/SummarizeList?listId=42 The second interface seems to give more relevant search results. Have others found this to be true? - Jim __ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts1.1 message resources ???en_CA.version???
Would you agree though with the following exceptions taken from the Tomcat doc?: "Install Your JDBC Driver Use of the JDBC Data Sources JNDI Resource Factory requires that you make an appropriate JDBC driver available to both Tomcat internal classes and to your web application. This is most easily accomplished by installing the driver's JAR file(s) into the $CATALINA_HOME/common/lib directory, which makes the driver available both to the resource factory and to your application." "DBCP uses the Jakarta-Commons Database Connection Pool. It relies on number of Jakarta-Commons componenets: Jakarta-Commons DBCP 1.0 Jakarta-Commons Collections 2.0 Jakarta-Commons Pool 1.0 These jar files along with your the jar file for your JDBC driver should be installed in $CATALINA_HOME/common/lib. NOTE:Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds $CATALINA_HOME/common/lib/*.jar to the classpath. NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib." - Jim At 12:59 PM 3/13/2003 -0700, you wrote: Always put all necessary jar files under /WEB-INF/lib for each project and never use a container's common directory. http://jakarta.apache.org/struts/faqs/kickstart.html#install David From: Rasputin <[EMAIL PROTECTED]> Reply-To: Rasputin <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: Struts1.1 message resources ???en_CA.version??? Date: Thu, 13 Mar 2003 19:39:07 + * David Graham <[EMAIL PROTECTED]> [0344 18:44]: > Is struts.jar one of those jars? If so, it's not surprising that there are > problems finding the properties file. Sorry if this is a dumb question, but why? Is it a general rule that struts.jar shouldn't be in tomcat's classpath? What about $CATALINA_HOME/common/lib/ ? -- She is not refined. She is not unrefined. She keeps a parrot. -- Mark Twain Rasputin :: Jack of All Trades - Master of Nuns - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ServletOutputStream.write(byte[], int, int) Return Value
I have a question regarding the return value of the write method in the ServletOutputStream class in the example code given in a previous post to this list (see the message below). Isn't the correct return value void, not int? It's my understanding that javax.servlet.ServletOutputStream extends java.io.OutputStream which, at least currently, defines the write method's return value to be void. What's interesting though is that the Java Tutorial claims it's int. See: http://java.sun.com/docs/books/tutorial/essential/io/overview.html Another interesting point is that even though the current JavaDoc for java.io.OutputStream defines the return value to be void, it includes the following line: "The general contract for write(b, off, len) is that some of the bytes in the array b are written...", the key word here being "some." Would anyone care to comment on the history or reality of this API? - Jim The following message was taken from the Struts Mail Archive: Response to: File upload/download design question ([EMAIL PROTECTED]) Date: Wed, 30 May 2001 20:08:25 -0700 (PDT) From: Craig R. McClanahan <[EMAIL PROTECTED]> Subject: File upload/download design question Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 25 Apr 2001 [EMAIL PROTECTED] wrote: > > I have a design question regarding file upload/download which is not > completely Struts related but I was hoping someone could provide some > suggestions. I have succeeded with the upload using the struts upload > package, and then I load the file into an Oracle BLOB field. Now I need to > get it back to the user if they want to view it. > > I was planning to create an Action for processing the file download. The > user will click on a URL and pass in the ID of the file as a request > parameter to the Action (i.e. fileDownload.do?id=1234). The Action will > access a session EJB which then locates the requested file and returns it to > the Action as a File object. Here is where I need advice: what is the best > way to send this File back to the browser? Can I change the response type > to "file" somehow and stream this to the browser? Another option I thought > about was saving the file to a temp directory and then redirecting the > browser to this file. I would rather not write temp files if I don't have > to. Or, is there any functionality provided with struts for sending a file > back to the browser? > This is one of the cases where you might actually want to have an Action create the response itself, instead of forwarding to a JSP page to do it. The reason for this is that JSP pages aren't meant for binary output (like a GIF image) -- but servlets can do this easily. An example of an Action to do this might look like this: byte buffer[] = ... load byte array from the database ... int size = xxx; // Number of bytes to be sent response.setContentLength(size); response.setContentType("image/gif"); // Or whatever is correct ServletOutputStream stream = response.getOutputStream(); int sent = 0; while (sent < size) { int count = stream.write(buffer, sent, size - sent); sent += count; } stream.flush(); return (null); Note that NULL is returned, instead of an ActionForward. This is the signal to the controller servlet that the Action has already created the response, so no forwarding is required. > Any suggestions greatly appreciated... > > Thanks, > Bob > Craig -------- Copyright © 1999-2002, The Apache Software Foundation __ James Watkin ACIS Software Development The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FYI: "Struts in Action" Unavailable at Amazon
I tried to place an order for "Struts in Action" just prior to Christmas. Here's Amazon's response: "Greetings from Amazon.com. We are sorry to report that we will not be able to obtain the following item from your order: Ted Husted, et al "Struts in Action: Building Web Applications with the Leading Java Framework" Though we had expected to be able to send this item to you, we've since found that it is not available from any of our sources at this time. We realize this is disappointing news to hear, and we apologize for any inconvenience we have caused you. We have cancelled this item from your order." I'm going for the $22.47 E-book version available at: http://www.manning.com/ebook_buy.html?project=husted They also note: "ebook purchasers who decide later to purchase the printed book online from Manning will receive a discount of $22.47 off the list price of the printed book." - Jim __ James Watkin The Anderson School at UCLA [EMAIL PROTECTED] Voice: 1-310-825-5030 Fax: 1-310-825-4835 __ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>