Reload struts-config.xml
Hello, In Tiles, it can be reloaded the tiles-config.xml by using its reload action, is there any same action for reloading the struts-config.xml ? Eric == If you know what you are doing, it is not called RESEARCH! == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (job) Java - San Francisco - contract to hire
On Wed, 28 Jul 2004 16:33:28 -0700, Dave Lloyd [EMAIL PROTECTED] wrote: Please send resumes to [EMAIL PROTECTED] Contract to hire (or long-term consulting) so work authorization is a criteria. 3 different roles, with a financial institution in San Francisco. J2EE Developers to work on high-transaction online application for customer service agents. Desirable candidates should have at least 5 years Java experience and 3 years J2EE experience working with web applications based on MVC frameworks like struts. Must have Oracle and PL/SQL background. Successful candidates will be those whom demonstrate strong skills in: Core Java, Servlets, JDBC, XML including JAXP and JAXB. Struts with XSL presentation and Enterprise patterns like business objects and data access objects. Oracle 8/9i, PL/SQL, SQL, and Object/Relational Databases. Ant, log4j, JUnit, HttpUnit and CVS or Clearcase. Web services, XSL and DHTML as a plus Sr. Java and Oracle PL/SQL Back-End Batch Processor Developer Must-Have Skills: Need batch and database experts: Java (not J2EE but core Java skills) JDBC, Multi-Threading Very heavy Oracle JDBC Programming PL/SQL, performance tuning using SQL trace, TKPROF and explain plan Database side is Oracle, PL/SQL and SQL knowledge. Oracle 9i a big plus but you must understand database technology. Must have strong background with large transactions volumes high availability. Must be a senior person who can make their own decisions and work independently Java/MQ Series Our Software Engineering team is seeking a highly motivated, self-directed, senior Java developer to develop and maintain bank's message center. The work involves a strong understanding of the software development lifecycle (SDLC), architectural design/patterns, system integration, and Java programming in a multi-tiered UNIX/NT environment. This candidate will participate in all phases of the software development life cycle - requirements analysis, development, testing, and implementation. The responsibilities of this position will involve: * Lead or contribute to architecture / technical design discussions * Lead or contribute to code reviews and technical design/specifications * Lead or contribute to development of custom code * Documenting design ideas using architecture and design templates and * Contribute to the review and analysis of business requirements * Create, maintain, and present technical documentation to different audiences and levels * Perform technical assessments and sizing * Work with and coordinate activities with other development, architecture, and product development teams * Work with 3rd party vendor on technical design/specifications, development, testing and deployment to ensure the product meets the bank's requirements The successful candidate: * Must be a team player who understands the importance of teamwork, collaboration, and open communication. * Be able to effectively work with senior architects, systems engineers, and product development. * Embrace process and willing to utilize software development lifecycle methodology and best practice * Be able to articulate and document his/her ideas. * Must be able to interpret and translate complex business requirements into clear technical solutions and specifications. * Must have an excellent understanding and hands-on experience with design and development best practices. * Have a true passion for excellence in his/work work, is detailed-oriented, thorough, and follows through on commitments. Minimum Requirements: Qualifications: Bachelor's Degree and/or Master's Degree in Computer Science, Mathematics or Statistics required 10+ years programming experience - 5+ years Java development Strong hands-on expertise in system integration with 3rd party products, Java, Relational Database programming (Oracle 8 9i), MQ series and Web Services Experience with financial systems and working with large complex systems preferred Required Skills: Hands-on expertise with Object-Oriented Design and Development, JAVA, XML, Struts framework, Web Logic, MQ Series, Web Services, JDBC, PL/SQL, multi-threading, and relational databases (Oracle preferred) Experience in working with Vendors on 3rd party products Experience in using various software configuration management tools ( ClearCase) Experience with design patterns Experience with UML design and experience using modeling tools Willingness to mentor, have strong analytical, technical documentation, and communication skills. Able to work independently in a fast-paced, dynamic environment. Experience leading development teams through large, complex system/application development preferred. Experience using RUP a plus Excellent communication skill (both verbal
Database connectivity
Dear sir(s), I tried to connect to the database at 192.168.1.1:/crm through by configuring struts-config.xml. this is actualy my local system. I am using postgresql as my database back end. it is running on the default port of postgresql 5432. I am using pgjdbc.jar(for org.postgrsql.Driver). I had configured eclipse to use this driver and also copied pgjdbc.jar,commons-dbcp-1.2.1.jar,commopns-dbutils.jar etc. but when i executed the application(I am using tomcat) it shows an error null pointer exception in the LogonAction.java how this can be overcame? Thanking You, vineesh [EMAIL PROTECTED]
RE: I suspect this is a bad idea...so what's a better one?
Craig, Thanks for the idea. Only problem I see with this that I usually make my real actions some flavor of a DispatchAction, usually a MappingDispatchAction. So to keep that type of functionality, it appears that I'd have to replicate a lot of the Struts dispatch/reflection logic inside of my abstract Action subclass. Calling super.execute() gets me that, but that is precisely what this concept seems to try to avoid. :-/ -Original Message- :snip: A useful design pattern for something like this is to create a common subclass for your actions that does the setup/teardown work in the execute() method, and then delegates to the action-specific work in some other method. For your scenario, it might look like this: public abstract class BaseAction extends Action { public ActionForward execute(...) throws Exception { Persistence persistence = ActionHelper.getPersistenceObject(request); try { ActionForward forward = delegate(mapping, form, request, response, persistence); } finally { persistence.release)(; } } protected abstract ActionForward delegate(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Persistence persistence) throws Exception; } Then, your real business logic is implemented in a delegate() method that is passed in for you, and you never have to remember to allocate and release the persistence object. public class RealAction extends BaseAction { protected ActionForward delegate(...) { ... use the persistence object as needed ... } } This is pretty close to what you've got now ... the key difference is that it uses a local variable instead of an instance variable to avoid sharing problems. Also, because of the finally clause, it also ensures that the persistence object is cleaned up, even if the delegate() method throws an exception. Craig - 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]
File upload warning
Hi, File upload throws a warning One of the getParameter family of methods called after reading from the ServletInputStream. Not merging post parameters. Any idea why this would be happening ?. Is there a way to avoid this ?. Any help in this regard is appreciated. Thanks, Deepak
OptionsCollectionTag with ActionForm and a collection attribute
I am just studying the basic things about Struts, and have some trouble getting selectTag and optionsCollectionTag work as I would expect. Intention is to have two properties in a form: allChoices, that is a collection holding all possible choices for the select tag, and selectedChoicesCollection, that contains the currently selected ones. Each choice is modelled by a class Choice, that contains two attributes, id for identifying the selection and name, which is displaed to the user. SelectedChoicesCollection contains only the values of the Choices (as having it contain Choice objects did not seem to work at all). I have to actions, SimpleGetAction and SimpleSaveAction. User starts by calling a URL which maps to SimpleGetAction. This action populates the form object and moves on to the JSP page. This part works out as I excpect, and the correct choice(s) is highlighted. When user submits the form, SimpleSaveAction gets called - except that BeanUtils.populate throws an exception before action gets it's turn: 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1799] Get module name for path /SaveSimpleTest.do 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1821] Module name found: default 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][225] Processing a 'POST' for path '/SaveSimpleTest' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][764] Looking for ActionForm bean instance in scope 'request' under attribute key 'simp eForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][839] Creating new ActionForm instance of type 'jannen.form.SimpleTestForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][844] -- jannen.form.SimpleTestForm selectedChoicesArray: selectedChoicesCollection: 3] 12:34:46,308 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][372] Storing ActionForm bean instance in scope 'request' under attribute key 'si pleForm' 12:34:46,388 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][813] Populating bean properties from this request 12:34:46,388 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at
Relaod struts-config.xml
Hello, In Tiles, it can be reloaded the tiles-config.xml by using its reload action, is there any same action for reloading the struts-config.xml ? Eric == If you know what you are doing, it is not called RESEARCH! == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat5 not logging me in
Hai all am using l Tomcat5, MySql, Struts 1.1 Linux. i had written a web applicaiton in tomcat with the support given above. i tested my site theroughly. its really working fine. but after a day or so, when i try to login first time its not letting me to my home page. i think after a concesting access to DB the connection is freezes. below are th full diagnosis of my tomcat and db. in my DBCP i have given. data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver/ set-property property=url value=jdbc:mysql://ip address/contextname/ set-property property=username value=/ set-property property=password value=/ set-property property=removeAbandoned value=true/ set-property property=removeAbandonedTimeout value=60/ /data-source my Server status is Server Status Manager List Applications /manager/html/list HTML Manager Help /manager/html-manager-howto.html Manager Help /manager/manager-howto.html Complete Server Status /manager/status/all Server Information Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture Apache Tomcat/5.0.25 1.4.2_02-b03 Sun Microsystems Inc. Linux 2.4.20-020stab009.21.777-enterprise i386 JVM Free memory: 42.25 MB Total memory: 63.31 MB Max memory: 63.31 MB http-8080 Max threads: 15 Min spare threads: 5 Max spare threads: 10 Current thread count: 5 Current thread busy: 1 Max processing time: 4 ms Processing time: 0 s Request count: 1 Error count: 0 Bytes received: 0.00 MB Bytes sent: 0.00 MB Stage TimeB Sent B Recv Client VHost Request *R* ? ? ? ? ? ? *R* ? ? ? ? ? ? P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive jk8009 Max threads: 200 Min spare threads: 4 Max spare threads: 50 Current thread count: 8 Current thread busy: 3 after restarting my tomcat its working fine. am fasing the problem many times can anybody kindly help me thankyou Rajesh
[OT]:JSp and database
Hi All, I don't know if a similar query has been posted already. I have an existing JSP which has lot of JDBC code embedded in it. I have a performance issue in this that the combo boxes on this JSP wherein data comes from the database are taking very long time to populate. I think the issue is with writing JDBC statements in the JSP directly. I need inputs on this. Is the presence of JDBC statements affecting the performance of this JSP ? Should I write a separate bean with all my queries in it and use this in the JSP? Regds Aditya
RE: mapping an action twice with Xdoclet
Hi David Sorry... I haven't explained myself well... Xdoclet writes the two action in config file, but the problem comes with @struts.action-forward and @struts.action-exception, as Xdoclet writes the forward and the exception in each action. if I write something like that: * @struts.action * name=adminUsersForm * path=/loadAdminUsersForm * parameter=load * validate=false * * @struts.action-exception * type=net.inventa.online.model.user.exception.UserManagerException *key=userRegistration.userManager.exception *path=/userRegistrationException.jsp * * @struts.action-forward * name=success * path=/adminUsersForm.jsp * * @struts.action *name=adminUsersForm *path=/submitAdminUsersForm *parameter=submit * * @struts.action-forward * name=success * path=/loadAdminUsersForm.do * */ public class AdminUsersAction extends Action { [...] it generates this xml file action path=/loadAdminUsersForm type=net.inventa.online.controller.action.AdminUsersAction name=adminUsersForm scope=request parameter=load unknown=false validate=false exception key=userRegistration.userManager.exception type=net.inventa.online.model.user.exception.UserManagerException path=/userRegistrationException.jsp / forward name=success path=/adminUsersForm.jsp redirect=false / forward name=success path=/loadAdminUsersForm.do redirect=false / /action action path=/submitAdminUsersForm type=net.inventa.online.controller.action.AdminUsersAction name=adminUsersForm scope=request parameter=submit unknown=false validate=true exception key=userRegistration.userManager.exception type=net.inventa.online.model.user.exception.UserManagerException path=/userRegistrationException.jsp / forward name=success path=/adminUsersForm.jsp redirect=false / forward name=success path=/loadAdminUsersForm.do redirect=false / /action And this is not what I was expecting ;o( What I'm doing wrong?) thanks for your time tito El vie, 06 de 08 de 2004 a las 15:24, David Friedman escribi: I believe I've put two @struts.action declarations in one Java file for XDoclet and it put two action ... / entries in my struts-config.xml file. (Under eclipse/Xdoclet). If it helps, I updated the plug-in jars for the latest stable version in the Eclipse XDoclet folders (they were a version or two behind). Regards, David -Original Message- From: Tito Eritja [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 6:23 AM To: struts Subject: mapping an action twice with Xdoclet Hi all. I have to map the same Action twice, is possible to do it with Xdoclet in the same java file? (by now, I write the first mapping with @struts.action and the second with merge file struts-action.xml thanks tito - 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: [OT]:JSp and database
I guess you have answere the question ur self. definetly writing beans would be helpful and not charge the jsp files. Just a suggestion - if possible y dont u use a MVC approach and have DAO classes and bean classes to populate ur data. Though this means a lot of work...So best of luck Shilpa Hi All, I don't know if a similar query has been posted already. I have an existing JSP which has lot of JDBC code embedded in it. I have a performance issue in this that the combo boxes on this JSP wherein data comes from the database are taking very long time to populate. I think the issue is with writing JDBC statements in the JSP directly. I need inputs on this. Is the presence of JDBC statements affecting the performance of this JSP ? Should I write a separate bean with all my queries in it and use this in the JSP? Regds Aditya -- This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that ICICI Bank or its subsidiaries and associated companies, (collectively ICICI Group), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of ICICI Group.Before opening any attachments please check them for viruses and defects.
[OT] How to Print
Hi All, I have documents stored on machine in one particular directory which I know. I need to fire print on all the documents which are available in this directory on click of PRINT Action. How to do this? Regards, Viral
RE: Print Documents
Documents are stored in server directory. User will click on PRINT action (on browser). This should print all the docs. _ From: Pratiksha_saxena Sent: Monday, August 09, 2004 5:36 PM To: Viral_Thakkar Subject: RE: Print Documents Select all the documents in the folder (ctrl a) - Right click and click on print. All the selected documents will get printed -Pratiksha -Original Message- From: Viral_Thakkar Posted At: Monday, August 09, 2004 5:21 PM Posted To: HJW Technical Conversation: Print Documents Subject: Print Documents Hi All, I have documents stored on machine in one particular directory which I know. I need to fire print on all the documents which are available in this directory on click of PRINT Action. How to do this? Regards, Viral
Re: Tomcat5 not logging me in
It seems your database connection is not getting close. Your connection pool is not availalble after some time. Put all connection close code in finally block. -Jignesh On Mon, 2004-08-09 at 06:17, Rajesh wrote: Hai all am using l Tomcat5, MySql, Struts 1.1 Linux. i had written a web applicaiton in tomcat with the support given above. i tested my site theroughly. its really working fine. but after a day or so, when i try to login first time its not letting me to my home page. i think after a concesting access to DB the connection is freezes. below are th full diagnosis of my tomcat and db. in my DBCP i have given. data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver/ set-property property=url value=jdbc:mysql://ip address/contextname/ set-property property=username value=/ set-property property=password value=/ set-property property=removeAbandoned value=true/ set-property property=removeAbandonedTimeout value=60/ /data-source my Server status is Server Status Manager List Applications /manager/html/listHTML Manager Help /manager/html-manager-howto.htmlManager Help /manager/manager-howto.html Complete Server Status /manager/status/all Server Information Tomcat VersionJVM Version JVM Vendor OS Name OS Version OS Architecture Apache Tomcat/5.0.25 1.4.2_02-b03Sun Microsystems Inc. Linux 2.4.20-020stab009.21.777-enterprise i386 JVM Free memory: 42.25 MB Total memory: 63.31 MB Max memory: 63.31 MB http-8080 Max threads: 15 Min spare threads: 5 Max spare threads: 10 Current thread count: 5 Current thread busy: 1 Max processing time: 4 ms Processing time: 0 s Request count: 1 Error count: 0 Bytes received: 0.00 MB Bytes sent: 0.00 MB Stage TimeB Sent B Recv Client VHost Request *R* ? ? ? ? ? ? *R* ? ? ? ? ? ? P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive jk8009 Max threads: 200 Min spare threads: 4 Max spare threads: 50 Current thread count: 8 Current thread busy: 3 after restarting my tomcat its working fine. am fasing the problem many times can anybody kindly help me thankyou Rajesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I suspect this is a bad idea...so what's a better one?
Joe, you could move your business logic to a service layer which also leverages the Command pattern. You could have a base command which did something similar as Craig has outlined. public abstract class BaseCommand { public void execute() throws Exception { try { // set up transaction doExecute(); } catch (Exception e) { // abort transaction } finally { // clean up transaction } } // implement actual work here. public abstract void doExecute() throws Exception; } then public class MyCommand extends BaseCommand { public void doExecute() throws exception { // put business logic here } } in your action's execute method (be it DispatchAction, MappingDispatchAction, etc...) public ActionForward execute(...) throws Exception { ActionForward forward = // get appropriate forward Command command = // get the appropriate command and initialize it command.execute(); return forward; } You might also check out the Spring framework. It allows you to declaratively demarcate transaction boundries (similar to EJB). robert -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 4:11 AM To: 'Struts Users Mailing List' Subject: RE: I suspect this is a bad idea...so what's a better one? Craig, Thanks for the idea. Only problem I see with this that I usually make my real actions some flavor of a DispatchAction, usually a MappingDispatchAction. So to keep that type of functionality, it appears that I'd have to replicate a lot of the Struts dispatch/reflection logic inside of my abstract Action subclass. Calling super.execute() gets me that, but that is precisely what this concept seems to try to avoid. :-/ -Original Message- :snip: A useful design pattern for something like this is to create a common subclass for your actions that does the setup/teardown work in the execute() method, and then delegates to the action-specific work in some other method. For your scenario, it might look like this: public abstract class BaseAction extends Action { public ActionForward execute(...) throws Exception { Persistence persistence = ActionHelper.getPersistenceObject(request); try { ActionForward forward = delegate(mapping, form, request, response, persistence); } finally { persistence.release)(; } } protected abstract ActionForward delegate(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Persistence persistence) throws Exception; } Then, your real business logic is implemented in a delegate() method that is passed in for you, and you never have to remember to allocate and release the persistence object. public class RealAction extends BaseAction { protected ActionForward delegate(...) { ... use the persistence object as needed ... } } This is pretty close to what you've got now ... the key difference is that it uses a local variable instead of an instance variable to avoid sharing problems. Also, because of the finally clause, it also ensures that the persistence object is cleaned up, even if the delegate() method throws an exception. Craig - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat5 not logging me in
Hai Patel i kept it as first preference ya i am clossing and also used = null to all objects which is not used. Jignesh Patel wrote: It seems your database connection is not getting close. Your connection pool is not availalble after some time. Put all connection close code in finally block. -Jignesh On Mon, 2004-08-09 at 06:17, Rajesh wrote: Hai all am using l Tomcat5, MySql, Struts 1.1 Linux. i had written a web applicaiton in tomcat with the support given above. i tested my site theroughly. its really working fine. but after a day or so, when i try to login first time its not letting me to my home page. i think after a concesting access to DB the connection is freezes. below are th full diagnosis of my tomcat and db. in my DBCP i have given. data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver/ set-property property=url value=jdbc:mysql://ip address/contextname/ set-property property=username value=/ set-property property=password value=/ set-property property=removeAbandoned value=true/ set-property property=removeAbandonedTimeout value=60/ /data-source my Server status is Server Status Manager List Applications /manager/html/list HTML Manager Help /manager/html-manager-howto.html Manager Help /manager/manager-howto.html Complete Server Status /manager/status/all Server Information Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture Apache Tomcat/5.0.25 1.4.2_02-b03 Sun Microsystems Inc. Linux 2.4.20-020stab009.21.777-enterprise i386 JVM Free memory: 42.25 MB Total memory: 63.31 MB Max memory: 63.31 MB http-8080 Max threads: 15 Min spare threads: 5 Max spare threads: 10 Current thread count: 5 Current thread busy: 1 Max processing time: 4 ms Processing time: 0 s Request count: 1 Error count: 0 Bytes received: 0.00 MB Bytes sent: 0.00 MB Stage TimeB Sent B Recv Client VHost Request *R* ? ? ? ? ? ? *R* ? ? ? ? ? ? P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive jk8009 Max threads: 200 Min spare threads: 4 Max spare threads: 50 Current thread count: 8 Current thread busy: 3 after restarting my tomcat its working fine. am fasing the problem many times can anybody kindly help me thankyou Rajesh - 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]
Struts and Websphere security - best practice
I have a struts app that I am deploying in WebSphere 5.1. Everything works fine, no issues with WAS per se. Now I am trying to activate security and I am running into some bumps in the road. The security setup is simple: With global security enabled on WAS, authenticating against ldap (openldap repository in the test environment), I only need to designate in my web.xml a security-constraint indicating which resources are protected, and a login-config which indicates the name of the login page to use. The login page must call a WAS servlet called j_security_check. When an unauthenticated user tries to navigate to a protected resource, WAS will redirect the user to the login page designated in the login-config tag, and process the login from there. If anyone is reading this, you probably know all this already. From the looks of things, using the above scheme, I do not need to define a path in struts-config.xml to the login page, as I would normally do. With index.jsp as my welcome page, which contains only a redirection to the entry point path in my struts-config.xml, I expect WAS to kick in and redirect any user trying to access sessionStart.do first to the designated login page before allowing access to the struts action. My security-contraint in fact protects *.do. This is how IBM sets up its admin console for WAS, in fact, although they incorporate everything into a form bean/action class, and I instead detour out of struts just for the login process. I am not having much diffculty with authentication in this manner, although authorization is another matter. So my question is, what is the best way to do this? Should I protected the static index.jsp instead of any call to the action servlet, or both, or all resources (I have read through and tried to implement the IBM example of using SSL for unathenticated access to the login.jsp, and non-secure authenticated access to everything else)? Should I make a greater effort to incorporate the entire procedure into a struts form.action class as IBM has done (and if so, is there any particular trick to calling j_security_check from my action class?). Any suggestions will be appreciated. T. McCobb
Localization within Tiles
Hi all, (sorry for a bit longer message) I have encountered an interesting problem. In my struts application I am using tiles and localization through ApplicationResources.properties files. In my jsp page I have messages written as: bean:message key=label.messageText/ however, sometimes I would like to refer to a value defined in tiles. Such as: tiles:getAsString name=messageText/ In the tilesDefinition.xml file I have e.g.: --snip-- put name=messageText value=Hello/ --snip-- What I would like to do is to combine these 2 approaches and have localized messageText without needing to rewrite it in tiles def. file. Because this is the case in the tiles-documentation example supplied with tiles: definition. put name=messageText value=Bye/ /definition and in another language in tiles def. _de: definition. put name=messageText value=Tshus/ /definition But this implies a lot of (imho) unnecessary typing. The solution I've had in mind would go something like this: definition put name=messageText value=label.messageText/ /definition and in the jsp there would be: bean:message key=tiles:getAsString name=messageText/ That way I would have all the localized strings in .properties files only. But unfortunately such nesting is not possible. I have tried using scripting variables (as I have been facing this kind of nesting problems more often) but did not succeed. I would appreciate any comments how to solve this issue. Thanks. Regards, Radek _ Ing. Radek Vclavk ICS Department - webmaster ZeNTIVA a.s. U Kabelovny 130, 102 37 Praha 10 Czech Republic tel. +420 267 243 296 _
is this a struts bug?
hihi, i have a jsp with the following: c:forEach var=i begin=0 end=5 html-el:text name=MyObj property=foo[${i}].bar/ /c:forEach in MyObj i have these methods: public Collection getFoo() { return foo; } public Bar getFoo(int i) { while(i = foo.size()) { ((ArrayList)foo).add(new Bar()); } return (Bar)((ArrayList)foo).get(i); } when i request for the jsp, it calls the first getFoo() method. should it not call the second getFoo(int) method instead, since the jsp is using jstl to provide an index parameter? the weird part is when i take out the getFoo() method and recompile, then the jsp calls getFoo(int) correctly. why is the behavior like this? is this a bug? (when it calls the first getFoo() method i get an indexOutOfBounds exception because my foo collection has nothing in it... i want the collection size to be driven by the jsp page) thanks in advance, woodchuck __ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Websphere security - best practice
On Mon, 9 Aug 2004 10:35:14 -0400, Tom McCobb [EMAIL PROTECTED] wrote: I have a struts app that I am deploying in WebSphere 5.1. Everything works fine, no issues with WAS per se. Now I am trying to activate security and I am running into some bumps in the road. The security setup is simple: With global security enabled on WAS, authenticating against ldap (openldap repository in the test environment), I only need to designate in my web.xml a security-constraint indicating which resources are protected, and a login-config which indicates the name of the login page to use. The login page must call a WAS servlet called j_security_check. When an unauthenticated user tries to navigate to a protected resource, WAS will redirect the user to the login page designated in the login-config tag, and process the login from there. If anyone is reading this, you probably know all this already. Yep :-). From the looks of things, using the above scheme, I do not need to define a path in struts-config.xml to the login page, as I would normally do. That is correct. With index.jsp as my welcome page, which contains only a redirection to the entry point path in my struts-config.xml, I expect WAS to kick in and redirect any user trying to access sessionStart.do first to the designated login page before allowing access to the struts action. My security-contraint in fact protects *.do. This is how IBM sets up its admin console for WAS, in fact, although they incorporate everything into a form bean/action class, and I instead detour out of struts just for the login process. I am not having much diffculty with authentication in this manner, although authorization is another matter. One thing to double check is that your welcome page really does do a *redirect* to sessionStart.do, rather than a jsp:forward. The latter will not kick in the container managed security, because they are only applied on the URL that is originally requested from the client (which will be the one for the welcome page in this scenario). Using *.do is the correct URL pattern for all the rest of the requests, since that is the URL that the form submit actually uses. However, it won't help you deal with fine-grained authorization (i.e. different people can execute different actions). For that, you can either define separate mappings in your security constraints (with different user roles required for access), or use the role attribute on the action element to ask Struts to check for the presence of that role. So my question is, what is the best way to do this? Should I protected the static index.jsp instead of any call to the action servlet, or both, or all resources (I have read through and tried to implement the IBM example of using SSL for unathenticated access to the login.jsp, and non-secure authenticated access to everything else)? Should I make a greater effort to incorporate the entire procedure into a struts form.action class as IBM has done (and if so, is there any particular trick to calling j_security_check from my action class?). Any suggestions will be appreciated. T. McCobb Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question on logic:iterate
All, The problem is I want to list out all the employee using the logic:iterate tag.It does not show the property which is not of type String in the bean and say of type int. Am I missing something here? Sample code below: logic:iterate id=employee name=employees bean:write name=employee property=name / bean:write name=employee property=email / bean:write name=employee property=empId / /logic:iterate Thanks All, Kakoli If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion. For more information about Hyperion, please visit our Web site at www.hyperion.com
Struts and encoding
Hi friends I have a problem with Struts / Jsp when i send a paramete from a jsp to my action (by using formBean) It seems that character encoding of my parameter changes , is it true? my prameter is UTF-8 , but in action it seems that its encoding changed to iso Latin-1 is there any solution for this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]:JSp and database
Hibernate? http://www.hibernate.org Struts? http://struts.apache.org/ JSTL... Etc.. Etc.. Etc.. Its generally pretty bad option, esp performance wise to use JDBC in JSP. Separtion would be better, caching would be even better. Both of em put together will make life very easy. Pritpal Dhaliwal -Original Message- From: Shilpa Vaidya [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 4:36 AM To: 'Struts Users Mailing List' Subject: RE: [OT]:JSp and database I guess you have answere the question ur self. definetly writing beans would be helpful and not charge the jsp files. Just a suggestion - if possible y dont u use a MVC approach and have DAO classes and bean classes to populate ur data. Though this means a lot of work...So best of luck Shilpa Hi All, I don't know if a similar query has been posted already. I have an existing JSP which has lot of JDBC code embedded in it. I have a performance issue in this that the combo boxes on this JSP wherein data comes from the database are taking very long time to populate. I think the issue is with writing JDBC statements in the JSP directly. I need inputs on this. Is the presence of JDBC statements affecting the performance of this JSP ? Should I write a separate bean with all my queries in it and use this in the JSP? Regds Aditya -- This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that ICICI Bank or its subsidiaries and associated companies, (collectively ICICI Group), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of ICICI Group.Before opening any attachments please check them for viruses and defects. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Localization within Tiles
You can do something like this : In your tiled definition : --snip-- put name=messageText value=message.text/ --snip-- In your jsp: Do something like tiles:getAsString name=messageText/ titlebean:message name=messageText//title So in the title... a value corresponding to the value of messageText which is message.text will be fetched in the resources and will be replaced. So in short in the tiles definition instead of the value of the messageText (Hello) put a key (message.text) of the resources for that particular message and later get it in the usual way as shown. HTH Avinash -Original Message- From: Václavík Radek [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 8:35 AM To: '[EMAIL PROTECTED]' Subject: Localization within Tiles Hi all, (sorry for a bit longer message) I have encountered an interesting problem. In my struts application I am using tiles and localization through ApplicationResources.properties files. In my jsp page I have messages written as: bean:message key=label.messageText/ however, sometimes I would like to refer to a value defined in tiles. Such as: tiles:getAsString name=messageText/ In the tilesDefinition.xml file I have e.g.: --snip-- put name=messageText value=Hello/ --snip-- What I would like to do is to combine these 2 approaches and have localized messageText without needing to rewrite it in tiles def. file. Because this is the case in the tiles-documentation example supplied with tiles: definition. put name=messageText value=Bye/ /definition and in another language in tiles def. _de: definition. put name=messageText value=Tshus/ /definition But this implies a lot of (imho) unnecessary typing. The solution I've had in mind would go something like this: definition put name=messageText value=label.messageText/ /definition and in the jsp there would be: bean:message key=tiles:getAsString name=messageText/ That way I would have all the localized strings in .properties files only. But unfortunately such nesting is not possible. I have tried using scripting variables (as I have been facing this kind of nesting problems more often) but did not succeed. I would appreciate any comments how to solve this issue. Thanks. Regards, Radek _ Ing. Radek Václavík ICS Department - webmaster ZeNTIVA a.s. U Kabelovny 130, 102 37 Praha 10 Czech Republic tel. +420 267 243 296 _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
org.apache.jasper.JasperException
I am getting this error, what could be the reason... 2004-08-09 09:32:08 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: File /tags/struts-html not found at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java :214) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java :174) at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP arseEventListener.java:1170) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:765) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:125) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255) at org.apache.jasper.compiler.Parser.parse(Parser.java:1145) at org.apache.jasper.compiler.Parser.parse(Parser.java:1103) at org.apache.jasper.compiler.Parser.parse(Parser.java:1099) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:214) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.apache.jasper.JasperException
-Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 2:44 PM To: [EMAIL PROTECTED] Cc: 'Struts Users Mailing List' Subject: org.apache.jasper.JasperException I am getting this error, what could be the reason... 2004-08-09 09:32:08 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: File /tags/struts-html not found Read the error message one more time somethings missing from your filename. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trying to highlate error causing fields
Niall, This works great! Following your example at http://www.niallp.pwp.blueyonder.co.uk/#errortag I extended it to do the password tag and it worked. A problem occurred when I tried to implement something for the select tag. I keep getting the [ServletException in:/tiles/mypage.jsp] -1 0' error. My files are attached. Any ideas? Have you implemented any of the other form tags? Wiebe -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 5:41 AM To: Struts Users Mailing List Subject: Re: Trying to highlate error causing fields There a jar cotaining the compiled class and a tld file that you can download: http://www.niallp.pwp.blueyonder.co.uk/customtags.zip All you need to do is deploy it as you would any other tag libarary. Niall - Original Message - From: joe a. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 09, 2004 12:48 AM Subject: Trying to highlate error causing fields I'm trying to use #3 on this page: http://www.niallp.pwp.blueyonder.co.uk/. It is a tag library that I'm trying to use with my struts web app. But I have no clue how to use the class file he provided. I don't know where to put it at compile time, and it has a different package name than my current project (package lib.framework.taglib;) - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Writing out primitive int bean properties
All, I am still running into problems writing out bean properties of primitive type say int .I can only render String type ones in my jsp pages. Would really appreciate some help with this. Thanks, Kakoli -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 10:12 AM To: Struts Users Mailing List Subject: question on logic:iterate All, The problem is I want to list out all the employee using the logic:iterate tag.It does not show the property which is not of type String in the bean and say of type int. Am I missing something here? Sample code below: logic:iterate id=employee name=employees bean:write name=employee property=name / bean:write name=employee property=email / bean:write name=employee property=empId / /logic:iterate Thanks All, Kakoli If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion. For more information about Hyperion, please visit our Web site at www.hyperion.com If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion. For more information about Hyperion, please visit our Web site at www.hyperion.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trying to highlate error causing fields
Seems the attached files didn't get through. Here are the important parts inline: ecom-tags.tld: ?xml version=1.0 encoding=UTF-8? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd; taglib tlibversion1.0/tlibversion jspversion1.1/jspversion shortnameecom/shortname tag nameselect/name tagclasscom.infobuild.ecom.taglib.SelectErrorTag/tagclass bodycontentJSP/bodycontent attribute nameerrorStyleSuffix/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameaccesskey/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namealt/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namealtKey/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namedisabled/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameindexed/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namemultiple/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namename/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonblur/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonchange/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonclick/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameondblclick/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonfocus/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonkeydown/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonkeypress/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonkeyup/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonmousedown/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonmousemove/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonmouseout/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonmouseover/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameonmouseup/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameproperty/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyle/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleClass/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleId/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nametabindex/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namesize/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nametitle/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nametitleKey/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namevalue/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute /tag /taglib SelectErrorTag.java: package com.infobuild.ecom.taglib; import org.apache.struts.taglib.html.SelectTag; import java.util.Iterator; import javax.servlet.jsp.JspException; import org.apache.struts.util.RequestUtils; import org.apache.struts.action.ActionErrors; public class SelectErrorTag extends SelectTag { protected String errorStyleSuffix = Err; public SelectErrorTag() { super(); } snipeverything that follows is the same as the TextErrorTag.java example/snip end/ -Original Message- From: Wiebe de Jong [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 3:33 PM To: 'Struts Users Mailing List' Subject: RE: Trying to highlate error causing fields Niall, This works great! Following your example at http://www.niallp.pwp.blueyonder.co.uk/#errortag I extended it to do the password tag and it worked. A problem occurred when I tried to implement something for the select tag. I keep getting the [ServletException in:/tiles/mypage.jsp] -1 0' error. My files are attached. Any ideas? Have you implemented any of the other form tags? Wiebe -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 5:41 AM To: Struts Users Mailing List Subject: Re: Trying to highlate error causing fields There a jar cotaining the compiled class and a tld file that you can download: http://www.niallp.pwp.blueyonder.co.uk/customtags.zip All you need to do is deploy it as you would any other tag libarary. Niall - Original Message - From: joe a. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 09, 2004 12:48 AM Subject: Trying to highlate error causing fields I'm trying to use #3 on this page: http://www.niallp.pwp.blueyonder.co.uk/. It is a tag library that I'm trying to use with my struts web app. But I have no
RE: Writing out primitive int bean properties
-Original Message- From: Kakoli Saha [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 4:21 PM To: Struts Users Mailing List Subject: Writing out primitive int bean properties All, I am still running into problems writing out bean properties of primitive type say int .I can only render String type ones in my jsp pages. Would really appreciate some help with this. It's not your jsp. What else it could be I have no idea... what does the employee class look like? Thanks, Kakoli -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 10:12 AM To: Struts Users Mailing List Subject: question on logic:iterate All, The problem is I want to list out all the employee using the logic:iterate tag.It does not show the property which is not of type String in the bean and say of type int. Am I missing something here? Sample code below: logic:iterate id=employee name=employees bean:write name=employee property=name / bean:write name=employee property=email / bean:write name=employee property=empId / /logic:iterate Thanks All, Kakoli ** ** If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion. For more information about Hyperion, please visit our Web site at www.hyperion.com ** ** If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion. For more information about Hyperion, please visit our Web site at www.hyperion.com - 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]
Index on multi-box
Hi All, I have the following struts labels on a jsp: logic:iterate name=surveySittingForm property=items id=item indexId=itemCtr html:multibox name=item property=selectedAnswers bean:write name=answer property=number/ /html:multibox /logic:iterate And it's generating the following html: input type=checkbox name=selectedAnswers value=0 input type=checkbox name=selectedAnswers value=1 input type=checkbox name=selectedAnswers value=2 input type=checkbox name=selectedAnswers value=3 input type=checkbox name=selectedAnswers value=4 input type=checkbox name=selectedAnswers value=0 input type=checkbox name=selectedAnswers value=1 input type=checkbox name=selectedAnswers value=2 input type=checkbox name=selectedAnswers value=3 input type=checkbox name=selectedAnswers value=4 ... and so on for as many items in the surveySittingForm. What I really want is this: input type=checkbox name=item[0].selectedAnswers value=0 input type=checkbox name=item[0].selectedAnswers value=1 input type=checkbox name=item[0].selectedAnswers value=2 input type=checkbox name=item[0].selectedAnswers value=3 input type=checkbox name=item[0].selectedAnswers value=4 input type=checkbox name=item[1].selectedAnswers value=0 input type=checkbox name=item[1].selectedAnswers value=1 input type=checkbox name=item[1].selectedAnswers value=2 input type=checkbox name=item[1].selectedAnswers value=3 input type=checkbox name=item[1].selectedAnswers value=4 Can I do this with the multi-box tag? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception handler question
On Mon, 9 Aug 2004 22:06:51 -0300 (ART), Leandro Melo [EMAIL PROTECTED] wrote: Hi, i'm now starting to deal with exception in my application. So far, i haven't used Struts exception handling alternatives, so, i'm very new at that. After some reading i have a few questions (please mark True of False on my sentences , naturally comments are welcome!). * It seems to me that Struts has a very nice way to deal with Exceptions, and i actually should use that. True ! * Is it nice to have locals exceptions handlers for my Action, or i should just have a few (or one) global Exception Handler? True (If required) Having LocalException Handlers will give the functionality of handling a particular exception differently, if required. * When do i need to override ExceptionHandler? I couldn't figure it out a situation where it's needed (maybe if i want to do some special logs for every exceptions??? ). One scenario might be to handle NestedException, You might override execute(Exception ex, ExceptionConfig config, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) method of ExceptionHandler to show error messages for all the exceptiosn. * Here's an advice from jakarta: A common use of ExceptionHandlers is to configure one for java.lang.Exception so it's called for any exception and log the exception to some data store.. Is it really a nice strategy??? Well Sure, first a local ExceptionHandler is invoked if found, otherwise, the global ExceptionHandlers are searched, if not, the Exception's superclass are searched in a similar fashion. So, declaring a handler for java.lang.Exception, will always be there for you as a default handler for any type of Exception, if you haven't defined a specific handler for that particular exception. Well, i think this is it! I'd appreciate some comments. = _ Leandro Terra C. Melo Eng. de Controle e Automação - UFMG __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks, Kishore Senji. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I suspect this is a bad idea...so what's a better one?
Robert Comands are really a good Solution for acting on business logic. See the common-chain framework also. It offers command and chains to access the business logic in different manner. Manfred Robert Taylor wrote: Joe, you could move your business logic to a service layer which also leverages the Command pattern. You could have a base command which did something similar as Craig has outlined. public abstract class BaseCommand { public void execute() throws Exception { try { // set up transaction doExecute(); } catch (Exception e) { // abort transaction } finally { // clean up transaction } } // implement actual work here. public abstract void doExecute() throws Exception; } then public class MyCommand extends BaseCommand { public void doExecute() throws exception { // put business logic here } } in your action's execute method (be it DispatchAction, MappingDispatchAction, etc...) public ActionForward execute(...) throws Exception { ActionForward forward = // get appropriate forward Command command = // get the appropriate command and initialize it command.execute(); return forward; } You might also check out the Spring framework. It allows you to declaratively demarcate transaction boundries (similar to EJB). robert -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 4:11 AM To: 'Struts Users Mailing List' Subject: RE: I suspect this is a bad idea...so what's a better one? Craig, Thanks for the idea. Only problem I see with this that I usually make my real actions some flavor of a DispatchAction, usually a MappingDispatchAction. So to keep that type of functionality, it appears that I'd have to replicate a lot of the Struts dispatch/reflection logic inside of my abstract Action subclass. Calling super.execute() gets me that, but that is precisely what this concept seems to try to avoid. :-/ -Original Message- :snip: A useful design pattern for something like this is to create a common subclass for your actions that does the setup/teardown work in the execute() method, and then delegates to the action-specific work in some other method. For your scenario, it might look like this: public abstract class BaseAction extends Action { public ActionForward execute(...) throws Exception { Persistence persistence = ActionHelper.getPersistenceObject(request); try { ActionForward forward = delegate(mapping, form, request, response, persistence); } finally { persistence.release)(; } } protected abstract ActionForward delegate(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Persistence persistence) throws Exception; } Then, your real business logic is implemented in a delegate() method that is passed in for you, and you never have to remember to allocate and release the persistence object. public class RealAction extends BaseAction { protected ActionForward delegate(...) { ... use the persistence object as needed ... } } This is pretty close to what you've got now ... the key difference is that it uses a local variable instead of an instance variable to avoid sharing problems. Also, because of the finally clause, it also ensures that the persistence object is cleaned up, even if the delegate() method throws an exception. Craig - 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] - 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]
clone of ActionForm to DomainObject
hi all: I get this problem for some week, It is very troubler. Now I use xdoclet to generate the ActionForm form the DomainObject. I want to implement some method convert it. (1) Method 1 : only one ActionForm to changed to DomainForm eg: code class SimpleActionForm () extends ActionForm { public getName () {...} public setName () {...} } class Simple () { public getName () {...} public setName () {...} } /code This is easy to use BeanUtils.copyProperties(target, o);to do it (2) Method 2 : one-to-anotherone or one-to-many or one-to-anotherone-many . ? how to deal with this kind of ActionForm to changed? eg: code class OneActionForm () extends ActionForm { public getName () {...} public setName () {...} public getAnotherActionForm () {...} public setAnotherActionForm () {...} } class AnotherActionForm() extends ActionForm { public getName () {...} public setName () {...} } /code code class One () { public getName () {...} public setName () {...} public getAnother () {...} public setAnother () {...} } class Another() { public getName () {...} public setName () {...} } /code I think I can regiest a Convertor to ConvertUtils, to dynamic changed the ActionForm Object to DomainObject. do it? -- how to do it? pls give some advice or some opensouce to solve, thanks. Regards, charlse
EL question
I have a logic:iterate tag that is creating HTML table rows. I want to set a bgcolor variable to use for each row. If the row is even numbered, I want to use color A. If the row is odd numbered, I want to use color B. What tags should I use? What EL operation should I use to determine if the current iterator index is even or odd? I was thinking along the lines of: begin logic:iterate set bg color var to 'A' if iterator index is odd, set bg color to 'B' render the table row end logic:iterate I would appreciate some advice on how to implement this neatly, using the EL tags or JSTL tags. I'm trying to graduate from using scriptlets for stuff like this. Thanks, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]