RE: commons - BeanUtils ; mapping and setFoo getFoo how to ?
Now u are telling me I have tried it until my blood is out of my kishke... So tell me, I'm using InvocationHandler to invoke my methods, is there a way at the night build of struts or other interesting way I should know? Thanx man! -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:20 AM To: Struts Users Mailing List Subject: Re: commons - BeanUtils ; mapping and setFoo getFoo how to ? I don't think that the mapped properties are working. I went to add the ability to the nested:iterate tag the other day and tested the bean utils directly before I did so and it doesn't work. I found the problem though, but haven't had time to fix it properly and put in a patch. Arron. Arik Levin ( Tikal ) wrote: Does anybody here have a tutorial or a sample for the commons BeanUtils ? I'm trying to map setter and getter method and invoke them. Using http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanuti l s/MappedPropertyDescriptor.html MappedPropertyDescriptor . I don't know how to work this thing. Thanx. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 04:04:04 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts and Rich Clients
Hi! I'm currently writing a rich client database application which performs database manipulations by using XML and sends it to the web server (running struts). I'm looking for a sample application for both of these: 1. rich client app 2. struts+xml I tried checking these on javasoft, onjava, javaworld and theserverside sites but still cant find a good example and reference. Any help is greatly apprecitated. - L. Yeung __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: Struts 1.1
What is the V/S Toolkit and where do I find it? Thanks ! -Ursprungliche Nachricht- Von: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 11. Februar 2002 19:01 An: Struts Users Mailing List Betreff: Re: Struts 1.1 There is now a multi-applications support. Some new classes have been added. A lot of methods from the servlet have been moved in different classes, like the RequestProcessor class. Tiles need now to provide a subclass of RequestProcessor in order to catch calls to forward/include. Also, instruction to use this subclass is specified in struts-config rather than in web.xml. Cedric Vic Cekvenich wrote: What is the difference for 1.1 for bellow? I have used nightly builds plus tiles and validation for 1.1. Vic Ted Husted wrote: Since the nightly builds archives on Jakarta are on a short leash now, if anyone needs a Nightly Build JAR that will work with Tiles and the V/S Toolkit et cetera, there's one here. http://husted.com/struts/resources/struts_1_1a.zip Ted Husted wrote: The functionality will be restored, but for the time being to use Tiles you will have to roll back to a nightly build prior to 15 January. The same goes for the new Velocity/Struts toolkit. There were some changes to the ActionServlet, and some of the higher level compatibility issues need to be resolved. Virtually all typical applications should run just fine, but the changes Tiles makes are atypical. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Sean Willson wrote: Hello All, Had a question about the latest nightly and some changes/functionality that was removed or missing. I am currently using Tiles and Struts (build from 11/9/2001) to manage the View portion of our website. We have custom renderers that serve up different views depending on the browser type you are coming in with. Anyhow, in our struts config file we often use the action input=some.tile.property.here ... /action In the old releases this worked fine, but in the latest release it appears that the action servlet that Tiles uses isn't answering the calls to the getInput() command called on mapping any longer, the ActionConfig is now. Is this feature gone or are they planning on returning it? Basically, I guess I just want to know if the Tiles template will continue to be integrated into struts as deeply as it was in the past. I am also trying to get a feel for if I have to modify the code myself, which we have yet to do, or if I can rely on the standard builds. Thanks for the help everyone ... Sean P.S. Hopefully when we release, which should be soon, I can give a more detailed look at what we did and what we may be able to contribute back to struts or jakarta. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 04:24:12 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JDO
Hi Martin, I believe that JDO can be used successfully - I'm currently planning to use Castor directly or with EJBs running under JBoss. The thing I like about it is that it also does rather reasonble XML serialization. Thus I can write an XML Schema to reflect a persistant object-tree then automate building the objects. That's rather cool for separating off the interface from persistence as I can demo a Strut's based app. without any Database.. then just map it into a relational-database. Doing things this way also buys you at least some Schema-based validation since Castor will generate a validate method based on your schema. There are others on the list who suggest this validation is too course to be of much use.. but it is a start.. anc Castor is open-source. My impression is that there are places where it could be enhanced but is generally a solid product. I've worked with other OR mapping tools with regard to EJBs. At that level mapping to the database is pretty rote and therefore a good place to use a tool - who wants to write all the JDBC for this? Efficiency usually is not as good as JDBC so these tools usually add caching to improve that. In my application I don't think this will be an issue while development speed is. The key thing is to know where to use the tool and realise that you shouldn't get too esoteric with mapping complexity. Hope this helps, Jon Martin Farrell wrote: Hi I am interested in introducing JDO or some form of Object-Relational mapping into my application. I've had a hunt around and think the best option is probably castor(http://castor.exolab.org) although Teds page lists some other options. Has anyone had any experience in using JDO with struts? If so what sort of object model did you use? What other open source options should i consider? Am i better off sticking with JDBC until JDO is more mature? I would also be interested in seeing an example of struts and jdo Thanks in advance Martin ** For great Emap magazine subscription gift offers visit http://www.emapmagazines.co.uk ** The information in this email is intended only for the addressee(s) named above. Access to this email by anyone else is unauthorised. If you are not the intended recipient of this message any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. Emap plc and or its subsidiaries do not warrant that any attachments are free from viruses or other defects and accept no liability for any losses resulting from infected email transmissions. Please note that any views expressed in this email may be those of the originator and do not necessarily reflect those of this organisation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
page do not refresh
Hi, I have a problem in my struts application, I have a page that call an action servlet which store a value received in url in session, than forward to a jsp page. If I this action servlet is called with another value in url, the jsp page do not change, it seems to come from the proxy. I put expire meta tag in jsp, but no changes, the url in the adress bar is always the .do action. Does it means that I must make the action servlet expire ? I don't understand the process, thanks for help Frédéric houbie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 04:39:33 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: page do not refresh
Frédéric, If the query string is different between the two requests, it is not likely to be a page caching problem. The query string is part of the URL, so things that cache pages by URL will see the two requests as two different URLs. Try using the request scope, rather than the session scope, for passing the object from your Action to the JSP page. This is preferable unless you need to keep the value in the session for some other reason. However, if it does need to be in the session, it doesn't seem like the action is replacing the value in the session and needs further review (perhaps you could post the code that puts/gets the value in the session). -Max - Original Message - From: Frédéric Houbie - ABSIS-GROUP [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 1:34 AM Subject: page do not refresh Hi, I have a problem in my struts application, I have a page that call an action servlet which store a value received in url in session, than forward to a jsp page. If I this action servlet is called with another value in url, the jsp page do not change, it seems to come from the proxy. I put expire meta tag in jsp, but no changes, the url in the adress bar is always the .do action. Does it means that I must make the action servlet expire ? I don't understand the process, thanks for help Frédéric houbie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 05:23:46 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Loading pdf files using jsp
Hello, I want to load a PDF file from JSP. Is it possible. Regards Arun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 05:30:32 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 05:32:51 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: page do not refresh
In fact, the value in the session is ok, but it seems that the proxy is caching a lot, because the url inn the browser is the Action servlet name instead of JSP page, so the url /Online/TenancySchedule.do is always the same and the Actionforward to the jsp is transparent. How can I force the proxy to regenerate the jsp page, here is my code public class SelectSiteAction extends org.apache.struts.action.Action { /** Creates new LogonAction */ public SelectSiteAction() { } public org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { // Extract attributes we will need Locale locale = getLocale(request); MessageResources messages = getResources(); // Validate the request parameters specified by the user HttpSession session = request.getSession(); ActionErrors errors = new ActionErrors(); System.out.println(SelectSiteAction [Start]); String strCellIDParam = request.getParameter(CellID); System.out.println(CellID received in URL + strCellIDParam); // Report any errors we have discovered back to the original form // Is there a currently logged on user? reqReoUser reoUser = (reqReoUser) session.getAttribute(User); if (reoUser == null) { if (servlet.getDebug() = 1) servlet.log( User is not logged on in session + session.getId()); return (servlet.findForward(logon)); } // Get Datasource configured from struts-config.xml DataSource dataSource = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY); java.sql.Connection conn = null; try { // Get a connection to database from the Generic Pool conn = dataSource.getConnection(); // Put a session value specifying the Site ID on which every report will work if (session.getAttribute(Site) != null) session.removeAttribute(Site); session.setAttribute(Site, strCellIDParam); System.out.println(Site session value); System.out.println(session.getAttribute(Site)); // Put a request attribute with record of the Site if (session.getAttribute(SiteCard) != null) session.removeAttribute(SiteCard); session.setAttribute(SiteCard, reqSiteCard.findByCellID(conn, Integer.parseInt(strCellIDParam))); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); session.setAttribute(Today, df.format(new Date())); } catch (SQLException sqle) { //servlet.log(sqle); sqle.printStackTrace(); session.setAttribute(SQLError, sqle); return (mapping.findForward(failure)); } finally { try { conn.close(); } catch (SQLException sqle) { System.out.println(sqle); } conn = null; } System.out.println(SelectSiteAction [End]); return (mapping.findForward(ShowCard)); // Forward control to the specified success URI } } -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED]] Sent: mardi 12 février 2002 11:19 To: Struts Users Mailing List Subject: Re: page do not refresh Frédéric, If the query string is different between the two requests, it is not likely to be a page caching problem. The query string is part of the URL, so things that cache pages by URL will see the two requests as two different URLs. Try using the request scope, rather than the session scope, for passing the object from your Action to the JSP page. This is preferable unless you need to keep the value in the session for some other reason. However, if it does need to be in the session, it doesn't seem like the action is replacing the value in the session and needs further review (perhaps you could post the code that puts/gets the value in the session). -Max - Original Message - From: Frédéric Houbie - ABSIS-GROUP [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 1:34 AM Subject: page do not refresh Hi, I have a problem in my struts application, I have a page that call an action servlet which store a value received in url in session, than forward to a jsp page. If I this action servlet is called with another value in url, the jsp page do not change, it seems to come from the proxy. I put expire meta tag in jsp, but no changes, the url in the adress bar is always the .do action. Does it means that I must make the action servlet expire ? I
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 05:41:59 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: DTDS Required for Struts and Web Application.
How exactly should i do it can you give me an example. regards, Sudhir - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 04, 2002 18:18 Subject: Re: DTDS Required for Struts and Web Application. It's suppose to use the one's in the Struts JARs. Under some circumstances, from what people say, that doesn't seem to happen. There is a switch in the ActionServlet (validating) that can turn the DTD validation off if it gets to be a problem. http://jakarta.apache.org/struts/api-1.0/org/apache/struts/action/ActionServ let.html -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Sudhir S. Shetty wrote: Hi All, I have an Intranet application hosted on Weblogic Server , the application is built on STRUTS, I need to know, whenever I start up weblogic, the server downloads the DTD's for the application i.e. the struts specific DTD's and the ones specific to Sun for the Web application. Can You suggest me a work arond in which I download the DTD's on to my machine on to a folder, so that These DTD's dont need to be downloaded everytime I start Weblogic up. Kindly tell me the places I have to make the change. Thanks in advance, Sudhir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Poolman and charset
I have been using the struts connection pool for some time but have decided to switch to poolman My original connection pool conf looked like this data-source key=db set-property property=autoCommit value=false/ set-property property=description value=Some db/ set-property property=driverClass value=com.inet.tds.TdsDriver/ set-property property=maxCount value=30/ set-property property=minCount value=1/ set-property property=password value=/ set-property property=url value=jdbc:inetdae7:10.30.0.199:1433?database=mydb/ set-property property=user value=xxx/ set-property property=password value=xxx/ set-property property=charset value=Cp850/ set-property property=loginTimeout value=5/ /data-source As you can see I have a charset=cp850, which is a must as I am connecting to a legacy MS SQL database... So the question is, how do I set this parameter in the poolman.xml file??? I have tried adding it to the url urljdbc:inetdae7:10.30.0.199:1433?database=mydbcharset=Cp850/url which makes poolman throw up... any suggestions??? thanks Mikkel Bruun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 06:12:05 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Forwarding if Validation Fails
[EMAIL PROTECTED] (Antony Stace) wrote: I want to use this a validationTest() approach but am not sure how to use it in my case. I don't want to have this logic in the ActionForm since the logic is quite long to work out if the data is valid. I have a AddNewUserDetails page in my application and if a admin user enters a new user with a userName which is already used then I want to 1. Create an ActionError and add this to the errors in this Action using saveErrors() 2. Delete the value of userName in the ActionForm(so when the AddNewUser is displayed again the userName field is not filled in, but blank) Once these are done, I will return the user to AddNewUserDetails page by way of the getInput() method. What is the best way to go about this? What are you specifically stuck with? You seem to have described all the steps. Duncan Harris ~~~ Hartford, Cheshire, U.K., Tel: 07968 060418 Looking for STRUTS contract work in the U.K. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 06:31:44 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Pre and Post Processing
Thanks for the info. For things like drop lists, we will be using a custom tag, as most of our drop lists come from a standard validation group XML transaction to our back end. We pass in a group serial, and it returns a set of values for the drop list. (Plus I don't particularly like the idea of having SQL in JSPs) A colleague of mine is currently investigating custom tags with a view to producing a simple interface for these drop downs. Keith suggested putting it in the ActionHandlerI'm not particularly comfortable with that, as that then ties the two web pages together. I'd like (ultimately) to have our back end drive which page comes next, rather than having it in the struts-config.xml, but to do this, I need to have each page autonomous, and have it get all it's pre-requisites itself. Jeff's mail (Framework Questions) was interesting as it raises a similar point. I think I would like the ability for a JSP page to run an specific ActionHandler's perform() before processing the rest of the page. Comments? Tim. This e-mail and its attachments are for the use of the addressee only. It may contain information that is legally privileged, confidential and exempt from disclosure. It is not a contract, and prices, data and other information are not warranted as to completeness or accuracy. Any comments or statements made herein do not necessarily reflect those of PanCredit Systems Limited. If you are not the intended recipient you must not copy, distribute or disseminate this e-mail or attachments to anyone other than the addressee. If you receive this communication in error please advise us by telephone at once. PanCredit Systems Limited Tel:+44 113 250 0260 Fax:+44 113 250 0621 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 06:39:54 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: build failure problem
You need Xalan either in your classpath or in your $ANT/lib directory since the ant script uses the Style task. The Style task is deprecated by Ant and the struts build.xml has not been changed/updated to whatever new approach is recommended. From: Adam Hardy [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: build failure problem Date: 11 Feb 2002 16:35:23 -0800 On Mon, 11 February 2002, dIon Gillard wrote: Do you have the optional.jar in ant's lib directory? Trying to do the same thing, I just got exactly the same error from optional.xalanLiaison I searched my whole system and I don't have optional.jar. ant-1.4.1 only came with 3 jar files - ant, jaxp and crimson Ah alright, I just found it on the ant ftp site. Then the next build burp is on xalan.jar - I specified that in my CLASSPATH and ant was happy. Now I've got my struts to compile - yippee! Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 07:04:15 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: DTDS Required for Struts and Web Application.
I can't find it on the struts site but i think it's Under definition servlet servlet-nameaction/servlet-name This bit - change it to false. Try it out - sorry if it's not. init-param param-namevalidate/param-name param-valuetrue/param-value /init-param --- Sudhir S. Shetty [EMAIL PROTECTED] wrote: How exactly should i do it can you give me an example. regards, Sudhir - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 04, 2002 18:18 Subject: Re: DTDS Required for Struts and Web Application. It's suppose to use the one's in the Struts JARs. Under some circumstances, from what people say, that doesn't seem to happen. There is a switch in the ActionServlet (validating) that can turn the DTD validation off if it gets to be a problem. http://jakarta.apache.org/struts/api-1.0/org/apache/struts/action/ActionServ let.html -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Sudhir S. Shetty wrote: Hi All, I have an Intranet application hosted on Weblogic Server , the application is built on STRUTS, I need to know, whenever I start up weblogic, the server downloads the DTD's for the application i.e. the struts specific DTD's and the ones specific to Sun for the Web application. Can You suggest me a work arond in which I download the DTD's on to my machine on to a folder, so that These DTD's dont need to be downloaded everytime I start Weblogic up. Kindly tell me the places I have to make the change. Thanks in advance, Sudhir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: page do not refresh
There was a post the other day mentioning the trick of putting a timestamp in the query string at the end of the URL's. --- Frédéric_Houbie_-_ABSIS-GROUP [EMAIL PROTECTED] wrote: In fact, the value in the session is ok, but it seems that the proxy is caching a lot, because the url inn the browser is the Action servlet name instead of JSP page, so the url /Online/TenancySchedule.do is always the same and the Actionforward to the jsp is transparent. How can I force the proxy to regenerate the jsp page, here is my code public class SelectSiteAction extends org.apache.struts.action.Action { /** Creates new LogonAction */ public SelectSiteAction() { } public org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { // Extract attributes we will need Locale locale = getLocale(request); MessageResources messages = getResources(); // Validate the request parameters specified by the user HttpSession session = request.getSession(); ActionErrors errors = new ActionErrors(); System.out.println(SelectSiteAction [Start]); String strCellIDParam = request.getParameter(CellID); System.out.println(CellID received in URL + strCellIDParam); // Report any errors we have discovered back to the original form // Is there a currently logged on user? reqReoUser reoUser = (reqReoUser) session.getAttribute(User); if (reoUser == null) { if (servlet.getDebug() = 1) servlet.log( User is not logged on in session + session.getId()); return (servlet.findForward(logon)); } // Get Datasource configured from struts-config.xml DataSource dataSource = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY); java.sql.Connection conn = null; try { // Get a connection to database from the Generic Pool conn = dataSource.getConnection(); // Put a session value specifying the Site ID on which every report will work if (session.getAttribute(Site) != null) session.removeAttribute(Site); session.setAttribute(Site, strCellIDParam); System.out.println(Site session value); System.out.println(session.getAttribute(Site)); // Put a request attribute with record of the Site if (session.getAttribute(SiteCard) != null) session.removeAttribute(SiteCard); session.setAttribute(SiteCard, reqSiteCard.findByCellID(conn, Integer.parseInt(strCellIDParam))); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); session.setAttribute(Today, df.format(new Date())); } catch (SQLException sqle) { //servlet.log(sqle); sqle.printStackTrace(); session.setAttribute(SQLError, sqle); return (mapping.findForward(failure)); } finally { try { conn.close(); } catch (SQLException sqle) { System.out.println(sqle); } conn = null; } System.out.println(SelectSiteAction [End]); return (mapping.findForward(ShowCard)); // Forward control to the specified success URI } } -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED]] Sent: mardi 12 février 2002 11:19 To: Struts Users Mailing List Subject: Re: page do not refresh Frédéric, If the query string is different between the two requests, it is not likely to be a page caching problem. The query string is part of the URL, so things that cache pages by URL will see the two requests as two different URLs. Try using the request scope, rather than the session scope, for passing the object from your Action to the JSP page. This is preferable unless you need to keep the value in the session for some other reason. However, if it does need to be in the session, it doesn't seem like the action is replacing the value in the session and needs further review (perhaps you could post the code that puts/gets the value in the session). -Max - Original Message - From: Frédéric Houbie - ABSIS-GROUP [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 1:34 AM Subject: page do not refresh Hi, I have a problem in my struts application, I have a page that call an action servlet which store a value received in url in session, than forward to a jsp
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 07:19:51 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 07:23:03 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Traffic
It's going to get worse. Nevertheless, you will never be able to manage the number/technical level of users in an open forum. SERVLET-INTEREST became too congested with basic setup and config questions by people too lazy to search the archive for an answer (and how many scores of questions have been asked here regarding ActionForm in just the past 2 weeks?) so a few guys created ADVANCED-SERVLET-INTEREST and began regulating the level of users. One thing that helped, however, was being brutally blunt with obviously lame users and telling them to STFA (search the f*cking archives), STFW (...web) and RTFM. This started a couple of flame wars, and the Sun moderator finally had to banish a few people, but the quality and quantity of posts changed considerably for the better. I'm not suggesting that's an answer, but my delete key has been getting a lot of attention lately Mark -Original Message- From: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:36 PM Well, it's not dibilitating. I can hack it. I guess I'm neutral on this one. - Cody Barr, Scott [IBM GSA] [EMAIL PROTECTED] on 02/11/2002 08:01:41 PM I disagree. Most messages are relatively small, and so long as people dont send attachments there generally isn't too much of a problem. The delete key is a great filter :) Scott -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 12:28 PM I second that motion. We do not have filtering capability here at my work so I have to manually delete messages! - Cody Mark Rines [EMAIL PROTECTED] on 02/11/2002 07:19:43 PM Phew, I vote that we split up this mail list into several topics such as installation, configuration, add-ons (such as strutsTests) and extending the various ActionXXX classes. I am really having trouble keeping up with all (over 110 just today) the email. Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Returned mail: User unknown
The original message was received at Tue, 12 Feb 2002 07:32:24 0500 - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - ... while talking to mail.s1.com: RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: suggestions for multiple entries - One submit?
Aaron, I have a sample that does something similar to what I think you are asking. I did not use a single submit. I used multiple submits and sent them to the same Action class. Here is the full JSP page from the application I developed for Wrox Pro JSP 2nd edition chapter 21 on Struts. See comments added in the JSP page and the comments at the end of the page. start: shoppingcart.jsp -- %@ page language=java import=java.util.Collection, java.util.Iterator, java.util.Locale, java.util.HashMap, com.wrox.pjsp2.struts.common.CartItem, com.wrox.pjsp2.struts.common.CD, com.wrox.pjsp2.struts.common.Constants, com.wrox.pjsp2.struts.common.ShoppingCart, org.apache.struts.action.Action % %@ taglib uri=/app prefix=app % %@ taglib uri=/struts-bean prefix=bean % %@ taglib uri=/struts-html prefix=html % %@ taglib uri=/struts-logic prefix=logic % app:checkLogon/ %-- exposes the shopping cart in the pageContext with id=shoppingCart, id does not work with rtexprvalue. jsp:useBean id=shoppingCart type=com.wrox.pjsp2.struts.common.ShoppingCart scope=session/ Can use the struts tag to expose the cart --% bean:define id=shoppingCart name=shoppingCart scope=session/ html:html locale=true head titlebean:message key=shoppingcart.title //title /head body html:base/ %@ include file=header.html % p/p table cellspacing=2 cellpadding=2 border=0 tr td width=120nbsp;/td td align=center h1bean:message key=shoppingcart.title //h1 /td /tr tr td width=120nbsp;/td td align=left bean:message key=shoppingcart.instructions / /td /tr tr td width=120nbsp;/td td valign=top p/p table cellspacing=2 cellpadding=2 border=1 tr bgcolor=#B0E0E6 thbean:message key=tableheading.artist //th thbean:message key=tableheading.title //th thbean:message key=tableheading.unitPrice //th thbean:message key=tableheading.quantity //th thbean:message key=tableheading.itemTotal //th /tr % int num = 0; String SLATE = #C0C0C0; String WHITE = #FF; String bgColor = null; % !-- Here I'm iterating over the items in the shopping cart. I'm creating a form for each item with its own submit button. -- logic:iterate id=cartItem type=com.wrox.pjsp2.struts.common.CartItem name=shoppingCart property=cartItems % num++; if((num % 2) == 0) { bgColor = SLATE; } else { bgColor = WHITE; } % bean:define id=cd name=cartItem property=cd type=com.wrox.pjsp2.struts.common.CD/ tr bgcolor=%= bgColor % tdjsp:getProperty name=cd property=artist//td tdjsp:getProperty name=cd property=titleName//td tdjsp:getProperty name=cd property=price//td td valign=middle !-- each form has the same action. The action class knows what row it is by using the TITLE_ID as a hidden property. -- html:form action=/checkout.do html:hidden property=action value=update / bean:define id=titleId name=cd property=titleId/ html:hidden property=%= Constants.TITLE_ID % value=%= String.valueOf(titleId) % / table cellspacing=2 cellpadding=2 border=0 tr td bean:define id=quantity name=cartItem property=quantity/ html:text property=quantity value=%= String.valueOf(quantity) % size=5 maxlength=5/ /td td html:submit bean:message key=button.update/ /html:submit /td /tr /table /html:form /td tdjsp:getProperty name=cartItem property=total//td /tr /logic:iterate tr bgcolor=#B0E0E6 td colspan=4 align=rightbean:message key=tableheading.total //td tdb jsp:getProperty name=shoppingCart property=total/ /b /td /tr /table /td /tr tr tdnbsp;/td td align=center html:form action=/order.do html:hidden property=action value=createOrder / html:submit bean:message key=button.createOrder/ /html:submit /html:form /td /tr /table % boolean omitCheckoutLink = true; % %@ include file=footer.jsp% /body /html:html end: shoppingcart.jsp -- I provided the ability for the user to change the quantity of the shopping cart item. I would assume that you would want the ability to change the salary. You could accomplish this in much the same
Re: Loading pdf files using jsp
Try it and find out ;-) [EMAIL PROTECTED] wrote: Hello, I want to load a PDF file from JSP. Is it possible. Regards Arun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- === For information on spiritual classes, and mind/body therapy work I do, please visit: http://www.myspiritworks.com For information on Hawaiian massage: http://www.myhawaiianmassage.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: internationalization
You are on the right track. 1. Ensure that MySQL supports using a unicode character set. You may need to define this at install time, that is how oracle works. 2. When request parameters come in, they are assumed to be ISO-8859 (or whatever your platform default is) and encoded from there to unicode. You need to tell the web container that the input stream coming in from clients is actually in UTF-8, not ISO-8859. If you are using a 2.3 servlet container this trick is much easier. There is a struts parameter to the controller servlet will have some impact here, try setting the content parameter to be text/html;charset=UTF-8. If you are not using a 2.3 servlet container (e.g., old tomcat) your work will be somewhat more involved. Also try reading http://tagunov.newmail.ru/i18n/i18n.html good luck. --Michael Christopher Cheng wrote: I am struggling with double byte characters with the JSP On the struts jsp form, I am putting %@ page contentType=text/html; charset=UTF-8 % on the top META http-equiv=Content-Type content=text/html; charset=UTF-8 in the head I got some question marks when I print the characters in the console by System.out.println(request.getParameter(parameter1) Or save those character to file The same thing happens with the data retrieved from MySQL displayed on JSP. Anybody helps? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Screen Flow based on UserAgent in Struts
Hi, I like the below setup. I have always had the problem of modifying my apps to work with different devices. Half the time my apps are working with hand held devices, the other half with desktop browsers. Alex -Original Message- From: David M. Karr [mailto:[EMAIL PROTECTED]] Sent: February 11, 2002 1:50 PM To: [EMAIL PROTECTED] Subject: Re: Screen Flow based on UserAgent in Struts Sam == Sam Cheung [EMAIL PROTECTED] writes: Sam Hi, Sam Is there a way to config Struts to forward a different Sam jsp based on the User Agent of the HTTP Request? I Sam would like to use the User Agent to identify the Sam client type (e.g. where desktop or a mobile phone) and Sam send out either HTML content or WML content. Sam I come up this idea, I am wondering if there are Sam better solutions: Sam Have a different forward name, different path for each Sam device type: Sam For example, in struts-config.xml Sam actionpath=/logoff Sam type=org.apache.struts.webapp.example.LogoffAction Sam forward name=successHTML Sam path=/indexHTML.jsp/ Sam forward name=successWML Sam path=/indexWML.jsp/ Sam /action Sam And in the perform method of my action code, I have Sam something like: Sam if user agent is desktop Samreturn (mapping.findForward(successHTML)); Sam else Sam return ((mapping.findForward(successWML)); I wonder whether it would be useful to have something like this (feel free to imagine better naming API conventions): action path=... name=... type=... forward-group name=success choice match=.*mozilla.* path=/thing.html / choice match=.*kbrowser.* path=/thing.wml / /forward-group /action Then, the mapping.findForward() method would be overloaded with one that takes a match string. The match attribute in the choice element is a regular expression, which matches against the parameter. In this case, the parameter value you would provide would be the User-Agent header. This would allow view selection to be abstracted out of the Action class. Any view could be updated to get an alternate rendering, without changing the Action code. The caveat being that you'd have to agree on what always provides the match expression in each Action. The User-Agent is a good choice, but other applications might use something else. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with html:link forward...
Thanks David, here is my form bean definition: form-beans type=org.apache.struts.action.ActionFormBean form-bean name=userMaintForm type =application.presentation.struts.formbeans.UserMaintForm / /form-beans This is for the page that I am linking to from the menu page. Eventually I will be pre-populating some fields on this form from a data source to allow user selection. At the moment it is defaulting a text field to a string set in the Action class. I'm not sure (obviously!) but the problem seems to be around forwarding to the linked page (the html statement is built ok and written to the output stream)... some config problem maybe??? James. This message and any attachments are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged. If you are not the addressee you may not copy, forward, disclose or use any part of the message or its attachments and if you have received this message in error, please notify the sender immediately by return e-mail and delete it from your system. Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, arrive late or contain viruses. The sender therefore does not accept liability for any errors or omissions in the context of this message which arise as a result of Internet transmission. Any opinions contained in this message are those of the author and are not given or endorsed by the HSBC Group company or office through which this message is sent unless otherwise clearly indicated in this message and the authority of the author to so bind the HSBC entity referred to is duly verified. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with html:link forward...
Thanks Cody, but I had the same problem with using Page and Forward! As far as naming the global forward and action the same in the config file, the Struts Example app does this and I can get this to work fine so I don't think it is this that is the problem. James. This message and any attachments are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged. If you are not the addressee you may not copy, forward, disclose or use any part of the message or its attachments and if you have received this message in error, please notify the sender immediately by return e-mail and delete it from your system. Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, arrive late or contain viruses. The sender therefore does not accept liability for any errors or omissions in the context of this message which arise as a result of Internet transmission. Any opinions contained in this message are those of the author and are not given or endorsed by the HSBC Group company or office through which this message is sent unless otherwise clearly indicated in this message and the authority of the author to so bind the HSBC entity referred to is duly verified. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with html:link forward...
Thanks Keith, here's some more info... The full error msg is: Error 500 An error has occured while processing request:http://localhost:8080/myapp/ Message: Server caught unhandled exception from servlet [file]: Server caught unhandled exception from servlet [jsp]: null Target Servlet: file StackTrace: Root Error-1: null java.lang.NullPointerException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.NullPointerException() void _navmenu_xjsp_jspsrc_1718594725. _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void _navmenu_xjsp_jspsrc_1718594725. _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, 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.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet. _service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.servlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.servlet.engine.webapp.WebAppRequest, javax.servlet.http.HttpServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.SimpleFileServlet.doGet(javax.servlet.http.HttpServletRequest, 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 com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet. _service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.servlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void
Editing a database record best practice?
A common scenario I run into is having a web application where the user needs to edit a database record. The simplest approach I can find is this - 1.) Load the db record into a bean. Copy the bean props. to the form for display. Put the dbbean in the session. 2.) Show the form, when the user presses save, validate the form, make sure, if possible, that the form primary key fields are equal to the dbbean in the session primary fields. 3.) Have the dbbean do an update statement. In order to do this properly, the dbbean needs to have kept the original db values so they can be put in a where clause. This insures that we are changing the record exactly as we loaded it. If somone made a change before the page was submitted, the update would fail. Is that the best approach to accomodate a sort of optomistic locking? Are there any tools to autogenerate the dbbean objects? I was thinking of trying to do it with an xml schema and XSLT to transform the schema to java objects. Thoughts? Thanks, Ryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionForms and custom tags
Is it possible to use ActionForms without the tags? E.g. I want to have a jsp page that does not use struts form tags and submits to an Action. If I specify the ActionForm for the Action's mapping, will the form get automatically populated like it does when I have a jsp with custom tags that correspond to the form's fields? Thanks in advance for any advice, Mike =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **= *** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. ***
Forms and Collections
Hi, I have an ActionForm with the usual ints and Strings, and a Collection containing my own beans. After a lot of fiddling (and the latest nightly), I've now managed to display the contents of the Collection in my form as textfields, using: nested:iterate property=collectionname nested:write property=bean-title/nested:text property=bean-value/ /nested:iterate After submitting the form, I can easily get the single-value fields from the form ... but the collection is now empty. How do I go about making the form update the collection after a submit (without parsing the request-object myself) ? Kenneth Aa. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ActionForms and custom tags
Struts tags don't do anything that you can't do manually with HTML and JSP 'stuff', it justs gives you a framework to work in that eliminates some of the drudgery of typing (and correcting) the 'stuff'. If you can do with a tag you can do it without a tag! (It just might take longer.) bob - Original Message - From: Mike Dewhirst [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 8:25 AM Subject: ActionForms and custom tags Is it possible to use ActionForms without the tags? E.g. I want to have a jsp page that does not use struts form tags and submits to an Action. If I specify the ActionForm for the Action's mapping, will the form get automatically populated like it does when I have a jsp with custom tags that correspond to the form's fields? Thanks in advance for any advice, Mike =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **= *** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Extra Path Info Problem!!! HELP!!!
Hi Guyz, I'm having a really strange problem wiht struts ... I looked around in the mailing list found a lot of people had similar problems .. but I couldn't find any solution for it. The problem relates to use of extra path info. I have a URL which looks something like this http://myserver.com/servletname/extrapathinfo/actionname I've defined the url mapping in the web.xml as /servletname/*. I was hoping that struts will try pick up only the last component of the URL as the action name I would be able to use the extra path info in my servlet. But it doesn't work that way, instead struts tries to look for an action with the name /extrapathinfo/actionname ... I would really appreciate any idea/leads in solving this problem ... been stuck-up with this for sometime now .. :-( Thanx in advance, VD. __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Loading pdf files using jsp
Maybe you meant that you wanted to WRITE a PDF file from JSP? Loading a PDF file from a JSP is no different than loading any other web page from JSP. If the client browser has the Adobe Acrobat plugin installed, any hyperlink to PDF files will spawn the PDF file in the requesting browser. You may need to ensure that your server is configured to accepct the PDF mime-type, but other than that, it's a simple deal. To write PDF's dynamically, there is a Java library that you can obtain that is free. You'll have to dig for it though, cause I simply cannot remember the name or where to get it. There are also numerous commercial libraries that assist with writing dynamic PDF's on the server. - Cody [EMAIL PROTECTED] on 02/12/2002 04:27:32 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Loading pdf files using jsp Hello, I want to load a PDF file from JSP. Is it possible. Regards Arun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help: %.. how do i convince them to learn JSP?
I have no problem being convinced that tags should be used for generating complex items on a web page. The one concern I do have, relative to using tags, is the extra processing required to generate simple things. I have seen pages in industrial environments where the page may have 50-100 elements displayed (and no this is not a problem with the design this is a real application requirement!). Using a tag to generate labels and text input boxes seems like it would add a significant compute load on a server that is servicing 100's of people. The same situation applies when you are dealing with pages with fewer elements, but are being served up to 1000's or 10,000's of users. Does anyone have experience about computing resources required by tags in these types of scenarios? bob - Original Message - From: Sarah Farrell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:48 PM Subject: Re: help: %.. how do i convince them to learn JSP? Michael, Here's the best one I could find. http://java.sun.com/blueprints/guidelines/designing_enterprise_applications/ web_tier/qanda/index.html There are some other ones on java.sun.com if you search for JSP presentation logic separate. Here's another one: http://java.sun.com/products/jsp/ P.S. Please don't cross-post to multiple jakarta lists. At 07:34 PM 2/11/2002 -0800, you wrote: long before server pages or servlets existed i was writing these C++ template based systems with CGI so i could do my best to separate content generation from programming logic... i'm a consultant and this company made me lead on my first JSP/Servlet based project, i was really excited to get involved with JSP tag libraries. but when i got into the code base IT'S ALL .jsp files with TONS of Java scriptlets! it's nasty. if/else blocks several hundred lines long. the developer i took this over from thinks there is no reason to do it any other way. tags? why use tags? i am asking for input/references on why you want to keep the scriptlets % /% out of the JSP files. every time i try to make a point-- maybe i'm just not being eloquent enough... on another note: is it really model 2 if a JSP is processing the request? i don't think it is, even if your entire JSP is just some java code wrapped with a scriptlet tag.. (yuk). thanks for input. --Michael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:select
Thanks for the reply. But I don't follow. I am trying to get a select tag that looks like: select name=destination option value=SENT SELECTEDSent/option option value=RECEIVEDReceived/option /select How do I set the SELECTED attribute of the first option? Dean -Original Message- From: Maturo, Larry [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 2:50 PM To: '[EMAIL PROTECTED]' Subject: RE: html:select Hi Dean, You wrote: Hello, How do I set the default value for html:select tag when I am populating the list from a collection? Example: html:select property=destination html:options collection=destinations property=value labelProperty=label/ /html:select Strut's tags are two-way, so whatever value is in destination will be used, i.e. destination is also source. :-) I hope this helps. Larry Maturo, Software Consultant, Athens Group, Inc. Athens Group is an employee-owned technology strategy and custom software development consulting company web: http://www.athensgroup.com email: [EMAIL PROTECTED] 5608 Parkcrest Drive Suite 200 Austin, Texas 78731-4916 voice: 512.345.0600 ext. 129 fax: 512.345.4088 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Redirect to a jsp page
I found info about the token by browsing the source code. This is very inefficient. I find there is a lot of neat stuff buried in the application, but haven't found any place where it is documented. Am I missing something? bob - Original Message - From: Keith Bacon [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, February 08, 2002 6:04 AM Subject: RE: Redirect to a jsp page Struts gives you an excellent implementation of the standard solution to this problem. Search archives for token. http://www.mail-archive.com/struts-user%40jakarta.apache.org/ http://www.mail-archive.com/struts-user@jakarta.apache.org/msg22452.html is a good explanation I found after a quick look - there may be better. Keith. --- Galbreath, Mark [EMAIL PROTECTED] wrote: You cannot keep a user from pressing the back button on the browser (without breaking the user's fingers), but you can prevent a resubmit by testing a session attribute flag you set at the first submit. Mark -Original Message- From: Joanna Chan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 4:37 PM To: [EMAIL PROTECTED] Subject: Redirect to a jsp page Hello How do I redirect to a jsp page in struts without allowing the user to press the back key in browser. I want to maintain transactional control so that the user cannot press back key to re-enter somethinig that is already submitted. Thanks Joanna -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
I'missing something...
Browsing the online Strut's documentation I can see the attribute indexed between the attributes of the text Tag of the HTML Tag library. I downloaded Struts1.0.2 but the documentation seems to be not the same as the online one and I can't also use this attribute in my jsp pages. Am I missing something? Thanks in advance. Emiliano. -- Emiliano Albiani Corso Garibaldi, 19 55100 Lucca P.I. 01721430468 Tel. +393297028910 __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: commons - BeanUtils ; mapping and setFoo getFoo how to ?
In all truth I don't know. I got far enough to find out where the issue happes. I got it to work via a hack to the PropertyUtils class. I'd honestly try to use collection manipulation to get it into a List or something, unless you want my hack. No garauntees however. :) There's a whole class there meant to handle mapped properties, but my hack doesn't use it. So I have to get some time to go back and find out how it's used etc. I tried to bring it up in the respective developer lists, but no answers. I was hoping that someone closer to the creation of it could do it, but no luck (dammit :). So we have to hack it ourselves. Arron. Arik Levin ( Tikal ) wrote: Now u are telling me I have tried it until my blood is out of my kishke... So tell me, I'm using InvocationHandler to invoke my methods, is there a way at the night build of struts or other interesting way I should know? Thanx man! -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:20 AM To: Struts Users Mailing List Subject: Re: commons - BeanUtils ; mapping and setFoo getFoo how to ? I don't think that the mapped properties are working. I went to add the ability to the nested:iterate tag the other day and tested the bean utils directly before I did so and it doesn't work. I found the problem though, but haven't had time to fix it properly and put in a patch. Arron. Arik Levin ( Tikal ) wrote: Does anybody here have a tutorial or a sample for the commons BeanUtils ? I'm trying to map setter and getter method and invoke them. Using http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanuti l s/MappedPropertyDescriptor.html MappedPropertyDescriptor . I don't know how to work this thing. Thanx. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
URGENT: Null Strings in Websphere
Whenever we have a String value in our forms, and the value is not set (), it is getting sent back to the jsp as null. By null I mean the actual string, and not an empty object. This is making validation of these fields fail. Has anyone seen this and found a work around. Thanks, Dave Dandeneau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Forms and Collections
Could it be that the reset method in the form is killing the collection?... If it's displaying properly, then by all rights it should be updating properly back on the server. Arron. Kenneth Aastrøm wrote: Hi, I have an ActionForm with the usual ints and Strings, and a Collection containing my own beans. After a lot of fiddling (and the latest nightly), I've now managed to display the contents of the Collection in my form as textfields, using: nested:iterate property=collectionname nested:write property=bean-title/nested:text property=bean-value/ /nested:iterate After submitting the form, I can easily get the single-value fields from the form ... but the collection is now empty. How do I go about making the form update the collection after a submit (without parsing the request-object myself) ? Kenneth Aa. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help: %.. how do i convince them to learn JSP?
Just finished rolling a 100 input elements on a page app. Performance is not an issue. Once the JSP is compiled to its class, it just hums along very happily. Arron. Bob Williams wrote: I have no problem being convinced that tags should be used for generating complex items on a web page. The one concern I do have, relative to using tags, is the extra processing required to generate simple things. I have seen pages in industrial environments where the page may have 50-100 elements displayed (and no this is not a problem with the design this is a real application requirement!). Using a tag to generate labels and text input boxes seems like it would add a significant compute load on a server that is servicing 100's of people. The same situation applies when you are dealing with pages with fewer elements, but are being served up to 1000's or 10,000's of users. Does anyone have experience about computing resources required by tags in these types of scenarios? bob - Original Message - From: Sarah Farrell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:48 PM Subject: Re: help: %.. how do i convince them to learn JSP? Michael, Here's the best one I could find. http://java.sun.com/blueprints/guidelines/designing_enterprise_applications/ web_tier/qanda/index.html There are some other ones on java.sun.com if you search for JSP presentation logic separate. Here's another one: http://java.sun.com/products/jsp/ P.S. Please don't cross-post to multiple jakarta lists. At 07:34 PM 2/11/2002 -0800, you wrote: long before server pages or servlets existed i was writing these C++ template based systems with CGI so i could do my best to separate content generation from programming logic... i'm a consultant and this company made me lead on my first JSP/Servlet based project, i was really excited to get involved with JSP tag libraries. but when i got into the code base IT'S ALL .jsp files with TONS of Java scriptlets! it's nasty. if/else blocks several hundred lines long. the developer i took this over from thinks there is no reason to do it any other way. tags? why use tags? i am asking for input/references on why you want to keep the scriptlets % /% out of the JSP files. every time i try to make a point-- maybe i'm just not being eloquent enough... on another note: is it really model 2 if a JSP is processing the request? i don't think it is, even if your entire JSP is just some java code wrapped with a scriptlet tag.. (yuk). thanks for input. --Michael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: I'missing something...
Faux pas of the online docco I'm afraid. You can only get it with a nightly build, and then you have other options to help you with collections. Arron. Emiliano Albiani wrote: Browsing the online Strut's documentation I can see the attribute indexed between the attributes of the text Tag of the HTML Tag library. I downloaded Struts1.0.2 but the documentation seems to be not the same as the online one and I can't also use this attribute in my jsp pages. Am I missing something? Thanks in advance. Emiliano. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help: %.. how do i convince them to learn JSP?
I think it depends on, what you're trying to achieve: If i remember it corrctly, the tags inside the jsp get inlined when the jsp is compiled: So the performance problem boils down to a problem of objectcreation and -deletion, which nowadays is handled quite good by most modern jvm. If you want to fetch labels from property-files, then the properties are cached in a per-jvm manner. If you really run into performance issues, i don't think they come from using taglibs but from the requirement to mix-in the labels dynamically (maybe to perform internationaliation or - even worse - based on user-rights or preferences): So maybe you should try to think of some sort of pre-processing (generating templates with the right labels in it and then using a simple template-engine or maybe even simple bean-tags(%=..%) to populate the pages. And maybe you should have someeone think about the requirement for exposing ten thousands of users to 50 -100 elements on just one page - has to be a very special audience...;) - Original Message - From: Bob Williams [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 4:05 PM Subject: Re: help: %.. how do i convince them to learn JSP? I have no problem being convinced that tags should be used for generating complex items on a web page. The one concern I do have, relative to using tags, is the extra processing required to generate simple things. I have seen pages in industrial environments where the page may have 50-100 elements displayed (and no this is not a problem with the design this is a real application requirement!). Using a tag to generate labels and text input boxes seems like it would add a significant compute load on a server that is servicing 100's of people. The same situation applies when you are dealing with pages with fewer elements, but are being served up to 1000's or 10,000's of users. Does anyone have experience about computing resources required by tags in these types of scenarios? bob - Original Message - From: Sarah Farrell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:48 PM Subject: Re: help: %.. how do i convince them to learn JSP? Michael, Here's the best one I could find. http://java.sun.com/blueprints/guidelines/designing_enterprise_applications/ web_tier/qanda/index.html There are some other ones on java.sun.com if you search for JSP presentation logic separate. Here's another one: http://java.sun.com/products/jsp/ P.S. Please don't cross-post to multiple jakarta lists. At 07:34 PM 2/11/2002 -0800, you wrote: long before server pages or servlets existed i was writing these C++ template based systems with CGI so i could do my best to separate content generation from programming logic... i'm a consultant and this company made me lead on my first JSP/Servlet based project, i was really excited to get involved with JSP tag libraries. but when i got into the code base IT'S ALL .jsp files with TONS of Java scriptlets! it's nasty. if/else blocks several hundred lines long. the developer i took this over from thinks there is no reason to do it any other way. tags? why use tags? i am asking for input/references on why you want to keep the scriptlets % /% out of the JSP files. every time i try to make a point-- maybe i'm just not being eloquent enough... on another note: is it really model 2 if a JSP is processing the request? i don't think it is, even if your entire JSP is just some java code wrapped with a scriptlet tag.. (yuk). thanks for input. --Michael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
if tag
Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
CLASSPATH, env, lib, jars and all that
Hi All, I'm setting up struts to use at home and at work on projects which I take back forth, and I want to rationalise the way I set up my progs, java environment, tomcat and all. One thing complicating it all, which I'm afraid will trip me up when I start using newer versions in the future, is all the jar files, often multiple copies of which are held by the different java installations, e.g. xalan.jar or its classes is in tomcat, j2ee, ant. Or jdbc2.0-stdext.jar. Even just now when installing Wintec Inc. Struts Validator, it comes with all its own copies. Most of this stuff is in J2EE, but somehow I doubt anyone would advise me to put that in my CLASSPATH, would they? So how does Joe Struts organise his/her environment? Do you set up a profile which allows you to run ant tomcat and rigorously delete unnecessary jars? Or do you just tweak every build.xml you have? Or do you chuck everything in tomcat-4.0.1/common/lib? Thanks for the insight :-) Adam Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Editing a database record best practice?
we are using a similar approach with ejb's, that produce value object's instead of database records: We have generic ValueObjects that are filled into the formBean using reflection (You can do something similar with result-sets using the meta-data: as long as you don't mind tying your bean-properties to the database-field names...): along with the data, a timestamp is transported inside the value-object: So only the ValueObject with the last timestamp can make an update on the ejb (with only some exceptions (CLOb/BLOB-fields which get specific update methods) we make global updates, we just set *all* values from the value-object into the ejb. Coming back from the form the process works the other way round: copying the values from the ActionForm into the valueObject and then passing it to the ejb for update... This sounds like a lot of copying: We first had the ejb's producing ValueObjects that extended action-forms with all the fields needed in the form: we ended up with having to package the struts-libs with every EJB caused by this mixing of business-object and view-layer (resulting in a lot of classloading-hassle: Fortunately you sometimes get real errors for bad design-decisions..) - so we ended up with this generic ValueObjectLayer that clearly separates the view from the Business-objects. Instead of using ejb you can try jdo (e.g castor, or intelliBO) - I'm not really sure, wether the need for such a neutralizing layer vanishes with this, but I think they will give you at least some handy tools to write the Data-Access-layer without having to write the sql by yourself. greetings stf - Original Message - From: Ryan Cornia [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:56 AM Subject: Editing a database record best practice? A common scenario I run into is having a web application where the user needs to edit a database record. The simplest approach I can find is this - 1.) Load the db record into a bean. Copy the bean props. to the form for display. Put the dbbean in the session. 2.) Show the form, when the user presses save, validate the form, make sure, if possible, that the form primary key fields are equal to the dbbean in the session primary fields. 3.) Have the dbbean do an update statement. In order to do this properly, the dbbean needs to have kept the original db values so they can be put in a where clause. This insures that we are changing the record exactly as we loaded it. If somone made a change before the page was submitted, the update would fail. Is that the best approach to accomodate a sort of optomistic locking? Are there any tools to autogenerate the dbbean objects? I was thinking of trying to do it with an xml schema and XSLT to transform the schema to java objects. Thoughts? Thanks, Ryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: if tag
If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: if tag
Ya think? Well, if that's true, forget it. I'll just use scriptlets, although I feel like we're mixing too much java that way. John -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:38 AM To: Struts Users Mailing List Subject: Re: if tag If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: CLASSPATH, env, lib, jars and all that
Subject: Re: CLASSPATH, env, lib, jars and all that From: Vic Cekvenich [EMAIL PROTECTED] === One thing I do is: 1. Share WebApps folder and map it as say S: drive. 2. Then I put all my JARs in WEB-INF\lib, and put all of them in classpath. Then, were ever I go, I just map the S: drive and ready to go. I can ever get to debug other people S drives. Vic Adam Hardy wrote: Hi All, I'm setting up struts to use at home and at work on projects which I take back forth, and I want to rationalise the way I set up my progs, java environment, tomcat and all. One thing complicating it all, which I'm afraid will trip me up when I start using newer versions in the future, is all the jar files, often multiple copies of which are held by the different java installations, e.g. xalan.jar or its classes is in tomcat, j2ee, ant. Or jdbc2.0-stdext.jar. Even just now when installing Wintec Inc. Struts Validator, it comes with all its own copies. Most of this stuff is in J2EE, but somehow I doubt anyone would advise me to put that in my CLASSPATH, would they? So how does Joe Struts organise his/her environment? Do you set up a profile which allows you to run ant tomcat and rigorously delete unnecessary jars? Or do you just tweak every build.xml you have? Or do you chuck everything in tomcat-4.0.1/common/lib? Thanks for the insight :-) Adam Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Editing a database record best practice?
Hi, I've been thinking about this and have just arrived at the point you left behind! OK, the issue is that there is a data layer that holds EVERYTHING. And its all normalised inside databases and is pretty hard to utilise within your business code. So we create a business layer which loads up rows and parts of rows to perform the logical updates and operations required. We use EJB, CMP, OR, JDO whatever. We then have a presentation layer that is user oriented, mixing language varient information, multi-table information, business calculation information, security and so on. Each page/screen only holds the information needed and it holds it in a user friendly form (say Strings for ease, as in Struts). User-MiddleTier/business-database Network bandwidth and the marshalling times are an issue (maybe). Lets say we are using EJB, local interfaces from mid tier to DB, so its as quick as currently possible (ahem). Now the presentation data is held in strut form objects. I recon it is these that should be used as the data transport from mid to gui and back. It means we are only shipping the data we need. But we are putting presentation logic within the mid tier - ie objects that are purely there to populate data for a specific screen. I know this is fast and scalable. BUT, I also know that I have to stick struts.jar into the EJB container (usually they have an obvious common libs place - eg for jdbc drivers). Do we do this? A sacrifice of time against elegance. Hmmm. I guess the really OTT answer is: User/GUI = Form Object, all strings Mid Tier = Value object holding equivalent fields for each form field, but in native data type, but no struts code. DB = EJB, local interfaces. Just answered myself, anyone else got a point of view? Jonathan ps With respect to the original thread, I don't hold any state info in the session because of scaleability, timeout, and state transition issues (back button, multiple browser windows etc). It does mean an update is read for display, and then read for validate/insert. But I recon the DB is there to be used. I do hold user info in the session, but not activity state. Message History From: stf [EMAIL PROTECTED] on 12/02/2002 17:31 CET Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: Editing a database record best practice? we are using a similar approach with ejb's, that produce value object's instead of database records: We have generic ValueObjects that are filled into the formBean using reflection (You can do something similar with result-sets using the meta-data: as long as you don't mind tying your bean-properties to the database-field names...): along with the data, a timestamp is transported inside the value-object: So only the ValueObject with the last timestamp can make an update on the ejb (with only some exceptions (CLOb/BLOB-fields which get specific update methods) we make global updates, we just set *all* values from the value-object into the ejb. Coming back from the form the process works the other way round: copying the values from the ActionForm into the valueObject and then passing it to the ejb for update... This sounds like a lot of copying: We first had the ejb's producing ValueObjects that extended action-forms with all the fields needed in the form: we ended up with having to package the struts-libs with every EJB caused by this mixing of business-object and view-layer (resulting in a lot of classloading-hassle: Fortunately you sometimes get real errors for bad design-decisions..) - so we ended up with this generic ValueObjectLayer that clearly separates the view from the Business-objects. Instead of using ejb you can try jdo (e.g castor, or intelliBO) - I'm not really sure, wether the need for such a neutralizing layer vanishes with this, but I think they will give you at least some handy tools to write the Data-Access-layer without having to write the sql by yourself. greetings stf - Original Message - From: Ryan Cornia [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:56 AM Subject: Editing a database record best practice? A common scenario I run into is having a web application where the user needs to edit a database record. The simplest approach I can find is this - 1.) Load the db record into a bean. Copy the bean props. to the form for display. Put the dbbean in the session. 2.) Show the form, when the user presses save, validate the form, make sure, if possible, that the form primary key fields are equal to the dbbean in the session primary fields. 3.) Have the dbbean do an update statement. In order to do this properly, the dbbean needs to have kept the original db values so they can be put in a where clause. This insures that we are changing the record exactly as we
RE: if tag
How can logic:if name=blah value=xxx logic:else /logic:else /logic:if (or whatever) be better. It's just different, but not better, and scriptlets are evil when they go mad and get out of hand, they are not evil of themselves. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 11:52 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: RE: if tag Ya think? Well, if that's true, forget it. I'll just use scriptlets, although I feel like we're mixing too much java that way. John -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:38 AM To: Struts Users Mailing List Subject: Re: if tag If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Loading pdf files using jsp
Adobe used to have a Java library but there were so many issues with it (and Adobe did not support it) that they removed it from their downloads. http://support.adobe.com/devsup/devsup.nsf/docs/51759.htm I would suggest a Google search, however, because I know many people have asked this question (including me) over the years and someone is bound to have written one by now. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:04 AM To: Struts Users Mailing List Subject: Re: Loading pdf files using jsp Maybe you meant that you wanted to WRITE a PDF file from JSP? Loading a PDF file from a JSP is no different than loading any other web page from JSP. If the client browser has the Adobe Acrobat plugin installed, any hyperlink to PDF files will spawn the PDF file in the requesting browser. You may need to ensure that your server is configured to accepct the PDF mime-type, but other than that, it's a simple deal. To write PDF's dynamically, there is a Java library that you can obtain that is free. You'll have to dig for it though, cause I simply cannot remember the name or where to get it. There are also numerous commercial libraries that assist with writing dynamic PDF's on the server. - Cody [EMAIL PROTECTED] on 02/12/2002 04:27:32 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Loading pdf files using jsp Hello, I want to load a PDF file from JSP. Is it possible. Regards Arun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: URGENT: Null Strings in Websphere
I had the same problem about a month ago (and a colleague had this problem just yesterday) and someone posted a solution either here or on servlet-interest. Search the archives on both groups. Mark -Original Message- From: Dave J Dandeneau [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:39 AM To: Struts Users Mailing List Subject: URGENT: Null Strings in Websphere Whenever we have a String value in our forms, and the value is not set (), it is getting sent back to the jsp as null. By null I mean the actual string, and not an empty object. This is making validation of these fields fail. Has anyone seen this and found a work around. Thanks, Dave Dandeneau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: if tag
I totally agree with you. The only issue/desire that I have is that because scriplets can get easily out of hand by developers with little patience or time to learn tags, I would love it if we could enforce the JSP compiler to only compile XML compliant JSP's thereby forcing the developer to not code with scriplets. Of-course the downside is that if we do this we will have to use tags for everything including simple if's on the other hand though, we will guarantee that the JSP's will not have 100's of lines of un-readable scriplets which outweighs the negatives by an exponential factor. Therefore if my dream should ever come true we will need the if tag. -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:06 PM To: Struts Users Mailing List Subject: RE: if tag How can logic:if name=blah value=xxx logic:else /logic:else /logic:if (or whatever) be better. It's just different, but not better, and scriptlets are evil when they go mad and get out of hand, they are not evil of themselves. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 11:52 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: RE: if tag Ya think? Well, if that's true, forget it. I'll just use scriptlets, although I feel like we're mixing too much java that way. John -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:38 AM To: Struts Users Mailing List Subject: Re: if tag If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at [EMAIL PROTECTED] www.sothebys.com ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts gotchas
I've run into several Struts gotchas while I'm learning/using it for the first time. I was wondering if anyone knows of a web reference(s) that covers some of these? I've since solved the problems, but if there was some documentation on some of the most common ones, I might be able to avoid some in the future. For example, changing the scope of an action in the struts-config.xml from request to session has solved a problem or two. :) Another example is when I had JSPs located down a directory hierarchy, I had to change the struts-config.xml action path to reflect that hierarchy. I thought I could just keep it as the *.do name (without the .do). Most examples always have the JSPs at root level. These are newbee issues, but they did take some time to figure out. Ted, your site, husted.com has Struts docs on it right? What about posting a sort of gotcha FAQ? I can help you put something together if you want and I'm sure some people here can contribute on some of the things they've gotten stuck on and then solved. ?? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: CLASSPATH, env, lib, jars and all that
This is a great question. I've been thinking about the same issues. I've been working on several projects here and I've migrated from Tomcat to IIS/ServletExec to Orion. At one point, I put most of my jar files in WEB-INF/lib which were found by IIS but not by Orion. Then I started working with another developer on one of the projects and we needed to share the same environment. So we put the jar files out on a network directory. He uses Ant to build, I use a bat script which sets the CLASSPATH at the beginning. Currently we're using Sun's servlet.jar. Any better suggestions would be appreciated! From: Adam Hardy [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: CLASSPATH, env, lib, jars and all that Date: 12 Feb 2002 08:14:36 -0800 Hi All, I'm setting up struts to use at home and at work on projects which I take back forth, and I want to rationalise the way I set up my progs, java environment, tomcat and all. One thing complicating it all, which I'm afraid will trip me up when I start using newer versions in the future, is all the jar files, often multiple copies of which are held by the different java installations, e.g. xalan.jar or its classes is in tomcat, j2ee, ant. Or jdbc2.0-stdext.jar. Even just now when installing Wintec Inc. Struts Validator, it comes with all its own copies. Most of this stuff is in J2EE, but somehow I doubt anyone would advise me to put that in my CLASSPATH, would they? So how does Joe Struts organise his/her environment? Do you set up a profile which allows you to run ant tomcat and rigorously delete unnecessary jars? Or do you just tweak every build.xml you have? Or do you chuck everything in tomcat-4.0.1/common/lib? Thanks for the insight :-) Adam Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: URGENT: Null Strings in Websphere
I might be wrong, but it seems to me that this standard Java behavior When your String is null and you try to print it, it displays the String value null. A workaround might be to force all empty Strings to be instead of null... - Original Message - From: Dave J Dandeneau [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 4:38 PM Subject: URGENT: Null Strings in Websphere Whenever we have a String value in our forms, and the value is not set (), it is getting sent back to the jsp as null. By null I mean the actual string, and not an empty object. This is making validation of these fields fail. Has anyone seen this and found a work around. Thanks, Dave Dandeneau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:submit and bean:message
Hi - I am trying to use a message (found by using bean:message) to set the value in an html:submit tag. What I want to do is this: html:submit value=bean:message key=constant.value1/ bean:message key=label.value1/ /html:submit Setting the label works fine, but the value attribute either complains about quoting or puts the literal bean:... string in as the value. I have tried various combinations of single, double, and escaped quotes, but I can't find the correct combination. Is this even possible? What I am trying to accomplish is to not have to specify the same constant in multiple places (in this case in the jsp page which has multiple html:submit tags and the Action routine that does the processing.) Is there any way to do this? Thanks for the help. Cheers, Bryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Recent Nightly Build ArrayIndexOutOfBoundsException
Hi, I get this error once in a while. I think it happens first time when session is being established. If you have some solution please let me know. Thanks in advance Ashish Mahajan 2002-02-12 09:54:06 - ContextManager: Error reading request, ignored - java.lang .ArrayIndexOutOfBoundsException at org.apache.tomcat.util.URLUtil.normalizeURI(URLUtil.java:270) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:750 ) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio n(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java :501) at java.lang.Thread.run(Thread.java:484) _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
WebSphere WAS file
I am trying to access the Struts-WAS.jar file but get a page not found error. Does anyone know if this websphere sources has been taken off the site for some reason? Struts-WAS.jar by Christopher Assenza - Modified Struts 1.0 JAR for Websphere 3.5 or 4. Zipped for download. (For additional tips regarding Websphere 3.5 see http://jakarta.apache.org/struts/installation-was352-x.html.) The page is: http://jakarta.apache.org/struts/userGuide/resources.html Robert Riggs Associate Director Office of Financial Aid University of Maryland 301 314-8288 301 314-9587 fax [EMAIL PROTECTED]
Re: CLASSPATH, env, lib, jars and all that
On Tue, 12 February 2002, Struts Newsgroup wrote: 1. Share WebApps folder and map it as say S: drive. 2. Then I put all my JARs in WEB-INF\lib, and put all of them in classpath. Do you mean your own app JARs or do you mean java, jakarta, etc.jars? Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANNOUNCE] stxx - struts for transforming with xml and xslt
stxx - 0.7 http://www.oroad.com/opencode/ Struts for transforming XML with XSL (stxx) is a rewrite of the struts framework to support XML and XSL . stxx sit's on top of struts, extending it's existing functionality to allow Action classes to return XML that will be transformed by an XSL file. The idea of stxx is to remove the need to be use JSP and TagLibs for the presentation layer of this framework. However, stxx does not force you to go the XML/XSL route, both technologies should work side by side. So, adding XSL support to struts is ALMOST as simple as adding the following tags to your struts-config.xml file: action path=/welcome type=com.oroad.stxx.example.ExampleWelcomeAction scope=request forward name=success !-- the transform tags take the XML returned by the Action and transform them. The transform tag used is determined by matching the user agent against the name attribute (or default if nothing matches) -- transform name=default path=/login.xsl/ transform name=Mozilla path=/login_netscape.xsl/ transform name=MSIE path=/login_msie.xsl/ /forward /action stxx features: - Enhances the forward tag in the struts-config.xml file to allow one to many transform tags. These transform tags represent the XSL file to be used depending on the user-agent of the browser accessing struts - A new class variable for the Action class, A JDOM Document, which you use to append your data in your Action class too. This Document object will be transformed by the XSL file in your transform tag. - stxx automatically flattens the ApplicationResources file to XML and attaches it to the Document object returned by the new Action class. - stxx also automatically appends the request parameters and attributes, as well as ActionErrors as XML to the Document object. Please note: stxx is a work in progress, however, at this point I've been using it for about 4 months and it works great for me, I realize it might not fit everyone elses needs. Please send me feedback, opinions, complains, etc. Also, to those other people (2 that I know of) who have downloaded the previous version of this that I had, this is an almost complete rewrite of what I had earlier. This version is not the rewritten struts code, but a seperate package that is a lot leaner, quicker and better. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: URGENT: Null Strings in Websphere
We develop using tomcat 3.2.1 and then deploy to Websphere, and we only see this behavior on websphere (Websphere 4.0). We can initialize all the values to , but I am curious why the two are acting differently. Thanks for the help, dave dandeneau -Original Message- From: Olivier Dinocourt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:43 AM To: Struts Users Mailing List Subject: Re: URGENT: Null Strings in Websphere I might be wrong, but it seems to me that this standard Java behavior When your String is null and you try to print it, it displays the String value null. A workaround might be to force all empty Strings to be instead of null... - Original Message - From: Dave J Dandeneau [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 4:38 PM Subject: URGENT: Null Strings in Websphere Whenever we have a String value in our forms, and the value is not set (), it is getting sent back to the jsp as null. By null I mean the actual string, and not an empty object. This is making validation of these fields fail. Has anyone seen this and found a work around. Thanks, Dave Dandeneau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Traffic
I really do agree that users of the mailing list should be *strongly* encouraged to search the archives (maybe just with STA, though, so they don't get too offended!). So many questions come up that have been tackled over and over again. I was off for a week last week and had almost 900 messages in my inbox to delete, which is crazy. Dave Galbreath, Mark [EMAIL PROTECTED] on 02/12/2002 07:27:17 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Traffic It's going to get worse. Nevertheless, you will never be able to manage the number/technical level of users in an open forum. SERVLET-INTEREST became too congested with basic setup and config questions by people too lazy to search the archive for an answer (and how many scores of questions have been asked here regarding ActionForm in just the past 2 weeks?) so a few guys created ADVANCED-SERVLET-INTEREST and began regulating the level of users. One thing that helped, however, was being brutally blunt with obviously lame users and telling them to STFA (search the f*cking archives), STFW (...web) and RTFM. This started a couple of flame wars, and the Sun moderator finally had to banish a few people, but the quality and quantity of posts changed considerably for the better. I'm not suggesting that's an answer, but my delete key has been getting a lot of attention lately Mark -Original Message- From: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:36 PM Well, it's not dibilitating. I can hack it. I guess I'm neutral on this one. - Cody Barr, Scott [IBM GSA] [EMAIL PROTECTED] on 02/11/2002 08:01:41 PM I disagree. Most messages are relatively small, and so long as people dont send attachments there generally isn't too much of a problem. The delete key is a great filter :) Scott -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 12:28 PM I second that motion. We do not have filtering capability here at my work so I have to manually delete messages! - Cody Mark Rines [EMAIL PROTECTED] on 02/11/2002 07:19:43 PM Phew, I vote that we split up this mail list into several topics such as installation, configuration, add-ons (such as strutsTests) and extending the various ActionXXX classes. I am really having trouble keeping up with all (over 110 just today) the email. Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Pre and Post Processing
Serious breach of MVC though! What don't you like about the select implementation? I think it's cool! Dave Sarah Farrell [EMAIL PROTECTED] on 02/11/2002 10:19:26 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Pre and Post Processing I'm relatively new to struts too. But I really don't like the HTML select implementation. So I use a custom tag to fill in select/option lists. In fact I have to use this tag throughout my application so I made it very generic. My select/option lists almost always come right from my database. So I made a tag that takes a SQL statement as an attribute, the name of the field that I want as the option value as the 2nd attribute, and the name of the field I want displayed in the list as the 3rd attribute. The tag class builds a stringbuffer with option value=[field1][field2]/option strings for each row returned from the SQL statement. Then I use the struts form/action classes to verify the result of submitting the form. At 05:35 PM 2/11/2002 +, you wrote: Hello. I'm new to struts, and I'm having a discussion with one of our designers about pre and post processing in web pages. Previously, we have used the standard JSP way of creating pages, with lots of code in the top and body of pages, in order to access functionality we have exposed in some Java beans. These Java beans wrapper XML services provided by our Forte 4GL back end. Say we have a form which accepts customer details. I can see how the Struts mechanism allows us to put the code that was previously at the top of the next JSP page into an ActionHandler, which decouples the flow of pages quite nicely, and we have a nice way of doing post processing on the contents of a page. However, if we have a page that has to display a list of addresses for a customer, and we have to run some code to get the list before we can display it, where should this code live? Should it be in the ActionHandler with the previous page's post processing, or is there a better place to put it? Or would you suggest writing a custom tag to perform the pre-processing? Thanks for any thoughts, Tim. This e-mail and its attachments are for the use of the addressee only. It may contain information that is legally privileged, confidential and exempt from disclosure. It is not a contract, and prices, data and other information are not warranted as to completeness or accuracy. Any comments or statements made herein do not necessarily reflect those of PanCredit Systems Limited. If you are not the intended recipient you must not copy, distribute or disseminate this e-mail or attachments to anyone other than the addressee. If you receive this communication in error please advise us by telephone at once. PanCredit Systems Limited Tel: +44 113 250 0260 Fax: +44 113 250 0621 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Editing a database record best practice?
On Tue, 12 February 2002, Jonathan Gibbons wrote: I guess the really OTT answer is: User/GUI = Form Object, all strings Mid Tier = Value object holding equivalent fields for each form field, but in native data type, but no struts code. DB = EJB, local interfaces. OTT as in the case of an app which you know you're going to deploy on a webfarm? In which case the DB will probably be on a seperate server, the webservers on another, possibly with EJB on board, possibly EJBs on their own server? The technical issue is whether you can realistically pass a form object from a performance point of view from one server to another. Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Traffic
Hi is there any way to get the archive url placed at the foot of the struts mailing list emails? This would probably help further Martin ** For great Emap magazine subscription gift offers visit http://www.emapmagazines.co.uk ** The information in this email is intended only for the addressee(s) named above. Access to this email by anyone else is unauthorised. If you are not the intended recipient of this message any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. Emap plc and or its subsidiaries do not warrant that any attachments are free from viruses or other defects and accept no liability for any losses resulting from infected email transmissions. Please note that any views expressed in this email may be those of the originator and do not necessarily reflect those of this organisation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: if tag
How many pages do you need an If tag / scriplet for? Why not switch the Action forward to choose the right page? Just have 2 pages with no Ifs. Perhaps I'm being too simplistic. On Tue, 12 February 2002, Knoll, Zach wrote: I totally agree with you. The only issue/desire that I have is that because scriplets can get easily out of hand by developers with little patience or time to learn tags, I would love it if we could enforce the JSP compiler to only compile XML compliant JSP's thereby forcing the developer to not code with scriplets. Of-course the downside is that if we do this we will have to use tags for everything including simple if's on the other hand though, we will guarantee that the JSP's will not have 100's of lines of un-readable scriplets which outweighs the negatives by an exponential factor. Therefore if my dream should ever come true we will need the if tag. -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:06 PM To: Struts Users Mailing List Subject: RE: if tag How can logic:if name=blah value=xxx logic:else /logic:else /logic:if (or whatever) be better. It's just different, but not better, and scriptlets are evil when they go mad and get out of hand, they are not evil of themselves. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 11:52 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: RE: if tag Ya think? Well, if that's true, forget it. I'll just use scriptlets, although I feel like we're mixing too much java that way. John -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:38 AM To: Struts Users Mailing List Subject: Re: if tag If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at [EMAIL PROTECTED] www.sothebys.com ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: URGENT: Null Strings in Websphere
wild guess - a problem in your deployment is causing something to not be found resulting in null not . Maybe diff. versions of something? Do let us know if you crack it. Keith, --- Dave J Dandeneau [EMAIL PROTECTED] wrote: We develop using tomcat 3.2.1 and then deploy to Websphere, and we only see this behavior on websphere (Websphere 4.0). We can initialize all the values to , but I am curious why the two are acting differently. Thanks for the help, dave dandeneau -Original Message- From: Olivier Dinocourt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:43 AM To: Struts Users Mailing List Subject: Re: URGENT: Null Strings in Websphere I might be wrong, but it seems to me that this standard Java behavior When your String is null and you try to print it, it displays the String value null. A workaround might be to force all empty Strings to be instead of null... - Original Message - From: Dave J Dandeneau [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 4:38 PM Subject: URGENT: Null Strings in Websphere Whenever we have a String value in our forms, and the value is not set (), it is getting sent back to the jsp as null. By null I mean the actual string, and not an empty object. This is making validation of these fields fail. Has anyone seen this and found a work around. Thanks, Dave Dandeneau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: if tag
Hey I was actually going to use it to place an nbsp; in a cell of a table if a certain bean attribute didn't exist. I've settled on using logic:equals instead, which is fine with me. 6 of one.13 of another. Is there a better way to do this that I'm missing? John John Mattos Sr. Developer and Architect iNDEMAND 345 Hudson St. 16th Floor New York, New York 10014 -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: RE: if tag How many pages do you need an If tag / scriplet for? Why not switch the Action forward to choose the right page? Just have 2 pages with no Ifs. Perhaps I'm being too simplistic. On Tue, 12 February 2002, Knoll, Zach wrote: I totally agree with you. The only issue/desire that I have is that because scriplets can get easily out of hand by developers with little patience or time to learn tags, I would love it if we could enforce the JSP compiler to only compile XML compliant JSP's thereby forcing the developer to not code with scriplets. Of-course the downside is that if we do this we will have to use tags for everything including simple if's on the other hand though, we will guarantee that the JSP's will not have 100's of lines of un-readable scriplets which outweighs the negatives by an exponential factor. Therefore if my dream should ever come true we will need the if tag. -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:06 PM To: Struts Users Mailing List Subject: RE: if tag How can logic:if name=blah value=xxx logic:else /logic:else /logic:if (or whatever) be better. It's just different, but not better, and scriptlets are evil when they go mad and get out of hand, they are not evil of themselves. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 11:52 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: RE: if tag Ya think? Well, if that's true, forget it. I'll just use scriptlets, although I feel like we're mixing too much java that way. John -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:38 AM To: Struts Users Mailing List Subject: Re: if tag If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at [EMAIL PROTECTED] www.sothebys.com ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To
RE: if tag
We just put a nbsp; after what would have printed out. It's just one extra character and guarantees us that we will get something even if the method does not return anything Doug -Original Message- From: Mattos, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: if tag Hey I was actually going to use it to place an nbsp; in a cell of a table if a certain bean attribute didn't exist. I've settled on using logic:equals instead, which is fine with me. 6 of one.13 of another. Is there a better way to do this that I'm missing? John John Mattos Sr. Developer and Architect iNDEMAND 345 Hudson St. 16th Floor New York, New York 10014 -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: RE: if tag How many pages do you need an If tag / scriplet for? Why not switch the Action forward to choose the right page? Just have 2 pages with no Ifs. Perhaps I'm being too simplistic. On Tue, 12 February 2002, Knoll, Zach wrote: I totally agree with you. The only issue/desire that I have is that because scriplets can get easily out of hand by developers with little patience or time to learn tags, I would love it if we could enforce the JSP compiler to only compile XML compliant JSP's thereby forcing the developer to not code with scriplets. Of-course the downside is that if we do this we will have to use tags for everything including simple if's on the other hand though, we will guarantee that the JSP's will not have 100's of lines of un-readable scriplets which outweighs the negatives by an exponential factor. Therefore if my dream should ever come true we will need the if tag. -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:06 PM To: Struts Users Mailing List Subject: RE: if tag How can logic:if name=blah value=xxx logic:else /logic:else /logic:if (or whatever) be better. It's just different, but not better, and scriptlets are evil when they go mad and get out of hand, they are not evil of themselves. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 11:52 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: RE: if tag Ya think? Well, if that's true, forget it. I'll just use scriptlets, although I feel like we're mixing too much java that way. John -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:38 AM To: Struts Users Mailing List Subject: Re: if tag If there are plans for an if then else tag can they please be dropped. Scriptlets are far cleaner than inventing a tag which exactly mimics java. Jonathan Message History From: Mattos, John [EMAIL PROTECTED] on 12/02/2002 10:59 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: if tag Hi all Are there any plans in the next release of Struts to have a logic:if tag? John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at [EMAIL PROTECTED] www.sothebys.com
RE: Traffic
That's a damn smart suggestion! Mark -Original Message- From: Martin Farrell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:44 PM is there any way to get the archive url placed at the foot of the struts mailing list emails? This would probably help further Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts gotchas
When I search the archives the good bits can be lost among the rest. I'm (slowly) writing a site to let people type in messages problems what the solutions are. Better than a mail archive because people can edit their old posts an admin can clean it up. Is this a feasible idea? K. --- Farrell, Sarah [EMAIL PROTECTED] wrote: I've run into several Struts gotchas while I'm learning/using it for the first time. I was wondering if anyone knows of a web reference(s) that covers some of these? I've since solved the problems, but if there was some documentation on some of the most common ones, I might be able to avoid some in the future. For example, changing the scope of an action in the struts-config.xml from request to session has solved a problem or two. :) Another example is when I had JSPs located down a directory hierarchy, I had to change the struts-config.xml action path to reflect that hierarchy. I thought I could just keep it as the *.do name (without the .do). Most examples always have the JSPs at root level. These are newbee issues, but they did take some time to figure out. Ted, your site, husted.com has Struts docs on it right? What about posting a sort of gotcha FAQ? I can help you put something together if you want and I'm sure some people here can contribute on some of the things they've gotten stuck on and then solved. ?? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: repetitive form elements
Just stick them in an arraylist, and iterate through them in your form! Cheers, Dave Farrell, Sarah [EMAIL PROTECTED] on 02/12/2002 10:56:30 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: repetitive form elements I have a form, lets say it has 3 text input elements across and I have to repeat this for a total of 10 rows. So it's something like: course nameprogram name credit hours course nameprogram name credit hours course nameprogram name credit hours course nameprogram name credit hours course nameprogram name credit hours etc. So the form elements are named like: courseName1, programName1, creditHours1 courseName2, programName2, creditHours2 etc So if I have 10 rows of these, the ActionForm has to have getters and setters for each of these? Is there a simpler way of coding this? I know that struts has an iteration tag but it seems like the wrong thing to use if you aren't doing any database querying when building the form. I'm going to have to use several web pages with similar forms in my application and it would be nice if there were a simpler way. For example, if I were writing it in Perl ducking I could append a number to the variable name in a loop and process everything that way. As far as I know, there isn't a way to simplify this in Java or Struts. Right? Thanks, Sarah -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Traffic
Maybe agree on a standard message people can put at top of replies on the struts web site? Something like This list is becoming overloaded. Web development Struts aren't simple. Please take time to study experiment before posting questions here. Please search the archive at http://www.mail-archive.com/struts-user%40jakarta.apache.org/ --- Galbreath, Mark [EMAIL PROTECTED] wrote: That's a damn smart suggestion! Mark -Original Message- From: Martin Farrell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:44 PM is there any way to get the archive url placed at the foot of the struts mailing list emails? This would probably help further Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts gotchas
what would be even better is if this whole forum can be made into a group on deja.com. This way your inbox wont get clogged and you have googles amazing search capabilities at your disposal to search the forum for previous emails on your subject. -Original Message- From: Keith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:26 PM To: Struts Users Mailing List Subject: Re: Struts gotchas When I search the archives the good bits can be lost among the rest. I'm (slowly) writing a site to let people type in messages problems what the solutions are. Better than a mail archive because people can edit their old posts an admin can clean it up. Is this a feasible idea? K. --- Farrell, Sarah [EMAIL PROTECTED] wrote: I've run into several Struts gotchas while I'm learning/using it for the first time. I was wondering if anyone knows of a web reference(s) that covers some of these? I've since solved the problems, but if there was some documentation on some of the most common ones, I might be able to avoid some in the future. For example, changing the scope of an action in the struts-config.xml from request to session has solved a problem or two. :) Another example is when I had JSPs located down a directory hierarchy, I had to change the struts-config.xml action path to reflect that hierarchy. I thought I could just keep it as the *.do name (without the .do). Most examples always have the JSPs at root level. These are newbee issues, but they did take some time to figure out. Ted, your site, husted.com has Struts docs on it right? What about posting a sort of gotcha FAQ? I can help you put something together if you want and I'm sure some people here can contribute on some of the things they've gotten stuck on and then solved. ?? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at [EMAIL PROTECTED] www.sothebys.com ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts gotchas
Keith, That sounds kinda like the jGuru Struts FAQ. Nathan Anderson -Original Message- From: Keith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:26 AM To: Struts Users Mailing List Subject: Re: Struts gotchas When I search the archives the good bits can be lost among the rest. I'm (slowly) writing a site to let people type in messages problems what the solutions are. Better than a mail archive because people can edit their old posts an admin can clean it up. Is this a feasible idea? K. --- Farrell, Sarah [EMAIL PROTECTED] wrote: I've run into several Struts gotchas while I'm learning/using it for the first time. I was wondering if anyone knows of a web reference(s) that covers some of these? I've since solved the problems, but if there was some documentation on some of the most common ones, I might be able to avoid some in the future. For example, changing the scope of an action in the struts-config.xml from request to session has solved a problem or two. :) Another example is when I had JSPs located down a directory hierarchy, I had to change the struts-config.xml action path to reflect that hierarchy. I thought I could just keep it as the *.do name (without the .do). Most examples always have the JSPs at root level. These are newbee issues, but they did take some time to figure out. Ted, your site, husted.com has Struts docs on it right? What about posting a sort of gotcha FAQ? I can help you put something together if you want and I'm sure some people here can contribute on some of the things they've gotten stuck on and then solved. ?? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Loading pdf files using jsp
Are you looking for something like FOP ( http://xml.apache.org/fop/index.html )? It allows you to take an xml document and render it as a pdf. dan On Tue, 2002-02-12 at 12:11, Galbreath, Mark wrote: Adobe used to have a Java library but there were so many issues with it (and Adobe did not support it) that they removed it from their downloads. http://support.adobe.com/devsup/devsup.nsf/docs/51759.htm I would suggest a Google search, however, because I know many people have asked this question (including me) over the years and someone is bound to have written one by now. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:04 AM To: Struts Users Mailing List Subject: Re: Loading pdf files using jsp Maybe you meant that you wanted to WRITE a PDF file from JSP? Loading a PDF file from a JSP is no different than loading any other web page from JSP. If the client browser has the Adobe Acrobat plugin installed, any hyperlink to PDF files will spawn the PDF file in the requesting browser. You may need to ensure that your server is configured to accepct the PDF mime-type, but other than that, it's a simple deal. To write PDF's dynamically, there is a Java library that you can obtain that is free. You'll have to dig for it though, cause I simply cannot remember the name or where to get it. There are also numerous commercial libraries that assist with writing dynamic PDF's on the server. - Cody [EMAIL PROTECTED] on 02/12/2002 04:27:32 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Loading pdf files using jsp Hello, I want to load a PDF file from JSP. Is it possible. Regards Arun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Dan Trevino bluemagnet, llc http://bluemagnet.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:link help
I have 3 html:link links on a page - they each direct to the same action, but I'd like to specify a different parameter for each. html:link forward=action value=parameter #1 / html:link forward=action value=parameter #2 / html:link forward=action value=parameter #3 / Obviously, the value element doesn't exist. I was able to accomplish this successfully using submit buttons... html:submit property=parameter value=value #1 / html:submit property=parameter value=value #2 / html:submit property=parameter value=value #3 / Using the above, I have a getParameter() method in my form that returns the appropriate value. How do I do the same thing using html:link to submit the form? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
iterate tag usage
I have a jsp page with the following code: logic:iterate id=regList name=RegForm property=listArray bean:write name=regList property=listArray/ /logic:iterate and in the RegForm.java java bean, we have the following code: private String[] listArray; public String[] getListArray() { return listArray; } But when I query the page, I got error: javax.servlet.ServletException: No collection found Why and how to fix? --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
App Design
Hi all, I am thinking of structuring an application as follows, and would appreciate any advice and ideas of how to do this: There will be two frames. First is a navigation frame where the user presses a button to determine the JSP that is loaded into the second frame. Each possible JSP for the second frame will have form. If a user is entering data into the form, and then presses a button on the navigation frame to go to a different jsp/form, I want to save the partially entered form data from the page the user is leaving. Then when the user goes back to the first page they can continue where they left off. I have been prototyping an idea; the navigation frame uses JavaScript to submit the form and redirect the old page to the new desired page. So far I have accomplished that when the form is submitted the action does not really do anything, so the form data is saved in the bean. But how do I accomplish the redirect? Any ideas are greatly appreciated. Mark Glatzer *** Disclaimer This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and/or CONFIDENTIAL or both. This email is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this email is not an intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return mail and permanently deleting the copy you received. Thank you. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Traffic
Subject: Re: Traffic From: Vic Cekvenich [EMAIL PROTECTED] === This list is cloned at news.basebeans.com so you can see and post everything and not have to delete. Vic [EMAIL PROTECTED] wrote: I really do agree that users of the mailing list should be *strongly* encouraged to search the archives (maybe just with STA, though, so they don't get too offended!). So many questions come up that have been tackled over and over again. I was off for a week last week and had almost 900 messages in my inbox to delete, which is crazy. Dave Galbreath, Mark [EMAIL PROTECTED] on 02/12/2002 07:27:17 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Traffic It's going to get worse. Nevertheless, you will never be able to manage the number/technical level of users in an open forum. SERVLET-INTEREST became too congested with basic setup and config questions by people too lazy to search the archive for an answer (and how many scores of questions have been asked here regarding ActionForm in just the past 2 weeks?) so a few guys created ADVANCED-SERVLET-INTEREST and began regulating the level of users. One thing that helped, however, was being brutally blunt with obviously lame users and telling them to STFA (search the f*cking archives), STFW (...web) and RTFM. This started a couple of flame wars, and the Sun moderator finally had to banish a few people, but the quality and quantity of posts changed considerably for the better. I'm not suggesting that's an answer, but my delete key has been getting a lot of attention lately Mark -Original Message- From: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:36 PM Well, it's not dibilitating. I can hack it. I guess I'm neutral on this one. - Cody Barr, Scott [IBM GSA] [EMAIL PROTECTED] on 02/11/2002 08:01:41 PM I disagree. Most messages are relatively small, and so long as people dont send attachments there generally isn't too much of a problem. The delete key is a great filter :) Scott -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 12:28 PM I second that motion. We do not have filtering capability here at my work so I have to manually delete messages! - Cody Mark Rines [EMAIL PROTECTED] on 02/11/2002 07:19:43 PM Phew, I vote that we split up this mail list into several topics such as installation, configuration, add-ons (such as strutsTests) and extending the various ActionXXX classes. I am really having trouble keeping up with all (over 110 just today) the email. Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: iterate tag usage
Henry, an array does not extend java.util.Collection. The iterate tag expects a Collection (which contains a 'iterator()' method). So you have to convert the array into a collection, either by simply not using arrays in favor of collections, or by implementing an additional method like: public Collection getListCollection() { return Arrays.asList(listArray); } BTW: I would avoid arrays. Cheers, Moritz. I have a jsp page with the following code: logic:iterate id=regList name=RegForm property=listArray bean:write name=regList property=listArray/ /logic:iterate and in the RegForm.java java bean, we have the following code: private String[] listArray; public String[] getListArray() { return listArray; } But when I query the page, I got error: javax.servlet.ServletException: No collection found Why and how to fix? -- - Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: URGENT: Null Strings in Websphere
We had a similar problem. Although we were actually getting spaces back from our DB, we were seeing null displayed on our jsp's. We fixed it by explicitly initializing our String fields in our result beans to rather than letting them default to null. I don't know *why* this worked, since you'd think the original null values would be overlaid when a field's setter was called, but for whatever reason, it solved the problem... George Phillips University of Miami [EMAIL PROTECTED] -Original Message- From: Dave J Dandeneau [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:39 AM To: Struts Users Mailing List Subject: URGENT: Null Strings in Websphere Whenever we have a String value in our forms, and the value is not set (), it is getting sent back to the jsp as null. By null I mean the actual string, and not an empty object. This is making validation of these fields fail. Has anyone seen this and found a work around. Thanks, Dave Dandeneau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: iterate tag usage
Hehe, nope. ;-) Look: the return value of the getXYZ() method must be a java.util.Collection, Iterator etc. but _not_ an array. By the way: your code would not even compile. private Vector listVector; // A Vector implements the Collection interface. That is good. public Vector getListVector() // This works. Vector. Have fun! Moritz. P.S.: What the hell is VectorString? Thanks for your info! Do you think the following will work? logic:iterate id=regList name=RegForm property=listVector bean:write name=regList property=listVector/ /logic:iterate private Vector listVector; public VectorString[] getListVector() { return listVector; } Thank you again! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Howto redirect/forward to other webapp with one config file?
I've read in the list that it's possible to do a forward with Struts from one WebApp to another. But according to the struts-config1_0.dtd, the forward paths are all relative. My question is: have those forwards actually been redirects or is it really somehow possible (without using some server bugs)? Then my next question would be: is there a nice way of doing a redirect to another webapp on the same server? By nice I mean that the redirect is done by only providing the WebApp path, but not the server itself? Let's say, I have two servers, a test server and a production server. My app shall be the same on both servers, which means that I don't have to say something like action path=/appSwitcher type=mystuff.AppSwitchAction forward name=continue path=http://mytestserver/OtherApp/do/login; redirect=true/ /action for the testserver, and action path=/appSwitcher type=mystuff.AppSwitchAction forward name=continue path=http://www.mydomain.com/OtherApp/do/login; redirect=true/ /action for the production server. Thanks for your time, Holger Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Pre and Post Processing
As I understand the implementation of html:select, I would have to return a collection of something. Collection of beans? One of my select lists has 370 school names in it. The last thing I want to do is to create/pass around a collection of 370 objects instead of one StringBuffer (actually converted to String at the end of the tag class). If there's another way to use html:select as I have used the tag, please let me know. Plus, how is it a breach? Doesn't struts use custom tags? Why can't I use a combo of struts and my own tags? I actually have to do a repost with this page too so I even use a usebean tag along with my struts form tag at the top so that I can have a selected option. Basically the user picks a school name and the form reloads with the school's address filled in for the user. Suggestions welcome. Here's my code snipet: jsp:useBean id=schoolAddressForm class=edu.cccs.energizer.SchoolAddressForm scope=session/ html:form name=schoolAddressForm type=edu.cccs.energizer.SchoolAddressForm action=forms/schoolSave.do select name=suffix onChange=getAddress(); % //only select it if it exists String suffix = ; suffix = schoolAddressForm.getSuffix(); if (suffix != null) { if (suffix.length() 0) { % option value=%= suffix % SELECTED%= schoolAddressForm.getName() %/option option value=--/option option value=Select One Below:/option % } } else { % option value= SELECTEDSelect One Below:/option % } % ene:optionlist sql=SELECT school_suffix, name FROM schools ORDER BY name value=school_suffix item=name / /select From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Pre and Post Processing Date: Tue, 12 Feb 2002 12:49:16 -0500 Serious breach of MVC though! What don't you like about the select implementation? I think it's cool! Dave Sarah Farrell [EMAIL PROTECTED] on 02/11/2002 10:19:26 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Pre and Post Processing I'm relatively new to struts too. But I really don't like the HTML select implementation. So I use a custom tag to fill in select/option lists. In fact I have to use this tag throughout my application so I made it very generic. My select/option lists almost always come right from my database. So I made a tag that takes a SQL statement as an attribute, the name of the field that I want as the option value as the 2nd attribute, and the name of the field I want displayed in the list as the 3rd attribute. The tag class builds a stringbuffer with option value=[field1][field2]/option strings for each row returned from the SQL statement. Then I use the struts form/action classes to verify the result of submitting the form. At 05:35 PM 2/11/2002 +, you wrote: Hello. I'm new to struts, and I'm having a discussion with one of our designers about pre and post processing in web pages. Previously, we have used the standard JSP way of creating pages, with lots of code in the top and body of pages, in order to access functionality we have exposed in some Java beans. These Java beans wrapper XML services provided by our Forte 4GL back end. Say we have a form which accepts customer details. I can see how the Struts mechanism allows us to put the code that was previously at the top of the next JSP page into an ActionHandler, which decouples the flow of pages quite nicely, and we have a nice way of doing post processing on the contents of a page. However, if we have a page that has to display a list of addresses for a customer, and we have to run some code to get the list before we can display it, where should this code live? Should it be in the ActionHandler with the previous page's post processing, or is there a better place to put it? Or would you suggest writing a custom tag to perform the pre-processing? Thanks for any thoughts, Tim. This e-mail and its attachments are for the use of the addressee only. It may contain information that is legally privileged, confidential and exempt from disclosure. It is not a contract, and prices, data and other information are not warranted as to completeness or accuracy. Any comments or statements made herein do not necessarily reflect those of PanCredit Systems Limited. If you are not the intended recipient you must not copy, distribute or disseminate this e-mail or attachments to anyone other than the addressee. If you receive this communication in error please advise us by telephone at once. PanCredit Systems
Best Approach for Database Access?
Could you kindly provide guidance on the best approach to implement database access.? I have encountered various schools of thought in my reading, that suggest extracting the business logic and database code from the jsp into a jsp bean or ejb or servlet. Thanks, Paul Idusogie Technical Architect Consulting Services Stellent Inc. Golden Triangle Drive Eden Prairie, MN 55104 Desk: 952.656.2755 Fax: 952.903.2115 Email: [EMAIL PROTECTED] website: http://www.stellent.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Best Approach for Database Access?
Hi Paul I follow this design practice for both EJB and non-EJB applications. The ones marked with * live at the application server JVM. (1) Non-EJB environment === JSP - ActionBean - ServiceBean - DaoBean - DB (2) EJB environment (BMP or Session) JSP - ActionBean - * ServiceBean - * DaoBean - DB (3) EJB environment (CMP) = JSP - ActionBean - * ServiceBean - DB Notes: == ActionBeans are the action classes of Struts DaoBeans are normal JavaBean classes which knows how to communicate with the DB, ie all SQL code goes here. In (1), you need to take care of transactions on your own. The ServiceBean in (1) is a normal JavaBean, but an EJB in (2) and (3) In (3), we do not need a Dao, since the CMP does all that work for us. Hope this helps Keith -Original Message- From: Paul Idusogie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 13 February 2002 9:38 a.m. To: [EMAIL PROTECTED] Subject: Best Approach for Database Access? Importance: High Could you kindly provide guidance on the best approach to implement database access.? I have encountered various schools of thought in my reading, that suggest extracting the business logic and database code from the jsp into a jsp bean or ejb or servlet. Thanks, Paul Idusogie Technical Architect Consulting Services Stellent Inc. Golden Triangle Drive Eden Prairie, MN 55104 Desk: 952.656.2755 Fax: 952.903.2115 Email: [EMAIL PROTECTED] website: http://www.stellent.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Pre and Post Processing
Is there an alternative to breaking the MVC?? We have to populate drop downs from the database. So I call the DAO from the JSP through a Helper Object (will convert this to a tag) and use the returned collection to populate the drop down using the html:select tag. For efficiency, we may store this collection in application scope. The alternative (I think) is that we create an action for this purpose and call the database from within the perform method which returns null?? Isn't that a lot of overhead to populate drop downs? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:49 AM To: Struts Users Mailing List Subject: Re: Pre and Post Processing Serious breach of MVC though! What don't you like about the select implementation? I think it's cool! Dave Sarah Farrell [EMAIL PROTECTED] on 02/11/2002 10:19:26 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Pre and Post Processing I'm relatively new to struts too. But I really don't like the HTML select implementation. So I use a custom tag to fill in select/option lists. In fact I have to use this tag throughout my application so I made it very generic. My select/option lists almost always come right from my database. So I made a tag that takes a SQL statement as an attribute, the name of the field that I want as the option value as the 2nd attribute, and the name of the field I want displayed in the list as the 3rd attribute. The tag class builds a stringbuffer with option value=[field1][field2]/option strings for each row returned from the SQL statement. Then I use the struts form/action classes to verify the result of submitting the form. At 05:35 PM 2/11/2002 +, you wrote: Hello. I'm new to struts, and I'm having a discussion with one of our designers about pre and post processing in web pages. Previously, we have used the standard JSP way of creating pages, with lots of code in the top and body of pages, in order to access functionality we have exposed in some Java beans. These Java beans wrapper XML services provided by our Forte 4GL back end. Say we have a form which accepts customer details. I can see how the Struts mechanism allows us to put the code that was previously at the top of the next JSP page into an ActionHandler, which decouples the flow of pages quite nicely, and we have a nice way of doing post processing on the contents of a page. However, if we have a page that has to display a list of addresses for a customer, and we have to run some code to get the list before we can display it, where should this code live? Should it be in the ActionHandler with the previous page's post processing, or is there a better place to put it? Or would you suggest writing a custom tag to perform the pre-processing? Thanks for any thoughts, Tim. This e-mail and its attachments are for the use of the addressee only. It may contain information that is legally privileged, confidential and exempt from disclosure. It is not a contract, and prices, data and other information are not warranted as to completeness or accuracy. Any comments or statements made herein do not necessarily reflect those of PanCredit Systems Limited. If you are not the intended recipient you must not copy, distribute or disseminate this e-mail or attachments to anyone other than the addressee. If you receive this communication in error please advise us by telephone at once. PanCredit Systems Limited Tel: +44 113 250 0260 Fax: +44 113 250 0621 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]