Re: html:options where values have embedded quotes
Anyone? Doug wrote: We have some customer-supplied selection options that have double quotes in their values, and Struts 1.1 isn't seeming to handle this correctly. Best I can tell from the HTML spec, these should be placed on the page as quot; , which will submit them as %22 , which *should* be seen on the server side as double quotes again, right? And Struts should be able to match that to an existing entry so it can properly set the selected value. Instead, it seems the options tag isn't escaping the quotes at all (changing them to quot;) and that if we manually do it ourselves, the selected item still isn't being set when the page is reloaded. IIRC, the tag is just leaving the quotes inside the attribute value, which outputs invalid HTML. Am I missing something? Is there a better way to do this? Thanks. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:options where values have embedded quotes
We have some customer-supplied selection options that have double quotes in their values, and Struts 1.1 isn't seeming to handle this correctly. Best I can tell from the HTML spec, these should be placed on the page as quot; , which will submit them as %22 , which *should* be seen on the server side as double quotes again, right? And Struts should be able to match that to an existing entry so it can properly set the selected value. Instead, it seems the options tag isn't escaping the quotes at all (changing them to quot;) and that if we manually do it ourselves, the selected item still isn't being set when the page is reloaded. IIRC, the tag is just leaving the quotes inside the attribute value, which outputs invalid HTML. Am I missing something? Is there a better way to do this? Thanks. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Populating a DynaActionForm with a complex object graph
OK, I've starting off down the Map-backed, manual indexing route, and it's grim... It forces me to have model logic in three places - the JSP (to create the keys into the map) and the two action classes (prepopulate, then handle submit). Is there a more elegant way of doing this stuff? (Or are there any plans to provide this functionality in future releases?) Thanks Doug -Original Message- From: Doug Dixon [mailto:[EMAIL PROTECTED] Sent: 31 January 2004 11:50 To: '[EMAIL PROTECTED]' Subject: Populating a DynaActionForm with a complex object graph Hi I'm trying to populate a DynaActionForm dynamically, using this how-to as a starting point: http://www.developer.com/java/other/article.php/2233591 Because the number of elements in my form can vary at runtime, I take the advice near the bottom of the article: You can even dynamically specify the size of the form (and prepopulate it) at run time [...] by using an Action instead of a forward to precreate the form-property value, and leaving the size parameter out. The actual can then create an array of the appropriate size and prepopulate values.. So my Action instantiates the right number of beans in the form and then hands off to the JSP, no problem. However, my model isn't a simple array (as in all the examples I can find) - it's a complex object graph: I have one or more Flights, each of which can contain one or more Passengers, each of which has multiple properties (name, etc.) This means I need another level of iteration, a bit like this (if it worked!): c:forEach var=flight items=${myBeanForm.map.flights} Flightbr/ c:forEach var=passenger items=${flight.passengers} Passengerbr/ Name: html:text indexed=true name=passenger property=name /br/ /c:forEach /c:forEach This doesn't work - I just get HTML like this: Flightbr/ Passengerbr/ Name: input type=text name=passenger[0].name value=Dougbr/ Flightbr/ Passengerbr/ Name: input type=text name=passenger[0].name value=Elvisbr/ Which obviously won't work I need to end up with something like Flightbr/ Passengerbr/ Name: input type=text name=flight[0].passenger[0].name value=Dougbr/ Flightbr/ Passengerbr/ Name: input type=text name=flight[1].passenger[0].name value=Elvisbr/ Does anyone know if there is some way of doing this with DynaActionForms? Or am I going to have to do nasty manual indexing with Map or List backed ActionForms? Thanks for any help This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Populating a DynaActionForm with a complex object graph
Hi I'm trying to populate a DynaActionForm dynamically, using this how-to as a starting point: http://www.developer.com/java/other/article.php/2233591 Because the number of elements in my form can vary at runtime, I take the advice near the bottom of the article: You can even dynamically specify the size of the form (and prepopulate it) at run time [...] by using an Action instead of a forward to precreate the form-property value, and leaving the size parameter out. The actual can then create an array of the appropriate size and prepopulate values.. So my Action instantiates the right number of beans in the form and then hands off to the JSP, no problem. However, my model isn't a simple array (as in all the examples I can find) - it's a complex object graph: I have one or more Flights, each of which can contain one or more Passengers, each of which has multiple properties (name, etc.) This means I need another level of iteration, a bit like this (if it worked!): c:forEach var=flight items=${myBeanForm.map.flights} Flightbr/ c:forEach var=passenger items=${flight.passengers} Passengerbr/ Name: html:text indexed=true name=passenger property=name /br/ /c:forEach /c:forEach This doesn't work - I just get HTML like this: Flightbr/ Passengerbr/ Name: input type=text name=passenger[0].name value=Dougbr/ Flightbr/ Passengerbr/ Name: input type=text name=passenger[0].name value=Elvisbr/ Which obviously won't work I need to end up with something like Flightbr/ Passengerbr/ Name: input type=text name=flight[0].passenger[0].name value=Dougbr/ Flightbr/ Passengerbr/ Name: input type=text name=flight[1].passenger[0].name value=Elvisbr/ Does anyone know if there is some way of doing this with DynaActionForms? Or am I going to have to do nasty manual indexing with Map or List backed ActionForms? Thanks for any help This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sturts
Gurpreet Dhanoa wrote: HI is there any way to call a action within an JSP file without using Submit button and any other html:form element I want to call a action with in a logic:iterate which is further containing one more logic:iterate html:link ? Or is that still not what you're looking for? By the way, a more descriptive subject line for your post might get better responses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DB2 Pooled connection from Struts
Interesting. While I'm not doing this from Struts, I've just worked on using DB2's internal connection pool from standalone code. Perhaps this will help. I got this information from an IBMer, although even he never pointed me at supporting documentation: import java.sql.Connection; import COM.ibm.db2.jdbc.DB2DataSource; public class DB2ConnectTest { public static void main(String[] args) throws Exception { DB2DataSource datasource = new DB2DataSource(); datasource.setPassword(user); // Must use App Driver -- do so by not setting server name or port datasource.setDatabaseName(YOURDB); datasource.setUser(password); final int NUM_CONNS = 10; for (int i = 1; i = NUM_CONNS; i++) { long start = System.currentTimeMillis(); Connection conn = datasource.getConnection(); long end = System.currentTimeMillis(); conn.close(); System.out.println(Get Connection took # + i + : + (end - start)); } } } His assertion and my experience show that this does use a Connection Pool. So... while I've never tried to translate this into Struts, I can see a few things that are different that you could try. Namely, the class of the DataSource implementation and trying to set the name property (maybe instead of the url property). Also, I specifically asked about DB2 v7.2. I know v8 has some more sophisticated capabilities (like a Type 4 JDBC driver), so there may be a slightly different answer if you are on that version. Good luck, and please reply back here if you get it working. Doug Eric SCHULTZ wrote: Good morning... I'm having an impossible time getting a pool of connections to a DB2 database going. I've gotten a single connection to work using the old method (DriverManager.register, DriverManager.getConnection, ...) but I can't seem to do it by describing the datasource in struts-config.xml and calling getDataSource(). Here's the code that works (in a bean): DriverManager.registerDriver(new COM.ibm.db2.jdbc.app.DB2Driver()); Connection conn = DriverManager.getConnection(jdbc:db2:DB2Test, user, password); I've tried a whole bunch configurations in struts-config.xml, for example: data-source key=CIS type=COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource set-property property=driverClass value=COM.ibm.db2.jdbc.app.DB2Driver / set-property property=url value=jdbc:db2:DB2Test / set-property property=user value=user / set-property property=password value=password / set-property property=maxActive value=10 / set-property property=maxWait value=5000 / set-property property=defaultAutoCommit value=false / /data-source and then in my Action I call: CISCustomerLookup ccl = new CISCustomerLookup(getDataSource(req, CIS).getConnection()); Where ccl is my bean and to shield it from the Struts layer I pass the connection it should use for the lookup. But it doesn't work. The latest error I recieved is the following: javax.servlet.ServletException: [IBM][JDBC Drvier] CLI0615E Error receiving from... I've also recieved messages alluding to no suitable driver available. And when I check the Tomcat log I have often had a situation where the ActionServlet was marked unavailable due to a problem creating the datasource when I deployed the war. I've also tried the net driver (COM.ibm.db2.jdbc.net.DB2Driver) with similar results. Help me please!!! Any working examples would be most apprciated. Eric Schultz Technical Leader Conseiller Technique Elix Specialist in interactive business solutions Specialiste en solutions d'affaires interactives 14 Commerce Place, 5th floor Nun's Island, QC H4E 1T5 t: 514 768-1000 f: 514 768-7680 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts on WebSphere 3.5
Thomas Schneider wrote: Has anyone experiences in getting struts installed on a WebSphere Application Server v3.5? I tried to get the struts-example.war running as desribed at http://jakarta.apache.org/struts/userGuide/installation-was352-x.html but I still get the error Cannot find message resources under key org.apache.struts.action.MESSAGE. What does it mean? The error is mentioned in the article above: then your application is most likely still bombing on the struts-config issue that Richard discovered., but who is Richard? Thanks for help or any informations regarding struts with WAS v3.5 We're running Struts 1.1 on WAS 3.5 (3.5.6 and 3.5.7 at least). IIRC, that particular error message can mean several things. In our case, *usually* it is preceded by other messages in WAS' stdout/stderr when the application is loaded, so you should look there. The first thing that comes to mind, though, is that you need a different XML parser than what is installed with WAS. We deploy xercesImpl.jar and xmlParserAPIs.jar (from Xerces 2.5) into the same directory as the Struts jars. We also never had to extract DTDs from the jar files, but we did have to extract TLDs. The TLDs also have to be set up in WAS' Tag Libraries configuration section as there is no web.xml in WAS 3.5. Good luck. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Off Topic: A suitable JVM could not be found
Martin Gainty wrote: Way off topic but I'm stumped Websphere 5 When attempting to do run any Java Process from Websphere I get A suitable JVM could not be found I know Websphere likes to install their own IBM JDK1.31 but I want to retain my SUN JDK 1.41 for obvious reasons Has anyone seen this and know of a workaround? Thanks, -M JDK 1.4 is definitely not supported for WebSphere Application Server 5.0 yet (neither IBM's nor Sun's), and there's no statement of when it will be. See: http://www-3.ibm.com/software/webservers/appserv/doc/v50/prereqs/prereq502.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Plugin destroy() method not being called?
We've written a couple of custom PlugIns to enable us to execute some startup and shutdown logic for our application. However, under WebSphere 3.5, the destroy() method is never being called. Neither when I stop the Application Server (JVM) nor when I restart the Web Application. Any ideas? Restarting the Web Application does cause the init() method to be called, so we're re-allocating resources when we've never cleaned up the existing ones. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Plugin destroy() method not being called?
Craig R. McClanahan wrote: Doug wrote: We've written a couple of custom PlugIns to enable us to execute some startup and shutdown logic for our application. However, under WebSphere 3.5, the destroy() method is never being called. Neither when I stop the Application Server (JVM) nor when I restart the Web Application. Any ideas? Restarting the Web Application does cause the init() method to be called, so we're re-allocating resources when we've never cleaned up the existing ones. The destroy() method of plugins is called when the destroy() method of ActionServlet is called. Do the container logs indicate that this was done? If not, it sounds like the container might not be obeying the servlet spec requirement to call destroy() when taking an app out of service. Craig Thanks for the quick reply. I do see now that destroy() is being called at times - just not nearly as frequently as init() is being called. So I bet you're right about the container. We're shortly going to be upgrading to a newer version of WebSphere, so I might be able to live with the problem until then. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: any known issues with WAS 4.0?
Hibbs, David wrote: In that case, the problem is likely that the Action servlet failed to load its struts-config.xml file. Under WAS, this is typically because it can't access the proper DTD (are you behind a firewall?). On WAS 4.0, if you keep a copy of the DTD under WEB-INF and alter the struts-config.xml DOCTYPE to indicate While that could be it, we've yet to have that particular problem with struts-config. We've had it with validation.xml and validator-rules.xml, but not with struts-config.xml. FWIW. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: any known issues with WAS 4.0?
Bender, James wrote: Hi, I am new to Struts and installed Struts-example, Struts-blank etc from the stable 1.1 release at jakarta.apache.org/struts. None of these work on my WAS 4.0. I get all sorts of errors and I dug through news groups applying patches that never worked all of yesterday trying to get one of them to work. Then, I installed the struts-stub (struts 1.0) example from the tutorials on the site and that one deployed perfectly. Does Struts 1.1 just not work on WAS 4.0? On struts-blank I get Error 500: through the web -- no error context provided on the line index.jsp::logic:redirect forward=welcome/ There are several jar files you need. struts.jar is one of them, but there are many commons- jars as well. Also, for Struts 1.1 apps to work, you need some Xerces jars. Namely, xmlParserAPIs.jar and xercesImpl.jar. We're using them from the latest Xerces (2.5) on WAS 5.0, but any recent Xerces should work. It definitely seems that whatever XML parser WAS has installed isn't sufficient for Struts 1.1. In WAS 5.0, it does seem sufficient for Struts 1.0, though, so that could explain what you're seeing. Finally, you should be able to restart your web-app or app server and watch the stdout logs for Struts' startup messages. With your detail and debug parameters set the way your web.xml shows, you should get plenty of logging messages to give you some ideas what is failing on startup. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: StrutsTestCase using weblogic 8.1
Hi Sachin. No, I'm getting the same problem with both versions. It must be an environment problem of some kind. When using the mock method I get 404 errors returned, which causes the tests to fail. A failed login should not need database access as I have set this up to check validation. The classpath issue is preventing me from getting any further with the in-container method. Thanks, Doug -Original Message- From: Sachin [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 13:14 To: Chalmers, Doug Cc: Struts Users Mailing List (E-mail) Subject: RE: StrutsTestCase using weblogic 8.1 Hi Doug, Have you able to write TestCases for Struts1.1 in StrutsTestCases becuase i can able to run with Struts1.0 but not with Struts1.1 Thanks sachin -Original Message- From: Chalmers, Doug [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 8:07 PM To: [EMAIL PROTECTED] Subject: StrutsTestCase using weblogic 8.1 Hi folks, I'm trying to set up Cactus/StrutsTestCase etc to try out testing methods on an existing (ongoing) application and coming across several problems. I've got the mock method almost working, but it's failing cos the test I've tried needs database access. Trying to get it to run the tests when the app is deployed in weblogic but keep getting NoClassDefFound errors for aspectj classes. I've tried different version of the jar file but the classes it complains about are always there. Im pretty sure the classpath is fine, but it just doesn't like it. I've tried adding the classpath to the application but that didn't make any difference. Anyone seen this problem before? Weblogic 8.1 Struts 1.0/1.1 Cactus 1.4 StrutsTestCase - tried various versions for 1.0 and 1.1 of struts. All 2.3 Servlet. Cheers, Doug Chalmers Software Development Petrotechnics Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator
On one of our machines that cannot get to the internet, the DTD references definitely cause validation to be ignored completely. I believe we can see errors during the web application's startup (or we probably wouldn't have found the problem.) We have to comment-out those DTD lines, or we get no validation. Sergey Smirnov wrote: Common-Validators Framework does not check Validation file against DTD in run-time at all. I wonder, how removing DTD declaration can help to change something in this case. - Original Message - From: Nagendra Kumar O V S To: [EMAIL PROTECTED] Sent: Sunday, June 22, 2003 9:42 PM Subject: RE: Validator HI keith, comment your dtd declarations in both ur validator.xml validator-rules.xml and try. this should work for u.. -nagi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StrutsTestCase using weblogic 8.1
Hi folks, I'm trying to set up Cactus/StrutsTestCase etc to try out testing methods on an existing (ongoing) application and coming across several problems. I've got the mock method almost working, but it's failing cos the test I've tried needs database access. Trying to get it to run the tests when the app is deployed in weblogic but keep getting NoClassDefFound errors for aspectj classes. I've tried different version of the jar file but the classes it complains about are always there. Im pretty sure the classpath is fine, but it just doesn't like it. I've tried adding the classpath to the application but that didn't make any difference. Anyone seen this problem before? Weblogic 8.1 Struts 1.0/1.1 Cactus 1.4 StrutsTestCase - tried various versions for 1.0 and 1.1 of struts. All 2.3 Servlet. Cheers, Doug Chalmers Software Development Petrotechnics Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multipart request losing parameters when forwarded
I can't seem to figure this one out. My action class is getting a request coming from a form that has the enctype of multipart/form-data. From looking in the JavaDocs, I see that what ends up in the Action method is a MultipartRequestWrapper which wraps the HttpServletRequest. The Javadocs say that this wrapper exists within the action method, but once it gets forwarded, it reverts back to the HttpServletRequest. And that's where I have the problem. Here's my action method: public ActionForward hold ( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { log.debug(here in the hold() method); log.debug(The class passed in is: + request.getClass().toString()); log.debug(component key: + request.getParameter(componentKey)); MultipartRequestWrapper wrapper = (MultipartRequestWrapper)request; HttpServletRequest req = wrapper.getRequest(); log.debug(component key from http request: + req.getParameter(componentKey)); ImageAsset asset = (ImageAsset)SessionDataContainer.getComponent(request); copyProperties(asset,form); //FIXIT this is hardcoded for now AssetType assetType = AssetTypes.lookUpAssetTypeByExtension(gif); asset.setAssetType(assetType); asset.setFileName(blah.gif); asset.setCreationDate(new Date()); asset.setLocation(/images/); ActionForward forward = StrutsUtil.getForwardToMapping(request, mapping); log.debug(Action foward: + forward.getName()); String componentKey = request.getParameter(componentKey); req.setAttribute(componentKey, componentKey); request = req; return forward; } There is a lot of logging in there, but I am getting a certain parameter, componentKey, which I am getting out of the request, and that works fine. The problem occurs when I forward this onto another Struts action class. In that class, it tries to access the same parameter -- componentKey from the request, but it comes back empty. I think this is happening because, when the request gets forwarded on, it converts to a regular HttpServletRequest, and the parameter is lost. You can see in the method above, I'm trying to convert request back to an HttpServletRequest, and then set the parameter as an attribute, but this doesn't work. Any ideas on how to handle this? I am using Struts 1.1 release candicate 1. Thanks!! -Doug Padian
Re: How to redirect to http://www.cnn.com from Struts Action?
I believe this will work declare this forward as a global or local forward forward name=cnn path=http://www.cnn.com; redirect=true/ from an action do: return mapping.findForward(cnn) or from a jsp call logic:forward name=cnn/ (has to be global for jsp one to work. Hope this helps. Doug On Fri, 2003-06-13 at 15:46, J. Jason Zhou wrote: It seems Struts ALWAYS prefix myapp context so it becomes /myapp/http://www.cnn.com -- Best Regards, J. Jason Zhou Business Intelligence Platform Division (BIP), R D, SAS Institute, 100 SAS Campus Dr. Cary, North Carolina 27513-8617 Voice: 919-531-0568(O) Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Doug Bryant ICF Consulting Software Engineer phone: 843.760.3635 fax: 843.207.5444 email: [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts based help system?
we just did a custom tag. Passed in an parameter to tag such as, Shipping. The tag would then go to the server and lookup the mapping for what should be displayed for that particular topic, say /requestorShipping.jsp . Our mapping is just a simple property file. It could just as easily be a database lookup, xml file, etc. Hope this helps. Doug On Mon, 2003-06-09 at 10:05, Ittay Dror wrote: Hello, Does anybody know of a struts based help system? If not, any other server-side (meaning the pages are rendered on request) help system framework? Thank you, Ittay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Doug Bryant ICF Consulting Software Engineer phone: 843.760.3635 fax: 843.207.5444 email: [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
On failed validation, trouble with form
I have a Form that maintains a couple collections that are populated by the Action class. If this form fails validation, the struts servlet sends the request back to the input page, but then the collections are empty. In Struts In Action, page 310, Ted Husted talks about routing the failed request through another Action method that repopulates those collections. I tried writing a method like that in my Action class, named invalidUser which regenerates the collections that I need and puts them back into the form. My entry in the struts-config looks like this: action path=/user_admin_editor/submit_user type=com.ignitemedia.sportseditor.user.struts.UserAction name=userForm scope=request parameter=method validate=true input=/user_admin_editor/edit_user.do?method=invalidUser forward name=success path=/pages/user_admin_editor/confirm.jsp/ /action If the validation fails, the input call goes to edit_user.do, with the method name invalidUser. For whatever reason, this doesn't work. At first I was getting errors saying it couldn't find the invalidUser method. Then I changed the inputForward attribute of the controller tag to true. I don't get the errors now, but just a blank page. I'm a little clueless. Any ideas out there? -Doug Padian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validator: how to validate if either of two fields is present andvalid
we have a form we are displaying to the user. depending on the permissions the user has, they are required to either fill out a requiredDeliveryDate or daysAro Depending on what permissions you have, you must fill out one or the other and you must fill in either a date or an integer value depending on the field. We are currently using validator for the rest of the app (1.1 rc1). How can we achive this validation using validator? Writing a custom validate method does not seem to be a good solution because you can only validate one field at a time. We thought about extending org.apache.struts.validator.DynaValidatorForm, overriding the validate method, validating everything we can using validator and coding the rest, but it seems far from ideal. Does anyone have any suggestions or has anyone ever run across this type of problems before. Thanks for any suggestions. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validator: how to validate if either of two fields is presentandvalid
Perfect! Thanks James. That's exactly what I was looking for. Doug On Wed, 2003-06-04 at 14:16, James Turner wrote: Check out the requiredif validation. It's even in the newbie FAQ now. James -Original Message- From: Doug Bryant [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 11:35 AM To: Struts Users Mailing List Subject: validator: how to validate if either of two fields is present andvalid we have a form we are displaying to the user. depending on the permissions the user has, they are required to either fill out a requiredDeliveryDate or daysAro Depending on what permissions you have, you must fill out one or the other and you must fill in either a date or an integer value depending on the field. We are currently using validator for the rest of the app (1.1 rc1). How can we achive this validation using validator? Writing a custom validate method does not seem to be a good solution because you can only validate one field at a time. We thought about extending org.apache.struts.validator.DynaValidatorForm, overriding the validate method, validating everything we can using validator and coding the rest, but it seems far from ideal. Does anyone have any suggestions or has anyone ever run across this type of problems before. Thanks for any suggestions. Doug -- Doug Bryant ICF Consulting Software Engineer phone: 843.760.3635 fax: 843.207.5444 email: [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out-of-memory exp
it's weblogic, not struts. it appears that hot-deploy does not free up resources upon redeploying an application. we are working with a fairly large application. Most of the developers here have resorted to restarting the server between redeploys because it is almost guaranteed to hose up after a couple of minutes of running on a redeployed app. Doug On Tue, 2003-06-03 at 10:26, Nail, Evan Burke wrote: nagi, Besides the previously mentioned errors, I sometimes get this error when I'm working in my development environment and I have changed a class and not restarted my server. I have not used 7.1 much so I don't know if this could be your error , we're on 6.1 and see it occasionally although normally we get scope errors when using struts. There might be config methods to help the classloader out in these cases ..not sure. bn -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 9:15 AM To: [EMAIL PROTECTED] Subject: out-of-memory exp hi, i am using struts 1.1 with ejb on weblogic7.1 i frequently get this error while working with the web application Jun 3, 2003 7:42:03 PM IST Error HTTP 101017 [ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root cause of ServletException java.lang.OutOfMemoryError no stack trace available no idea why this comes any help TIA --nagi Nagendra Kumar O V S Member Technical Staff Ikigo India Private Ltd. 470-B, Road No. 36, Jubilee Hills, Hyderabad 500033 Contact(O): 23544671 Cell: 98482-41789 http://www.incredimail.com/redir.asp?ad_id=309lang=9 IncrediMail - Email has finally evolved - http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here ** This e-mail is the property of Enron Corp. and/or its relevant affiliate and may contain confidential and privileged material for the sole use of the intended recipient (s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and delete all copies of the message. This e-mail (and any attachments hereto) are not intended to be an offer (or an acceptance) and do not create or evidence a binding and enforceable contract between Enron Corp. (or any of its affiliates) and the intended recipient or any other party, and may not be relied on by anyone as the basis of a contract by estoppel or otherwise. Thank you. ** -- Doug Bryant ICF Consulting Software Engineer phone: 843.760.3635 fax: 843.207.5444 email: [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:link along with logic:iterate
Alawadhi, Mona wrote: I've got this far in my code, but how can I specify which letter was selected after specifying my Action page? (it is Underlined) logic:iterate name=addressListFormBean id=choice property=letterOptions html:link page=/addressListAction.do?letter= ??? bean:write name=choice property=labelStr/ /html:link /logic:iterate Mona When you only have the one parameter, it's easy with the paramId, paramName, paramProperty attributes. For example: html:link page=/addressListAction.do paramId=letter paramName=choice If you have more than one parameter, you have to use scriplets. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and the infamous IE multiple browser/same session problem
Michael Ruppin wrote: I'm reconsidering my approach to this problem, in favor of something more elegant/more compatible with out-of-the-box Struts. Anyone tackled this yet? For those not aware, MS IE allows users to launch a browser against the same session via File/New/Window (Ctrl-N). The issue is, if you have need to keep data in the session (which I do), a submission from one browser could grab and/or overwrite session data meant for the other browser. This can lead to data integrity problems and other weirdness. Telling my user community not to use MS IE or it's Ctrl-N feature is not an option. My current approach is to put a hidden random key into the HTML, and name the session attribute with that. When one of the two browsers submits a request (Assuming, at this point, they've opened another) the session data is pulled by key, assigned a new key, a new copy is placed in the session named with the new key, and the new key is rendered in the HTML response. The old session data may or may not be removed, depending on whether or not it is acceptable for the browser with the old key to [gracefully] fail, how we choose to expire session data, and whether or not a means of dealing with stale data is supported by the model. This works fine, but in doing so I've had to write my own methods for populating collections of forms which would have otherwise been taken care of for me by specifying session scope in struts-config. Am I missing a better way? m Out of curiosity, what kind of application do you have where you really *need* to support someone having multiple different sessions active at the same time? I'm not necessarily saying that you don't need this - I'm just wondering. You may be bending over backwards to solve a problem that real users (as opposed to testers) won't have. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iplanet+tomcat+struts
We had to make IPlanet 4.1 the front end for weblogic. We just made iplanet proxy for weblogic. you should be able to do the same thing with tomcat. All the configuration is done on the iplanet server. the supplied link is for weblogic, but most should be applicable to tomcat. It should atleast get you started. http://edocs.bea.com/wls/docs61/adminguide/nsapi.html Doug On Thu, 2003-02-27 at 04:13, Dinesh Samson J wrote: Greetings May be this is not a right place to post this message, but I couldn't get proper documentation for it. I need to configure iplanet web server 4.1 to run with tomcat 4.1.18 both on Solaris 8. Can anyone tell me where I can get the document for configuring iplanet. If you have done it, kindly send me the configuration to do so. regards, Dinesh Samson J -- Doug Bryant ICF Consulting Software Engineer phone: 843.760.3635 fax: 843.207.5444 email: [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Russian I18n problems
Solved this now. The resources file needed to be converted to UTF-8 and THEN converted using native2ascii. No UTF settings needed at all. Cheers, Doug -Original Message- From: Chalmers, Doug Sent: 22 ?? 2003 ?. 10:24 To: Struts User Subject: Russian I18n problems Hi all, I have a problem which isn't strictly Struts related but I'm hoping someone has done this before. (Thanks to Craig McClanahan and Aaron Rustad for their help so far on this.) I'm trying to get a Russian version of an existing application working. So far, I've set up Russian text resources and these work fine by specifying the following line at the top of the JSP (at the top of a template JSP in this case): %@ page contentType=text/html;charset=UTF-8 language=java% and this line in the Action class: response.setContentType(text/html; charset=UTF-8); This is fine, but it won't submit and maintain (show on page again) Russian text when entered in e.g. a Struts Text Area In order to get submitted text working I've also done the following: Inserted the following in web.xml: context-param param-nameweblogic.httpd.inputCharset./*/param-name param-valuewindows-1251/param-value /context-param and having the following line at the top of the JSP page (NB, not at the top of the template as above) %@ page contentType=text/html;charset=windows-1251 language=java% and response.setContentType(text/html; charset=windows-1251); The problem is that both will not work together. I've seen solutions that utilise HttpServletRequest.setCharacterEncoding(), but I can't use that as we're stuck with Weblogic 5.1 which only uses EE1.2.1. I've also seen the use of filters but they utilise the Servlet2.3 spec too. Any help with this is greatly appreciated. Getting both working but not together is a bit maddening as you can imagine! Software used: Weblogic 5.1 Struts 1.0.2 JDK1.2 / EE1.2.1 IE 5 - submits charset Cp1251 Thanks, Doug Chalmers Software Developer Petrotechnics Ltd. Tel. +44 (0) 1224 337236 www.petrotechnics.co.uk/index.htm -- 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]
Russian I18n problems
Hi all, I have a problem which isn't strictly Struts related but I'm hoping someone has done this before. (Thanks to Craig McClanahan and Aaron Rustad for their help so far on this.) I'm trying to get a Russian version of an existing application working. So far, I've set up Russian text resources and these work fine by specifying the following line at the top of the JSP (at the top of a template JSP in this case): %@ page contentType=text/html;charset=UTF-8 language=java% and this line in the Action class: response.setContentType(text/html; charset=UTF-8); This is fine, but it won't submit and maintain (show on page again) Russian text when entered in e.g. a Struts Text Area In order to get submitted text working I've also done the following: Inserted the following in web.xml: context-param param-nameweblogic.httpd.inputCharset./*/param-name param-valuewindows-1251/param-value /context-param and having the following line at the top of the JSP page (NB, not at the top of the template as above) %@ page contentType=text/html;charset=windows-1251 language=java% and response.setContentType(text/html; charset=windows-1251); The problem is that both will not work together. I've seen solutions that utilise HttpServletRequest.setCharacterEncoding(), but I can't use that as we're stuck with Weblogic 5.1 which only uses EE1.2.1. I've also seen the use of filters but they utilise the Servlet2.3 spec too. Any help with this is greatly appreciated. Getting both working but not together is a bit maddening as you can imagine! Software used: Weblogic 5.1 Struts 1.0.2 JDK1.2 / EE1.2.1 IE 5 - submits charset Cp1251 Thanks, Doug Chalmers Software Developer Petrotechnics Ltd. Tel. +44 (0) 1224 337236 www.petrotechnics.co.uk/index.htm -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Looking for Struts Training Materials
I'm an enterprise Java trainer, and I'm looking for someone who might be able to share, co-develop, or license their struts training course materials. I've got several customers looking for a struts course, but I no longer have access to the training materials I once used. Building a new course from scratch takes about a month, but I'd be willing to pool and share course resources, or license a course. If anyone knows of any vendors who might be interested in such an arrangement, please e-mail me and let me know. Thanks, Doug -- Great contest follows, and much learned dust Involves the combatants; each claiming truth, And truth disclaiming both. Cowper (1731-1800) English Poet -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Chart products
Matt: Thank you for your reply. I had a look at Rchart, it seems very good to use. Did you use Rchart as Applet or use it as Servlet? It there some technical issues related to it? Thank you. Regards, Cathy Matt Smith [EMAIL PROTECTED] wrote:you might want to look at rchart. I use it for the same sort of thing! It's in-expensive and easy to use... www.java4less.com m. -Original Message- From: Cathy King [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 9:53 PM To: Struts Users Mailing List Subject: Chart products Happy new year, everyone: I have a question, it may be not directly related to struts. I am sorry if I shouldn't post the topic in this mailing list.And if you could give me some suggestions, I really appreciate it. Our software group are implementing a j2ee application---using struts to implement the front-end. We want to have a CHART to monitor stuffs like the number of users logged in in a period of time.We want the chart to be dynamically updated in a fixed period of time, or by clicking refresh button. I searched on the web, there are lots of chart products implemented in applet. As I heard, applet has problems with IE. Have somebody ever used some chart applets or other products to monitor the system? Could you recommend some chart products to me? I really appreciated your help and suggestions. Thank you very much. Regards Cathy __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
RE: Chart products
Matt: Thank you for your reply. I had a look at Rchart, it seems very good to use. Did you use Rchart as Applet or use it as Servlet? It there some technical issues related to it? Thank you. Regards, Cathy Matt Smith [EMAIL PROTECTED] wrote:you might want to look at rchart. I use it for the same sort of thing! It's in-expensive and easy to use... www.java4less.com m. -Original Message- From: Cathy King [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 9:53 PM To: Struts Users Mailing List Subject: Chart products Happy new year, everyone: I have a question, it may be not directly related to struts. I am sorry if I shouldn't post the topic in this mailing list.And if you could give me some suggestions, I really appreciate it. Our software group are implementing a j2ee application---using struts to implement the front-end. We want to have a CHART to monitor stuffs like the number of users logged in in a period of time.We want the chart to be dynamically updated in a fixed period of time, or by clicking refresh button. I searched on the web, there are lots of chart products implemented in applet. As I heard, applet has problems with IE. Have somebody ever used some chart applets or other products to monitor the system? Could you recommend some chart products to me? I really appreciated your help and suggestions. Thank you very much. Regards Cathy __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
RE: Chart products
Matt: Thank you for your reply. I had a look at Rchart, it seems very good to use. Did you use Rchart as Applet or use it as Servlet? It there some technical issues related to it? Thank you. Regards, Cathy Matt Smith [EMAIL PROTECTED] wrote:you might want to look at rchart. I use it for the same sort of thing! It's in-expensive and easy to use... www.java4less.com m. -Original Message- From: Cathy King [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 9:53 PM To: Struts Users Mailing List Subject: Chart products Happy new year, everyone: I have a question, it may be not directly related to struts. I am sorry if I shouldn't post the topic in this mailing list.And if you could give me some suggestions, I really appreciate it. Our software group are implementing a j2ee application---using struts to implement the front-end. We want to have a CHART to monitor stuffs like the number of users logged in in a period of time.We want the chart to be dynamically updated in a fixed period of time, or by clicking refresh button. I searched on the web, there are lots of chart products implemented in applet. As I heard, applet has problems with IE. Have somebody ever used some chart applets or other products to monitor the system? Could you recommend some chart products to me? I really appreciated your help and suggestions. Thank you very much. Regards Cathy __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
reset doesn't work well
Hi: I have a problem with reset button. In my jsp file, I have html:reset/. In my form class, I have: public void reset(ActionMapping mapping, HttpServletRequest request) { amount = null; password = null; } in the struts-config.xml file, it has: actionpath=/xxx type=yyy name=myForm scope=request input=/zzz.jsp forward name=success path=/zzz.jsp/ /action I filled out the fields, if I click reset button before submit the form, the fields are cleared. But if I submit the form first, and it detects some error(for example: the password is not correct), the form is showed with error message. In this case, when I click reset button, the fields are not cleared. What is wrong with this. I really want the fields can be cleared if errors are detected. Could someone help me out? Thanks. Doug - Post your free ad now! Yahoo! Canada Personals
RE: reset doesn't work well
Hi, Bill: Thank you for reply. The ActionForm api says: public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) Reset all bean properties to their default state. This method is called before the properties are repopulated by the controller servlet. The default implementation does nothing. Subclasses should override this method to reset all bean properties to default values. I have overitten the reset method to reset both amount and password to null. From my understanding, whenever user clicks reset button, it will call the reset method, therefore, all the fields should be cleared. Please correct me if I am wrong. Thanks Siggelkow, Bill [EMAIL PROTECTED] wrote:The really has nothing to do with the reset method of your form ... instead this renders an [input] button that will reset the form fields to their default state as known by the browser. Therefore, in the case when you have returned to the form after a validation failure the default values are the values in the form bean returned to the input page. I see a couple of options .. 1) You could have your validate() method clear out the fields that erroneous (or clear them all out if you want) if the validation fails. 2) If you truly want the reset button to erase all fields regardless of the pre-populated values you could do this with an onclick event calling JavaScript. Personally, I would go with option 1 as it will not confuse the user about what the Reset button does. -Original Message- From: Doug Ogateter [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 3:38 PM To: Struts Users Mailing List Subject: reset doesn't work well Hi: I have a problem with reset button. In my jsp file, I have . In my form class, I have: public void reset(ActionMapping mapping, HttpServletRequest request) { amount = null; password = null; } in the struts-config.xml file, it has: type=yyy name=myForm scope=request input=/zzz.jsp I filled out the fields, if I click reset button before submit the form, the fields are cleared. But if I submit the form first, and it detects some error(for example: the password is not correct), the form is showed with error message. In this case, when I click reset button, the fields are not cleared. What is wrong with this. I really want the fields can be cleared if errors are detected. Could someone help me out? Thanks. Doug - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
date format
Hi: I have a problem with date format. I appreciate your help. Using bean:write name=customer property=day /, the web page displayed the day as Sun Nov 30 00:00:00 EST 1980 . To format the day, I added formatKey, so the above tag bean:write tag becomes bean:write name=customer property=day formatKey=customer.day.format/. In my ApplicationResources.properties, I have customer.day.format=dd/mm/. The problem is, after I used the formatKey, it shows me 30/00/1980(the month part becomes 00. It should show me 30/11/1980). I am using struts1.1. Could anyone help me out? Is it the formatKey problem? Thank you very much. Regards, Doug - Post your free ad now! Yahoo! Canada Personals
RE: date format
James: It WORKS! IT'S AMAZING! THANK YOU VERY MUCH! BEST REGARDS, Doug James Childers [EMAIL PROTECTED] wrote:Try customer.day.format=dd/MM/ mm = minutes in hour MM = months -= J -Original Message- From: Doug Ogateter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 9:52 AM To: Struts Users Mailing List Subject: date format Hi: I have a problem with date format. I appreciate your help. Using , the web page displayed the day as Sun Nov 30 00:00:00 EST 1980 . To format the day, I added formatKey, so the above tag bean:write tag becomes property=day formatKey=customer.day.format/. In my ApplicationResources.properties, I have customer.day.format=dd/mm/. The problem is, after I used the formatKey, it shows me 30/00/1980(the month part becomes 00. It should show me 30/11/1980). I am using struts1.1. Could anyone help me out? Is it the formatKey problem? Thank you very much. Regards, Doug - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
Struts and session
Greetings: I am using struts1.1b2 to implement a web application. I have a question regarding to implementing session timeout. When session is invalidated, user who has logged in the system should be forwarded to login page. I am not clear about the followings, and hope someone can help me out. 1. Should I use request.getSession(false) to check if session is timeout? If so, that means for every request, it will check if session is invaildate. Will it cause performance problem? If not, which methods should I call to check it? 2. If I should use request.getSession(false) to check session timeout, where should I write the code? Should I write the code in every action class? 3. There are many methods related to session, such as getCreationTime, getLastAccessedTime,..Where and how should I use them in the implementation? 4.From my understanding, I can set timeout in web.xml or use setMaxInactiveIterval(int ..). Usually which way should be use? 5. After user login, I want to forward the user to the page where he was when session timeout. Where should I save the information(with the information, I know where I should forward the user to)? I searched the archive. However, it seems that I can't find the specific info. Your help is highly appreicated. Doug - Post your free ad now! Yahoo! Canada Personals
Re: Struts and session
Justin: Thank you for reply. That's a good idea. One more question, can filter works with struts? Doug Justin Ashworth [EMAIL PROTECTED] wrote:Hi Doug, We use a javax.servlet.Filter to check for an expired session. I found this idea on some website or in the Struts-User archives and it makes the most sense to me. All requests go through the filter before they hit the servlet, so this is the perfect place to check for whether or not a user is logged in - it's hidden away and it's executed before anything else. Just create a class that implements javax.servlet.Filter. There are three methods to implement in this class, but the real work will be done in the doFilter() method. In doFilter() you can call request.getSession().getAttribute(someAttribute) on an attribute that should always be there if the session is valid, and if it's not there forward them to the login screen (this will be a RequestDispatcher.forward() and not a Struts ActionForward). Your doFilter() method will be specific to your application, but the other two methods you need to implement, getFilterConfig() and setFilterConfig() are just a basic getter and setter for a FilterConfig member variable. Also, it is good practice that if you aren't forwarding back to the login page in your doFilter method, you call filterChain.doFilter(request, response). filterChain is a parameter to this method and represents a chain of filters you have configured in your web.xml file. See the JavaDoc for more info. Your entry for the filter in your web.xml file will look something like this: LoginFilter com.d.p.w.LoginFilter LoginFilter *.do If you plan well you should also be able to figure out which page the user was heading to when their session timed out and pass that back to the login screen so that they go directly to it after login. I can't give an example of this because we haven't implemented it yet. HTH, Justin - Original Message - From: Doug Ogateter To: Struts Users Mailing List Sent: Tuesday, December 17, 2002 9:26 AM Subject: Struts and session Greetings: I am using struts1.1b2 to implement a web application. I have a question regarding to implementing session timeout. When session is invalidated, user who has logged in the system should be forwarded to login page. I am not clear about the followings, and hope someone can help me out. 1. Should I use request.getSession(false) to check if session is timeout? If so, that means for every request, it will check if session is invaildate. Will it cause performance problem? If not, which methods should I call to check it? 2. If I should use request.getSession(false) to check session timeout, where should I write the code? Should I write the code in every action class? 3. There are many methods related to session, such as getCreationTime, getLastAccessedTime,..Where and how should I use them in the implementation? 4.From my understanding, I can set timeout in web.xml or use setMaxInactiveIterval(int ..). Usually which way should be use? 5. After user login, I want to forward the user to the page where he was when session timeout. Where should I save the information(with the information, I know where I should forward the user to)? I searched the archive. However, it seems that I can't find the specific info. Your help is highly appreicated. Doug - Post your free ad now! Yahoo! Canada Personals -- To unsubscribe, e-mail: For additional commands, e-mail: - Post your free ad now! Yahoo! Canada Personals
Struts and session
Greetings: I am using struts1.1b2 to implement a web application. I have a question regarding to implementing session timeout. When session is invalidated, user who has logged in the system should be forwarded to login page. I am not clear about the followings, and hope someone can help me out. 1. Who will invalidate the session when timeout? Servlet container will do it automatically? 2. Should I use request.getSession(false) to check if session is timeout? If so, that means for every request, it will check if session is invaildate. Will it cause performance problem? If not, which methods should I call to check it? 3. If I should use request.getSession(false) to check session timeout, where should I write the code? Should I write the code in every action class? 4. There are many methods related to session, such as getCreationTime, getLastAccessedTime,..Where and how should I use them in the implementation? 5.From my understanding, I can set timeout in web.xml or use setMaxInactiveIterval(int ..). Usually which way should be use? 6. After user login, I want to forward the user to the page where he was when session timeout. Where should I save the information(with the information, I know where I should forward the user to)? I searched the archive. However, it seems that I can't find the specific info. Your help is highly appreicated. Doug
delay user input validate....
Hi, All: I have a problem related to user input validation. I searched on the web, it seems that I couldn't get a clue. Hopefully, you can help me out. I have two screens: screen1 and screen2. The two screens are used for new user registration. On screen1, there are three fields: userName, password and confirmPassword. There is also a Continue button on the screen1.--Validation rule: userName should be unique. password and confirmPassword should be same. On screen2, there are user imformation fields, such as street, city, etc. And there is a Submit button. When user click on Continue on the screen1, the screen2 will be displayed, even though there are input errors on screen1. The validation of the input on screen1 will be delayed until user click Submit button on screen2. If one(or all) of the fields are invalid (on screen1), the screen1 will be displayed with original input, plus relevant error message. If there are also error messages on screen2, their display should be delayed until the user fixed the errors on screen1, click continue to go to screen2(fields on screen2 prepopulated with original input) clicks Submit, in this case, controls back to screen2 with error messgaes and pre-entered data. The above senario is business required. How can I achieve this using struts(1.1.b). I know in struts, we can use actionForm, validation, struts-config.xml, and etc. But how should I combine them together to acheive the above senario. I really need your help. Thank you in advance for your help. Sincerely, Doug
Re: html:errors - how do you make a bulleted error list
My error messages do show up. They show up as one long string. For instance, they would show up like Text of error1. Text of error2. Text of error3 I would like to get this resolved without putting li tags around the messages themselves. thanks, Doug On Wed, 2002-10-09 at 17:37, David Graham wrote: Do any of your error messages show up, or just the header and footer? It will only print the prefix if there are errors to display. Dave From: Doug Bryant [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: html:errors - how do you make a bulleted error list Date: 09 Oct 2002 17:14:14 -0400 Hello, We are trying to display a list of errors at the top of a page. We are trying to make each error bulleted, but are running into difficulty. I looked through the 1.1b2 examples and saw that there were a couple of examples using errors.prefix and errors.suffix to wrap errors in bullet points. However, it's not displaying what I defined there. Does this feature work? What am I doing wrong? Below is what I have defined in my application.properties. The errors.header and errors.footer show up properly. We are using 1.1 beta 2 struts release. Thanks for any help. Doug errors.header=pul errors.footer=/ul/p errors.prefix=li errors.suffix=/li -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:errors - how do you make a bulleted error list
Hello, We are trying to display a list of errors at the top of a page. We are trying to make each error bulleted, but are running into difficulty. I looked through the 1.1b2 examples and saw that there were a couple of examples using errors.prefix and errors.suffix to wrap errors in bullet points. However, it's not displaying what I defined there. Does this feature work? What am I doing wrong? Below is what I have defined in my application.properties. The errors.header and errors.footer show up properly. We are using 1.1 beta 2 struts release. Thanks for any help. Doug errors.header=pul errors.footer=/ul/p errors.prefix=li errors.suffix=/li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Can't retrieve definition for form null
Hi: Has someone got the error Can't retrieve definition for form null before? I am using struts1.1, when I try to open a page which is written in struts, I got the above error. What could cause that error? I checked my form bean, action class, struts-config, it seems everything is there. Thank you for your help. Regards, Doug __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Can't retrieve definition for form null
Steve: Thank you for your reply. What you said is absolutely right. It is happened in my html:form. i have the form defined under that name in the struts-config file. The following is my snippest of my struts-config.xml and html:form tag: form-bean name=myForm type=com.test.TestForm/ actionpath=/test type=com.test.TestAction name=myForm scope=request validate=false input=/test.jsp forward name=successpath=/test.jsp/ /action html:form action=/test.do Is there something wrog with the above code? Thank you. - Original Message - From: Steve Vanspall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, October 02, 2002 9:14 PM Subject: Re: Can't retrieve definition for form null Usually it means that the form that you are referring to is either not defined under that name in the struts-config file, or you are trying to call the form with a null value. Is this happening when in your html:form tag. What does your html:form tag look like? regards Steve - Original Message - From: Doug Dates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 10:51 AM Subject: Can't retrieve definition for form null Hi: Has someone got the error Can't retrieve definition for form null before? I am using struts1.1, when I try to open a page which is written in struts, I got the above error. What could cause that error? I checked my form bean, action class, struts-config, it seems everything is there. Thank you for your help. Regards, Doug __ Post your free ad now! http://personals.yahoo.ca -- 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] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Can't retrieve definition for form null
I tried html:form action=test.do and html:form action=/test, I got same error. I guess I am trying to call the form with a null value. But I can't understand in which case, form can be null. Thanks - Original Message - From: Steve Vanspall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, October 02, 2002 9:14 PM Subject: Re: Can't retrieve definition for form null Usually it means that the form that you are referring to is either not defined under that name in the struts-config file, or you are trying to call the form with a null value. Is this happening when in your html:form tag. What does your html:form tag look like? regards Steve - Original Message - From: Doug Dates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 10:51 AM Subject: Can't retrieve definition for form null Hi: Has someone got the error Can't retrieve definition for form null before? I am using struts1.1, when I try to open a page which is written in struts, I got the above error. What could cause that error? I checked my form bean, action class, struts-config, it seems everything is there. Thank you for your help. Regards, Doug __ Post your free ad now! http://personals.yahoo.ca -- 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] __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How do I forward/redirect to a dynamic url with parameters
How do I redirect to a dynamic url with parameters? I need to forward to some url with a query string that is dynamically created. The url I forward to can change and I also need to create that dynamically. Also, the url I need to forward to is external to our system. I have tried dynamically creating an ActionForward and setting its parameters, but it just blows up with an exception. I have also tried forwarding to a redirector servlet on our system, but have had no success with that either. Is there a proper struts way to do this. Thanks, Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:options
I want to display a dropdown list. The list items are By First Name, By Last Name, By Date. I think I can do it by the following way: html:select size=1 property=choice html:option value=fName By First Name /html:option html:option value=fName By Last Name /html:option html:option value=fName By Date /html:option /html:select Is there any disadvantages to use above approach compared with using html:options...? If I use html:options ... instead of using above individual html:option...,as following: html:select property=choice size=1 html:options collection=%= myArrayList % property=value labelProperty=label/ /html:select where should I set myArrayList? in init method of my servlet class, or in my action form bean, or somewhere else? I am not quite understand it. Could some one please help me? Thank you Doug __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
logic:iterate related issue
Hello: I am developing payment history page(paymentHistory.jsp), The related formBean is called HistoryForm.java, action class is HistoryAction.java In HistoryAction.java, I got all payments(type of Vector) for a user from Database, I use historyForm.setPayments(PAYMENTS, payments) to set payments into historyForm(it is a instance of HistoryForm.java). The following is part of my paymentHistory.jsp, html:form action=/paymentHistory.do name=historyform .. logic:iterate id=aPayment name=historyform property=payments bean:write name=aPayment property=amount/ logic:iterate My question is: do I need to get payments( in the paymentHistory.jsp) first before using it in the line logic:iterate id=aPayment name=historyform property=payments. If I do not need to do anything before using payments in iterate tag, that means the form knows what payments is by itself. Is my understanding correct? Thank you for your help. Doug
Help using Validator running under sub-application
I'm trying to use validator with a sub-application. To test to see if validator could work under sub-applications, I am trying to validate just one field on my DynaValidatorForm, expirationDate. I can load the action/page that I need to validate, add some data to that page, and then submit. When I submit and I have bad data, I keep getting 404 errors, but when I insert valid data, the action successfully forwards to where it is supposed to go. I turned up struts logging to 99 in web.xml to try to see what was going on. Validator appears to be setup correctly. Validator catches the error in the field it needs to validate, then, the uri gets mangled to produce the 404 error. It is trying to forward off to /mySubApp/mySubApp/inputPage.html instead of /mySubApp/inputPage.html. the method internalModuleRelativeForward appears to be what is pre-pending the extra path to the uri. Has anyone ever run across this? Am I doing something incorrectly? I changed the input to the action (editEtoRfq) that is getting validated serveral times to try to resolve the issue, with not success. I have put the validator plugin in both the struts-config.xml and the struts-config-eto.xml (not at the same time) with no luck. Below is how my actions are setup. Thanks very much for any feedback. Thanks, Doug !-- action that we forward to to populate page data -- action path=/editEtoRfq type=org.scra.emall.web.eto.actions.EditEtoRfqAction scope=request name=etoRfqForm input=/eto/editEtoRfq.jsp forward name=success contextRelative=true path=/eto/editEtoRfq.jsp/ /action !-- validating action for that page - where editEtoRfq.jsp submits to -- action path=/saveEtoRfq type=org.scra.emall.web.eto.actions.SaveEtoRfqAction scope=request name=etoRfqForm input=/eto/editEtoRfq.jsp parameter=save validate=true forward name=success contextRelative= true path=/eto/listEto.do/ /action -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Status of Validator not validating sub-applications bug (#10348)
Does anyone know the status of the bug about the validator not validating sub-applications? I noticed that bug mentioned in the 1.1 beta 2 release notes. We have developed an application using 1.1 and are getting ready to implement page level validation for our sub-applications. If no fix is in place or a fix will not be in place any time soon, could you suggest workaround for the bug or a place to start looking at the source. I should mention that we are using dynaforms so there is not validate method on the action to override. Thanks very much in advance. Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems with file upload - Urgent Please
We had the same problem running a nightly struts build. We upgraded to 1.1 beta 2 and the problem disappeared. It appeared to be a problem specifying the form as multi-part. Doug On Wed, 2002-09-04 at 15:58, Venkateswaran Muthuswamy wrote: Hi, I am working in a project using struts and weblogic. The Action is called fine, and the file (Uploading file) gets written to disk - however when forwarding to the display I get the Following Exception Sep 4, 2002 3:44:14 PM EDT Error HTTP [WebAppServletContext(2292995)] Servlet failed with ServletException javax.servlet.ServletException: Original request not available at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:115) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:972) at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:408) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Can anybody help me. This is urgent please. Ever Friendly, M.Venkateswaran A lifes worth, in the end, isnt measured in hours, or dollars. Its measured by the amount of love exchanged along the way _ Chat with friends online, try MSN Messenger: http://messenger.msn.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]
A good nightly build to start developing against
We are going to begin a new project tomorrow using struts and need to use the sub-applications functionality and thus the SwitchAction class which does not appear to be included in the Beta 1 release. Can someone point me to a generally more or less stable nightly build that includes this functionality. Thanks, Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Using onclick within iterate tag - Thanks
Hi Les, Thanks for helping out with your example. It looks good, I will try it out later. Doug -Original Message- From: Wilson, Les J SI-FSIA [mailto:[EMAIL PROTECTED]] Sent: 14 May 2002 10:43 To: 'Struts Users Mailing List' Subject: RE: Using onclick within iterate tag -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Using onclick within iterate tag
Hi, I am using onclick event handler on a checkbox tag within a iterate tag, since there is going to be multiple checkbox tags can someone please tell me how I can pass the identifier of the checkbox that has fired the onclick event to the JavaScript function specified in the onclick. Thanks. Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Using onclick within iterate tag
Hi again, Many thanks James for helping us out, that works great. Apologies for not asking the question properly first time around. But is it possible to also pass the position of the checkbox that has been clicked so that the JavaScript function could be used to control other checkbox tags within the iterate tag. Thanks again. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:10 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag try this... html:checkbox property=checkBox1 onclick=JavaScript:handleCheckbox(this)/Check 1br html:checkbox property=checkBox2 onclick=JavaScript:handleCheckbox(this)/Check 2br html:checkbox property=checkBox3 onclick=JavaScript:handleCheckbox(this)/Check 3br html:checkbox property=checkBox4 onclick=JavaScript:handleCheckbox(this)/Check 4br SCRIPT LANGUAGE=javascript !-- function handleCheckbox(obj){ alert(obj.name); } //-- /SCRIPT JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:31 AM To: [EMAIL PROTECTED] Subject: Using onclick within iterate tag Hi, I am using onclick event handler on a checkbox tag within a iterate tag, since there is going to be multiple checkbox tags can someone please tell me how I can pass the identifier of the checkbox that has fired the onclick event to the JavaScript function specified in the onclick. Thanks. Doug -- 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: Using onclick within iterate tag
Sorry, I meant the position within the iterator. Within the JSP there is two checkbox tags for each iteration and I need to only enable the second checkbox if the first has been checked. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:53 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag When you mean position do you mean position within the iterator or position on the page??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:47 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Hi again, Many thanks James for helping us out, that works great. Apologies for not asking the question properly first time around. But is it possible to also pass the position of the checkbox that has been clicked so that the JavaScript function could be used to control other checkbox tags within the iterate tag. Thanks again. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:10 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag try this... html:checkbox property=checkBox1 onclick=JavaScript:handleCheckbox(this)/Check 1br html:checkbox property=checkBox2 onclick=JavaScript:handleCheckbox(this)/Check 2br html:checkbox property=checkBox3 onclick=JavaScript:handleCheckbox(this)/Check 3br html:checkbox property=checkBox4 onclick=JavaScript:handleCheckbox(this)/Check 4br SCRIPT LANGUAGE=javascript !-- function handleCheckbox(obj){ alert(obj.name); } //-- /SCRIPT JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:31 AM To: [EMAIL PROTECTED] Subject: Using onclick within iterate tag Hi, I am using onclick event handler on a checkbox tag within a iterate tag, since there is going to be multiple checkbox tags can someone please tell me how I can pass the identifier of the checkbox that has fired the onclick event to the JavaScript function specified in the onclick. Thanks. Doug -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Using onclick within iterate tag
What I am using the JSP to do is display the list of my personal contacts. So I am using the iterate tag to retrieve the list of personal contact objects from my Form bean. Within the iterate tag I display the name etc. The two checkbox tags on each row of the table are used to set one or more of the returned contacts to a supervisor and if so enable the other checkbox to lock the contact's account. So I need the checkbox tags to be within the iterate tag. Thanks again James for taken time out to answer my question, its much appreciated. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:07 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag I guess I need a bit more info to properly answer/stab-at your question. I assume that you know what the two checkboxes will always be. -Why not just put the two on your jsp and not iterate over them. Or for a more generic approach, say you are writing your own custom taglib like. myapp:conditionalCheckbox property=MyMapOfChecks or something like thatand this taglib would write out the html necessary to make the second box (or more) disabled/enabled based on the 1st value. Am I way off here??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:56 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Sorry, I meant the position within the iterator. Within the JSP there is two checkbox tags for each iteration and I need to only enable the second checkbox if the first has been checked. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:53 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag When you mean position do you mean position within the iterator or position on the page??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:47 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Hi again, Many thanks James for helping us out, that works great. Apologies for not asking the question properly first time around. But is it possible to also pass the position of the checkbox that has been clicked so that the JavaScript function could be used to control other checkbox tags within the iterate tag. Thanks again. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:10 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag try this... html:checkbox property=checkBox1 onclick=JavaScript:handleCheckbox(this)/Check 1br html:checkbox property=checkBox2 onclick=JavaScript:handleCheckbox(this)/Check 2br html:checkbox property=checkBox3 onclick=JavaScript:handleCheckbox(this)/Check 3br html:checkbox property=checkBox4 onclick=JavaScript:handleCheckbox(this)/Check 4br SCRIPT LANGUAGE=javascript !-- function handleCheckbox(obj){ alert(obj.name); } //-- /SCRIPT JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:31 AM To: [EMAIL PROTECTED] Subject: Using onclick within iterate tag Hi, I am using onclick event handler on a checkbox tag within a iterate tag, since there is going to be multiple checkbox tags can someone please tell me how I can pass the identifier of the checkbox that has fired the onclick event to the JavaScript function specified in the onclick. Thanks. Doug -- 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] -- 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: Using onclick within iterate tag
Hi Adam, You are right, I do have 2 checkbox tags per iteration. Sorry for the confusion. Doug -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:35 To: Struts Users Mailing List Subject: Re: Using onclick within iterate tag I think Doug means he has 2 chkboxes per iteration. James Mitchell wrote: I guess I need a bit more info to properly answer/stab-at your question. I assume that you know what the two checkboxes will always be. -Why not just put the two on your jsp and not iterate over them. Or for a more generic approach, say you are writing your own custom taglib like. myapp:conditionalCheckbox property=MyMapOfChecks or something like thatand this taglib would write out the html necessary to make the second box (or more) disabled/enabled based on the 1st value. Am I way off here??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:56 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Sorry, I meant the position within the iterator. Within the JSP there is two checkbox tags for each iteration and I need to only enable the second checkbox if the first has been checked. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:53 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag When you mean position do you mean position within the iterator or position on the page??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:47 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Hi again, Many thanks James for helping us out, that works great. Apologies for not asking the question properly first time around. But is it possible to also pass the position of the checkbox that has been clicked so that the JavaScript function could be used to control other checkbox tags within the iterate tag. Thanks again. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:10 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag try this... html:checkbox property=checkBox1 onclick=JavaScript:handleCheckbox(this)/Check 1br html:checkbox property=checkBox2 onclick=JavaScript:handleCheckbox(this)/Check 2br html:checkbox property=checkBox3 onclick=JavaScript:handleCheckbox(this)/Check 3br html:checkbox property=checkBox4 onclick=JavaScript:handleCheckbox(this)/Check 4br SCRIPT LANGUAGE=javascript !-- function handleCheckbox(obj){ alert(obj.name); } //-- /SCRIPT JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:31 AM To: [EMAIL PROTECTED] Subject: Using onclick within iterate tag Hi, I am using onclick event handler on a checkbox tag within a iterate tag, since there is going to be multiple checkbox tags can someone please tell me how I can pass the identifier of the checkbox that has fired the onclick event to the JavaScript function specified in the onclick. Thanks. Doug -- 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] -- 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: Using onclick within iterate tag
You have hit the nail on the head. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:42 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Ok, so you want to disable the second box (by default) and then if the user selects the first box, then allow the second to be selected. And this is all done over and over again in a list of contacts. JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 12:31 PM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag What I am using the JSP to do is display the list of my personal contacts. So I am using the iterate tag to retrieve the list of personal contact objects from my Form bean. Within the iterate tag I display the name etc. The two checkbox tags on each row of the table are used to set one or more of the returned contacts to a supervisor and if so enable the other checkbox to lock the contact's account. So I need the checkbox tags to be within the iterate tag. Thanks again James for taken time out to answer my question, its much appreciated. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:07 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag I guess I need a bit more info to properly answer/stab-at your question. I assume that you know what the two checkboxes will always be. -Why not just put the two on your jsp and not iterate over them. Or for a more generic approach, say you are writing your own custom taglib like. myapp:conditionalCheckbox property=MyMapOfChecks or something like thatand this taglib would write out the html necessary to make the second box (or more) disabled/enabled based on the 1st value. Am I way off here??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:56 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Sorry, I meant the position within the iterator. Within the JSP there is two checkbox tags for each iteration and I need to only enable the second checkbox if the first has been checked. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:53 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag When you mean position do you mean position within the iterator or position on the page??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:47 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Hi again, Many thanks James for helping us out, that works great. Apologies for not asking the question properly first time around. But is it possible to also pass the position of the checkbox that has been clicked so that the JavaScript function could be used to control other checkbox tags within the iterate tag. Thanks again. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:10 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag try this... html:checkbox property=checkBox1 onclick=JavaScript:handleCheckbox(this)/Check 1br html:checkbox property=checkBox2 onclick=JavaScript:handleCheckbox(this)/Check 2br html:checkbox property=checkBox3 onclick=JavaScript:handleCheckbox(this)/Check 3br html:checkbox property=checkBox4 onclick=JavaScript:handleCheckbox(this)/Check 4br SCRIPT LANGUAGE=javascript !-- function handleCheckbox(obj){ alert(obj.name); } //-- /SCRIPT JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:31 AM To: [EMAIL PROTECTED] Subject: Using onclick within iterate tag Hi, I am using onclick event handler on a checkbox tag within a iterate tag, since there is going to be multiple checkbox tags can someone please tell me how I can pass the identifier of the checkbox that has fired the onclick event to the JavaScript function specified in the onclick. Thanks. Doug -- 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: Using onclick within iterate tag
Hi again, The form I am using extends the basic ActionForm class. -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:49 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Ok, then you will probably be needing to use indexed properties. I am trying to gather a bit of working code for you. I should be finished shortly. In the meantime, take a look at using indexed properties. Also, are you using the DynaActionForm??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 12:43 PM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag You have hit the nail on the head. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:42 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Ok, so you want to disable the second box (by default) and then if the user selects the first box, then allow the second to be selected. And this is all done over and over again in a list of contacts. JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 12:31 PM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag What I am using the JSP to do is display the list of my personal contacts. So I am using the iterate tag to retrieve the list of personal contact objects from my Form bean. Within the iterate tag I display the name etc. The two checkbox tags on each row of the table are used to set one or more of the returned contacts to a supervisor and if so enable the other checkbox to lock the contact's account. So I need the checkbox tags to be within the iterate tag. Thanks again James for taken time out to answer my question, its much appreciated. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:07 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag I guess I need a bit more info to properly answer/stab-at your question. I assume that you know what the two checkboxes will always be. -Why not just put the two on your jsp and not iterate over them. Or for a more generic approach, say you are writing your own custom taglib like. myapp:conditionalCheckbox property=MyMapOfChecks or something like thatand this taglib would write out the html necessary to make the second box (or more) disabled/enabled based on the 1st value. Am I way off here??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:56 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Sorry, I meant the position within the iterator. Within the JSP there is two checkbox tags for each iteration and I need to only enable the second checkbox if the first has been checked. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:53 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag When you mean position do you mean position within the iterator or position on the page??? JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 11:47 AM To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag Hi again, Many thanks James for helping us out, that works great. Apologies for not asking the question properly first time around. But is it possible to also pass the position of the checkbox that has been clicked so that the JavaScript function could be used to control other checkbox tags within the iterate tag. Thanks again. Doug -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 16:10 To: Struts Users Mailing List Subject: RE: Using onclick within iterate tag try this... html:checkbox property=checkBox1 onclick=JavaScript:handleCheckbox(this)/Check 1br html:checkbox property=checkBox2 onclick=JavaScript:handleCheckbox(this)/Check 2br html:checkbox property=checkBox3 onclick=JavaScript:handleCheckbox(this)/Check 3br html:checkbox property=checkBox4 onclick=JavaScript:handleCheckbox(this)/Check 4br SCRIPT LANGUAGE=javascript !-- function handleCheckbox(obj){ alert(obj.name); } //-- /SCRIPT JM -Original Message- From: Doug Mclellan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:31 AM To: [EMAIL PROTECTED] Subject: Using onclick within iterate tag Hi, I am
enable/disable multibox help
Hi, Within my jsp I have logic:iterate tag and within this tag I have two html:multibox tags. The question is can I use the JavaScript event handlers within the first multibox to enable/disable the second multibox. If this is possible I would much appreciate any help in pointing me in the right direction. Thanks. Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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: Struts and multiple Web applications on same application server
We have run into this problem running jdk 1.4 rc3. When we switch to 1.3, the problem goes away Hope this helps. Doug -Original Message- From: Dustin Aleksiuk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 22, 2002 10:40 AM To: Struts Users Mailing List Subject: Re: Struts and multiple Web applications on same application server I just wanted to let you know that the exact same problem drove me nuts 2 years ago with Weblogic 5.1. I'm sorry you are having that problem, but you brought back many funny memories of us pulling our hair out over it. I don't remember if we ever solved it. When I left that company we had moved to Tomcat. Dustin Aleksiuk Salonen, Aki wrote: Thanks for idea of eliminating chance of a struts problem. Do you mean to say, when you make a request context1/location/page.jsp and context2/location/page.jsp you get the same page even if you update context1 and not context2? Yes. This is the way it works. This is definetly a BEA WebLogig 6.2 problem. I configured test.jsp pages to both applications. context1/location/test.jsp and context2/location/test.jsp. And added entries to web.xml defining test.jsp as servlet with pattern *.test, so every request ending with .test would be directed for test.jsp. What happened was that I modified test.jsp file in both applications to ensure recompiling. Then started up WebLogic. Then I accessed context1/location/test.test with browser, resulting WebLogic to compile test.jsp. After that when I accessed context2/location/test.test result was the one produced by context1/location/test.jsp. So the one that is compiled first after startup or deploying, will be used to produce response. This apperars in both cases with startup and re-deploying, so I think this is actually related to application deploying which is also part of startup. At this point no matter how many times I try to refresh browser and no matter web context I access, I receive result of the first compiled jsp page. When I modify or touch context2/location/test.jsp so that modified timestamp changes resulting weblogic to compile jsp page, and after that access context2/location/test.test result is OK, produced by context2/location/test.jsp. After many tests it is obvious that WebLogic works right when first page is compiled and after that the second will be modified to forse re-compiling. Now both URL's context1/location/test.test and context2/location/test.test produce their own content. Problem appears when application is deployed and JSP files are modified, resulting only first JSP accessed (compiled) to produce content for both web applications context2/location/test.test. Kind regards, Aki -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: 21. tammikuuta 2002 22:15 To: Struts Users Mailing List Cc: Salonen, Aki Subject: RE: Struts and multiple Web applications on same application server Do you mean to say, when you make a request context1/location/page.jsp and context2/location/page.jsp you get the same page even if you update context1 and not context2? Seems like a server problem to me. You should be able to remove struts from the equation by creating a simple .jsp page without using any struts tags. Besides, I don't think that the struts servlet gets involved with every request you make. Only requires that have the mapping specified to map to the servlet in web.xml (usually something with the .do) extension get mapped to the servlet (I could be wrong, I have not used it for too long). -AP_ -Original Message- From: Salonen, Aki [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 2:09 AM To: '[EMAIL PROTECTED]' Subject: Struts and multiple Web applications on same application server Hello, We have been facing problems when using struts with multiple enterprise applications. It seems that struts supports only one struts application on same application server. Application server we are using is BEA WebLogic 6.2 SP2. Scenario is as described: One enterprise application containing for EJB:s providing business logics. Two enterprise applications containg two distinct user interfaces for business logics. We use same action servlet classes in both web applications, inherited from Struts ActionServlet. Web application context roots are of course different, but relative URL's used are same for both web applications. So web.xml and struts-config.xml are exact copies. Both web applications have own physical copies of all jars used. If I have understood right, two distinct enterprise applications should have no knowledge of each other, so there should be own instaces of struts for each enterprise application. What happens is that server returns responses (JSP generated pages), like there would be only one web application. Also JSP-page
RE: upload fails
make sure your form tag sets the encoding type to multi-part html:form action=/saveReferences.do enctype=multipart/form-data Hope this helps. Doug -Original Message- From: SCHACHTER,MICHAEL (HP-NewJersey,ex2) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 10:58 AM To: 'Struts Users Mailing List' Subject: RE: upload fails Ken, Do you have a corresponding ActionForm containing these methods: public FormFile getFormFile(); public void setFormFile(FormFile file); -Original Message- From: Domen, Ken [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 12:20 PM To: '[EMAIL PROTECTED]' Subject: upload fails I'm trying to do a simple file upload and my jsp has this snippet: html:file property=formFile/br html:submit / When I submit, I get the error: IllegalArgumentException: Argument Type Mismatch Am I missing something? thanks. -- 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: struts-config.xml-Is there a tool to find errors in it?
I use xmllint. It is very simplistic, but works well. It comes as part of the gnome xml library, but you can download the sources and compile with cygwin on windows if you need to run it there. homepage at http://xmlsoft.org/ Sources at ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/ hope this helps. Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 2:14 AM To: Struts Users Mailing List Subject: struts-config.xml-Is there a tool to find errors in it? Hi I have an error with my struts-config.xml file and I cannot find where the error is. Is there a tool which will help me track down where the error is, the messages in the tomcat log files are not very helpful in tracking down the error. Cheers Tony -- 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: AW: Struts vs. JADE (from IBM) - feature and usability comparison- need help!
Also, Struts is bundled with WAS 4.0 and used to build their web-based admin tools. I'd say that's quite an endorsement from Big Blue. Doug D. Veniseleas venisele@uni-duess To: '[EMAIL PROTECTED]' eldorf.de [EMAIL PROTECTED] cc: 09/07/2001 01:05 AM Subject: AW: Struts vs. JADE (from IBM) - Please respond to feature and usability comparison - need help! struts-user Hi, in their Redbook for the Websphere Appl-Server they describe struts in detail. I had the impression, they liked struts. Dimitris -Ursprüngliche Nachricht- Von: Esterkin, Alex [SMTP:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 6. September 2001 19:49 An: [EMAIL PROTECTED] Betreff: Struts vs. JADE (from IBM) - feature and usability comparison - need help! Wichtigkeit: Hoch Hello, There has emerged a new proprietary MVC framework called JADE and developed and promoted by IBM Consulting National Practice people. I sense it is inferior in comparison to Struts, but I don't have enough information about JADE, and IBM is liked very much at my firm. I need to quickly prepare a detailed feature for feature technical comparison. I wonder whether there are people on this discussion board, who are familiar with JADE, and who could share their opinions or insights in this regards. Thanks!!! Best regards, Alex Esterkin Fidelity Investments E-mail: [EMAIL PROTECTED] =
Re: Mainatinig Select list state
I have done this. The reason the contents of the select boxes aren't saved when you come back is that all of the options aren't sent to the server, only the selected one is. I use one html:hidden / field for every element of each select box. When the form loads, I populate the select boxes with JavaScript by reading the hidden fields. Then, when the user moves something from one select to the other, I write that change to the hidden fields with JavaScript. Then, when the form is submitted, the current state is stored in hidden fields, and will be properly restored when Struts returns you to the form again. It requires some interesting JavaScript to move things around as they should be, and enough placeholder hidden fields to contain all possible options from either select box. The other alternative would be to use html:select multiple=true /, and then use an onSubmit() JavaScript method to select all of the options in both select boxes. Then, all elements of the select boxes will be sent to the server, and should be maintained by Struts. This would be simpler than the earlier suggestion, but, it won't work if you don't want to set multiple=true. Good luck, Doug Vinay Cerejo vinay.cerejo@xo To: '[EMAIL PROTECTED]' riant.com [EMAIL PROTECTED] cc: 09/06/2001 01:41 Subject: Mainatinig Select list state AM Please respond to struts-user HI, I have two select lists, one filled with data and the other empty Lets call the filled list as AllElements and the empty list as UserElements AllElementsUserElements -- --- | element1| | | | element2||| | element3|| | | element4||| --- The user selects items from AllElements and moves them to UserElements and then submits the form. Now when any validation error in the Form bean. i throw the user back to the same form But my user selections have been lost. How do i maintain these. Ofcourse i can maintain it by doing some coding to retreive all elements again from the database and using the request attributes and filtereing the selected ones etc, but is there no support from struts for maintaing state in such scenario?? many Thanks, Vinay
Action.ERROR_KEY problem
Hello, I have a form in Struts which has a drop-down select list where the options are populated by a bean that reads the options from a database. On the form JSP, I use: jsp:useBean id=formData scope=request class=com.eviciti.struts.test.GetQueryFormDataBean jsp:setProperty name=formData property=datasourceName value=%= application.getInitParameter (mainDataSourceName) % / /jsp:useBean Within this bean, I have defined an ActionError field that is null unless some error occurs within the bean. So, this block of code will show the error: logic:present name=formData property=strutsError scope=request bean:define id=ERROR name=formData property=strutsErrors scope=request type=org.apache.struts.action.ActionErrors / % request.setAttribute(org.apache.struts.action.Action.ERROR_KEY, ERROR); % /logic:present With the above structure, the html:errors / tag happily sees any errors. However, I have to use a JSP scriptlet, as you can see, to associate the ActionErrors object with the proper key name. The reason for this is that the actual Action.ERROR_KEY name is: org.apache.struts.action.ERROR, and that isn't a valid Java variable name -- so I can't use it in the id parameter of the bean:define tag. So, I'm wondering ... why isn't Action.ERROR_KEY delimited by underscores or something that would make it a legal var name? Or, is there some other way to do this that I'm missing? Thanks, Doug
RE: using struts in a load-balanced environement
thanks for all your great advice! -Original Message- From: Doug Wright [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 4:50 PM To: [EMAIL PROTECTED] Subject: using struts in a load-balanced environement I am very curious about whether the struts framework could be applied in a 'load-balanced' or 'webserver-farm' environment. One of the main requirements of the application I am currently working on is that it function properly in such a distributed or load-balanced environment where each request may or may not come from the same web server. This obviously precludes us from using session and application scopes in the application. We have been using the database to maintain state, but it seems like a very inefficient and dirty solution. I would love to be able to use the model 2 architecture (and specifically the struts framework), but it seems like most of the benefits can only be had in an environment where the same web server will be used for each request (our load-balancers support 'sticky-sessions' but these rely on cookies and we don't want cookies to be a requirement for using the application). Am I missing something? Is there a way to effectively use struts and the session and application scope in a load-balanced environment? I greatly appreciate any advice that anyone has on this subject. ---DougWright
using struts in a load-balanced environement
I am very curious about whether the struts framework could be applied in a 'load-balanced' or 'webserver-farm' environment. One of the main requirements of the application I am currently working on is that it function properly in such a distributed or load-balanced environment where each request may or may not come from the same web server. This obviously precludes us from using session and application scopes in the application. We have been using the database to maintain state, but it seems like a very inefficient and dirty solution. I would love to be able to use the model 2 architecture (and specifically the struts framework), but it seems like most of the benefits can only be had in an environment where the same web server will be used for each request (our load-balancers support 'sticky-sessions' but these rely on cookies and we don't want cookies to be a requirement for using the application). Am I missing something? Is there a way to effectively use struts and the session and application scope in a load-balanced environment? I greatly appreciate any advice that anyone has on this subject. ---DougWright
RE: Antwort: RE: Running and debugging with Oracle JDeveloper
I don't have JDeveloper, but I do have Borland JBuilder which is almost the same thing. We just got the example working with JBuilder 4 and the big trick was we had to manually copy the ApplicationResources.properties file to the output folder where the class files are created. Even though it was in the JBuilder project, it was not copied to the output folder. Under Tomcat this file is copied automatically. Doug Park -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 3:55 AM To: [EMAIL PROTECTED] Subject: Antwort: RE: Running and debugging with Oracle JDeveloper Hello Sean, the option is set correctly - if I run the application under Tomcat, everything works fine. Is there any option to be set in JDeveloper to let it work correctly? Thanks for your answer so far. Regards Michael I recently had this problem and it was due to the "application" parameter option in the web.xml file not pointing to a valid resource file -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 10:40 AM To: [EMAIL PROTECTED] Subject: Running and debugging with Oracle JDeveloper Hello, has anyone successfully achieved to run/debug a web application based on struts using Oracle JDeveloper 3.2.2? If I run/debug my application I get the following error message: javax.servlet.jsp.JspException: Missing resources attribute org.apache.struts.action.MESSAGE void index._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse [...]
Re: Weblogic 510 struts
I guess your want to run the struts example application ... Please see the message "Re: Null Pointer Exception in Struts 0.5 example" by Alain Bienvenue. The basic problem is, that WLS 510 does not honor the "load-on-startup" attribute. This means that ActionServlet will not be properly initialized. One possible solution is to make a fake request to ActionServlet before any other processing. I've successfully worked around the problem by reconfiguring struts to "lazy initialize" itself, meaning that every servlet first runs an init method, which then checks the config and initializes it as necessary. This way the application is no longer dependant on the order in which the servlets initialize. Sure, the check adds a small amount of overhead, but it truely is negligable. -- He who pursues learning will increase every day; He who pursues The Eternal will decrease every day. He will decrease and continue to decrease, Till he comes at non-action; By non-action everything can be done. Lao-Tzu (fl. B.C. 600) Chinese Philosopher - Founder of Taoism
RE: Weblogic 510 struts
calling the .do directly worked. Grr .. just a tad bit frustrating. What did you do exactly? This sounds like a nice and really simple work around. -- He who pursues learning will increase every day; He who pursues The Eternal will decrease every day. He will decrease and continue to decrease, Till he comes at non-action; By non-action everything can be done. Lao-Tzu (fl. B.C. 600) Chinese Philosopher - Founder of Taoism
RE: Weblogic 510 struts
That looks more like a classpath problem. Is the struts jar in listed in the weblogic servlet classpath, weblogic.httpd.servlet.classpath (in weblogic.properties)? On Wed, 27 Dec 2000, Sharon Curlee wrote: well, I spoke too soon. All I did was called action.do directly. It did well in bringing up the index.jsp, but when I try and called another .do, it blew up. I am back to this error. (and I called a .do in the URL before running it) Wed Dec 27 14:46:43 EST 2000:I WebAppServletContext-prototype action: Processing a GET for /addLoad Wed Dec 27 14:46:43 EST 2000:E WebAppServletContext-prototype Servlet failed with Exception java.lang.NoClassDefFoundError: org/apache/struts/util/PropertyUtils at com.elogex.web.taglib.logic.NullPropertyCheck.doStartTag(NullPropertyChe ck.java:103) -Original Message- From: Doug Bateman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 27, 2000 2:45 PM To: [EMAIL PROTECTED] Subject: RE: Weblogic 510 struts calling the .do directly worked. Grr .. just a tad bit frustrating. What did you do exactly? This sounds like a nice and really simple work around. -- He who pursues learning will increase every day; He who pursues The Eternal will decrease every day. He will decrease and continue to decrease, Till he comes at non-action; By non-action everything can be done. Lao-Tzu (fl. B.C. 600) Chinese Philosopher - Founder of Taoism
Question about errors tag
I've noticed a potential problem with the way errors are handled, and the ErrorsTag class. I'm assuming I'm missing something. (I'm new to Struts) Picture the following: A jsp page, login.jsp. It has a form. An action class, LoginAction.java. A form class, LoginForm.java. LoginAction does exactly what you would expect. It checks the database for the user and password. If the user or password is invalid, it loads a message into errors, and then calls saveErrors() in ActionBase. The difference in what I'm doing vs. the Struts examples is that, rather than using forward functionality to return back to login.jsp on errors, I'm using redirect instead. I don't want the URL in the browser to be login.do. You see the problem. Errors are stored to the request context, which is no longer valid after the redirect, therefore the errors tag can not retrieve the errors. I would suggest that session context should be used for the errors tag for cases just like this, although that causes problems as well. The problem will be, when does it get removed from the session? Is there another way to accomplish the same thing, without tacking the error on to the redirect URL? Thanks, Doug --- Doug Ahmann Macromedia, Inc. (612) 840-9544
Question about localization
Greetings, I don't know a lot about localization, so I'm hoping you wise men and women out there can point me in the right direction. Here is what we need to accomplish: The server we're creating needs to be usable simultaneously by multiple users in multiple languages. Our app uses Struts/JSP and the Model 2 architecture. What is the "best practice" or the "correct" Java/Struts way of accomplishing this? Is there a way to use the same JSP pages, or is it best to have multiple contexts (/en/, /fr/, etc)? Thanks, Doug --- Doug Ahmann Macromedia, Inc. (612) 840-9544