RE: Getting the path attribute of action tag inside Action class
Instead of you doing it why don't you use the http://struts.apache.org/1.x/struts-extras/apidocs/org/apache/struts/act ions/DispatchAction.html And DispatchLookupAction Nice way to do lot of things in a modular way :) Thanks Giri -Original Message- From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] Sent: 04 June 2007 18:21 To: Struts Users Mailing List Subject: Re: Getting the path attribute of action tag inside Action class hi, you can getting from the ActionMapping object that is available from the action. Thanks, Nuwan - Original Message - From: prabath [EMAIL PROTECTED] To: user@struts.apache.org Sent: Monday, June 04, 2007 1:06 PM Subject: Getting the path attribute of action tag inside Action class Hi, I like to get the path attribute of action tag declared in struts-config.xml inside my Action class. action path=/. Is there any way? The reason I want is, I have declared different action mappings(in struts-config.xml) for the same Action class. Now I want to get the name of the action mappings inside the Action class for some manipulation work. Is there any way to get it from HttpServletRequest object ? or any other solution available?? Thanks -- View this message in context: http://www.nabble.com/Getting-the-path-attribute-of-%3Caction%3E-tag-ins ide-Action-class-tf3865118.html#a10949475 Sent from the Struts - User mailing list archive at Nabble.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How To Lock User Account If he Failed to give Correct Password in three attempts
Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword); if(userDTO==null){ throw new LoginFailedException(LoginFailedException); } public UserTo getUser(String username, String password)throws BaseAppException{ DBConnection ora = DBConnection.getInstance(); Connection conn = ora.createConnection(); PreparedStatement stmt = null; ResultSet rs = null; UserTo userDTO = null; Query = select * from SYSTEM_USER where SERVICE_NO=? and PASSWORD=?; if (conn != null) { try{ stmt = conn.prepareStatement(Query); stmt.setString(1, username); stmt.setString(2, password); rs = stmt.executeQuery(); while(rs.next()){ userDTO = new UserTo(); userDTO.setServiceNo(rs.getString(SERVICE_NO)); userDTO.setEmpName(rs.getString(EMP_NAME)); } } catch (SQLException sqle) { throw new BaseDBException(BaseDBException); } finally { try{ ora.closeConnection(conn); stmt.close(); rs.close(); }catch(SQLException e){ throw new BaseDBException(BaseDBException); } } }else{ throw new BaseDBException(BaseDBException); } return userDTO; } Regards, Sreenivasula Reddy A. DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---
using jstl sql tags for displaying date from database
Hi all, In my web application I want to put current date into the header segment of each page. And I want that the date should come from the database. How can I achieve this using jstl 1.1 sql tags. Can anybody provide me a code snippet that I can put in my jsp page? Thank you.
FW: using jstl sql tags for displaying date from database
_ From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 3:16 PM To: 'user@struts.apache.org' Subject: using jstl sql tags for displaying date from database Hi all, In my web application I want to put current date into the header segment of each page. And I want that the date should come from the database. How can I achieve this using jstl 1.1 sql tags. Can anybody provide me a code snippet that I can put in my jsp page? Thank you.
RE: How To Lock User Account If he Failed to give Correct Password in three attempts
Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword); if(userDTO==null){ throw new LoginFailedException(LoginFailedException); } public UserTo getUser(String username, String password)throws BaseAppException{ DBConnection ora = DBConnection.getInstance(); Connection conn = ora.createConnection(); PreparedStatement stmt = null; ResultSet rs = null; UserTo userDTO = null; Query = select * from SYSTEM_USER where SERVICE_NO=? and PASSWORD=?; if (conn != null) { try{ stmt = conn.prepareStatement(Query); stmt.setString(1, username); stmt.setString(2, password); rs = stmt.executeQuery(); while(rs.next()){ userDTO = new UserTo(); userDTO.setServiceNo(rs.getString(SERVICE_NO)); userDTO.setEmpName(rs.getString(EMP_NAME)); } } catch (SQLException sqle) { throw new BaseDBException(BaseDBException); } finally { try{ ora.closeConnection(conn); stmt.close(); rs.close(); }catch(SQLException e){ throw new BaseDBException(BaseDBException); } } }else{ throw new BaseDBException(BaseDBException); } return userDTO; } Regards, Sreenivasula Reddy A. DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---
RE: How To Lock User Account If he Failed to give Correct Password in three attempts
Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword); if(userDTO==null){ throw new LoginFailedException(LoginFailedException); } public UserTo getUser(String username, String password)throws BaseAppException{ DBConnection ora = DBConnection.getInstance(); Connection conn = ora.createConnection(); PreparedStatement stmt = null; ResultSet rs = null; UserTo userDTO = null; Query = select * from SYSTEM_USER where SERVICE_NO=? and PASSWORD=?; if (conn != null) { try{ stmt = conn.prepareStatement(Query); stmt.setString(1, username); stmt.setString(2, password); rs = stmt.executeQuery(); while(rs.next()){ userDTO = new UserTo(); userDTO.setServiceNo(rs.getString(SERVICE_NO)); userDTO.setEmpName(rs.getString(EMP_NAME)); } } catch (SQLException sqle) { throw new BaseDBException(BaseDBException); } finally { try{ ora.closeConnection(conn); stmt.close(); rs.close(); }catch(SQLException e){ throw new BaseDBException(BaseDBException); } } }else{ throw new BaseDBException(BaseDBException); } return userDTO; } Regards, Sreenivasula Reddy A. DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you
Re: Handeling org.apache.struts.chain.commands.InvalidPathException
You can either set up an exception handler for InvalidPathException or you can mark one of your actions in the struts-config.xml as unknown. Niall On 6/4/07, Nathan Hook [EMAIL PROTECTED] wrote: We have recently upgraded to struts 1.3.8 and have been running into the org.apache.struts.chain.commands.InvalidPathException when a user types in a url that doesn't map correctly. I am hoping to instead of show the user the tomcat exception page, I wanted to show a 404 error page. How do I go about changing the config files or struts to show the 404 page. Thank you for your time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hi
Hi. testing
RE: How To Lock User Account If he Failed to give Correct Password in three attempts
HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword); if(userDTO==null){ throw new LoginFailedException(LoginFailedException); } public UserTo getUser(String username, String password)throws BaseAppException{ DBConnection ora = DBConnection.getInstance(); Connection conn = ora.createConnection(); PreparedStatement stmt = null; ResultSet rs = null; UserTo userDTO = null; Query = select * from SYSTEM_USER where SERVICE_NO=? and PASSWORD=?; if (conn != null) { try{ stmt = conn.prepareStatement(Query); stmt.setString(1, username); stmt.setString(2, password); rs = stmt.executeQuery(); while(rs.next()){ userDTO = new UserTo(); userDTO.setServiceNo(rs.getString(SERVICE_NO)); userDTO.setEmpName(rs.getString(EMP_NAME)); } } catch (SQLException sqle) { throw new BaseDBException(BaseDBException); } finally { try{ ora.closeConnection(conn); stmt.close(); rs.close(); }catch(SQLException e){ throw new BaseDBException(BaseDBException); } } }else{ throw new
Re: using jstl sql tags for displaying date from database
--- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] ActionMessages and redirects
Hi, Thanks for your response. Yes, I think the interceptor will do. However, it just feels a bit clumsy to write 6 lines of XML in order to get functionality that Struts 1 provided in one. It may be a great solution for cases where your action messages have to survive multiple redirects but in 99.99% of my cases it is just one...and I am using quite a few of those in my apps. Thus, I miss the Struts 1 solution :-) Regards, Gunnar Al Sutton-3 wrote: Hi Gunnar, I've been through the same thing, so I can help you out :). If your actions extend com.opensymphony.xwork2.ActionSupport you can then call the method; addActionMessage(string) Or addActionError(string); Please note, string is the literal message, not a key into a properties file. If you want to use a properties file for multi-language systems you need to do the following; addActionMessage(getText(key)) Or addActionError(getText(key)) And create a file called package.properties in your action package (or at some point above in the package hierarchy) which has the translations. You will need to use the message store interceptor where you are using a redirect (i.e. you will need it in the redirect to the get), you should note though, at the moment there appears to be a bug in that if you use addActionError, the message store interceptor, and you have the validation interceptor enabled you will get redirected to the input result of the action after the redirect :(. Hope this helps, Al. -Original Message- From: Gunnar Hillert [mailto:[EMAIL PROTECTED] Sent: 04 June 2007 05:52 To: user@struts.apache.org Subject: [S2] ActionMessages and redirects Hi, Still learning but I am really going to like Struts 2. An area where I find it a bit lacking though (Compared to Struts 1) is the support for action messages to survive redirects. I really like to follow the 'Post/Redirect/Get pattern' for most of my actions. (See also http://www.theserverside.com/patterns/thread.tss?thread_id=20936) Therefore in most of my actions I have the requirement that my success messages survive the next redirect. In Struts 1 I can do: messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(user.added)); saveMessages(request.getSession(), messages); But there is nothing like this in Struts 2. I did not find too much information about this requirement in Struts 2. There are 2 open issues in Jira that touch the issue: https://issues.apache.org/struts/browse/WW-1623 https://issues.apache.org/struts/browse/WW-1572 On of the issues mentions the MessageStore interceptor but that looks a bit like overkill to me. (See also http://cwiki.apache.org/WW/message-store-interceptor.html) Thus, for right now I am using Appfuse's solution of using a custom filter. (See https://appfuse-light.dev.java.net/source/browse/appfuse-light/trunk/src/mai n/java/org/appfuse/web/MessageFilter.java) This works great but somehow feels like a 'hack' (Had to do the same for my Spring MVC projects.) * * * In a perfect world I would like to see a feature similar to Ruby on Rails' Flash which allows you to not only store messages but any object in a Flash, and hence those objects survive the next redirect. See also http://api.rubyonrails.com/classes/ActionController/Flash.html But for the time being I would be already quite happy if there was a simple and standardized way to have my actionMessages survive redirects. What is the status on that? Is this something that will be added to one of the next Struts 2 releases? Thanks a lot! Regards, Gunnar Hillert -- View this message in context: http://www.nabble.com/-S2--ActionMessages-and-redirects-tf3863054.html#a1094 3759 Sent from the Struts - User mailing list archive at Nabble.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] -- View this message in context: http://www.nabble.com/-S2--ActionMessages-and-redirects-tf3863054.html#a10967300 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How To Lock User Account If he Failed to give Correct Password in three attempts
Thanks guru I will come back to you after trying this snippet -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:29 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword); if(userDTO==null){ throw new LoginFailedException(LoginFailedException); } public UserTo getUser(String username, String password)throws BaseAppException{ DBConnection ora = DBConnection.getInstance(); Connection conn = ora.createConnection(); PreparedStatement stmt = null; ResultSet rs = null; UserTo userDTO = null; Query = select * from SYSTEM_USER where SERVICE_NO=? and PASSWORD=?; if (conn != null) { try{ stmt = conn.prepareStatement(Query); stmt.setString(1, username); stmt.setString(2, password); rs = stmt.executeQuery(); while(rs.next()){ userDTO = new UserTo(); userDTO.setServiceNo(rs.getString(SERVICE_NO)); userDTO.setEmpName(rs.getString(EMP_NAME)); } } catch (SQLException sqle) { throw new BaseDBException(BaseDBException); } finally { try{ ora.closeConnection(conn); stmt.close(); rs.close(); }catch(SQLException e){
s:radio/s:checkboxlist and primitive properties
I tried to use primitive types/arrays of primitives as name property of s:radio and s:checkboxlist. It works fine, but the state is not maintained because the ContainUtil.compare() method returns false as it compares e.g. an Integer and a Sting using Object.equals(). Is there a reason why we can't use primitives like in for example s:checkbox? I patched my own ContainUtil.compare() and it seems to work fine now - should I log a JIRA issue/RFE? Hope I haven't overlooked an existing issue/post on this! Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using jstl sql tags for displaying date from database
I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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: How To Lock User Account If he Failed to give Correct Password in three attempts
You know theres something about requests like this coming from hcl.in who describe themselves as Indias leading IT Technology Company that deeply concerns me. -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:08 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Thanks guru I will come back to you after trying this snippet -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:29 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword); if(userDTO==null){ throw new LoginFailedException(LoginFailedException); } public UserTo getUser(String username, String password)throws BaseAppException{ DBConnection ora = DBConnection.getInstance(); Connection conn = ora.createConnection(); PreparedStatement stmt = null; ResultSet rs = null; UserTo userDTO = null; Query = select * from SYSTEM_USER where SERVICE_NO=? and PASSWORD=?; if (conn != null) { try{ stmt = conn.prepareStatement(Query); stmt.setString(1, username); stmt.setString(2, password); rs = stmt.executeQuery(); while(rs.next()){ userDTO = new UserTo(); userDTO.setServiceNo(rs.getString(SERVICE_NO)); userDTO.setEmpName(rs.getString(EMP_NAME)); } } catch (SQLException sqle) {
RE: using jstl sql tags for displaying date from database
And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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: using jstl sql tags for displaying date from database
Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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]
Ending session
I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using jstl sql tags for displaying date from database
And the reason these aren't synchronized using NTP or a similar protocol would be...? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:33 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ending session
The server has no way of knowing if the client closes their browser. You'll just have to wait for the session to expire. -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:34 To: Struts Users Mailing List Subject: Ending session I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ? - 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: using jstl sql tags for displaying date from database
Do u have the solution or just wasting my time??? -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:09 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason these aren't synchronized using NTP or a similar protocol would be...? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:33 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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] - 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: using jstl sql tags for displaying date from database
I'm showing you the solution, but I'm not going to do your job for you. Now if you think about the question, that about how you would cope with adjusting the time on one server (the web server) by a fixed offset (if the database server is in another timezone), you'll see how you can do it without hitting your network and the database for each occasion where you want to get the time for a query. I've got no reason to waste your time, having seen your entirely flash website I can see why you need to do something about it. (sheesh, this reminds me of having to deal with students when I worked at a university). -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:47 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Do u have the solution or just wasting my time??? -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:09 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason these aren't synchronized using NTP or a similar protocol would be...? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:33 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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] - 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: Ending session
If all the attributes are stored in the session then it will destroy itself .. but if you want to clean other stuff not stored in the session they try To write an HttpSessionListener http://www.java2s.com/Code/Java/Servlets/Servletsessionlistener.htm http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSes sionListener.html Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:41 To: 'Struts Users Mailing List' Subject: RE: Ending session The server has no way of knowing if the client closes their browser. You'll just have to wait for the session to expire. -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:34 To: Struts Users Mailing List Subject: Ending session I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ? - 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: Ending session
On 05/06/07, Mansour [EMAIL PROTECTED] wrote: I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ? Implement an HttpSessionListener. The destroy() method will be invoked by the servlet container when the session ends. You should be aware that unless you have some means of detecting when the browser closes or the user navigates away from your site and you destroy the session yourself, the destroy() method will not called until the session times out. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How To Lock User Account If he Failed to give Correct Password in three attempts
I'm a firm beleiver in your RTFM answer. You seem to think I was being in some way racist against Indians, this isn't the case. If he had come from a company that said it was The UKs leading IT and technology company I would have made the same remark quoting the title of their website. My point was that if it's a leading IT and technology company of any country why doesn't he have a mentor or collegue to turn to who can answer this as opposed to using this list to go over some basics which should be part of the basic skills of anyone working on a webapp. Al. -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:48 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts May be he is just a trainee learning java / struts / MVC .. If he knew this concepts then why would he come here :) My suggestion is RTFM Remember I am an Indian as well (though I work in the UK) .. nothing wrong in being Indian or working for leading technology company as long as this type of questions is for training purpose and not into a production system for some company who are off-shoring their projects to them By the way why are we here? To help. :) Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:24 To: 'Struts Users Mailing List' Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts You know theres something about requests like this coming from hcl.in who describe themselves as Indias leading IT Technology Company that deeply concerns me. -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:08 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Thanks guru I will come back to you after trying this snippet -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:29 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword = com.dfs.common.helper.PasswordService.getInstance().encrypt(password); AccessControlDAO accessDAO = new AccessControlDAO(); UserTo userDTO = accessDAO.getUser(username, newPassword);
Test mail
Hi all, Please avoid this mail. I am just checking if I can mail this list. Thanks and regards, Kalpak
[OT] RE: using jstl sql tags for displaying date from database
--- Ambaris Mohanty wrote: Do u have the solution or just wasting my time??? The irony here is thick enough to slice. d. Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
custom interceptor in default stack
can we put our custom interceptor in struts-default.xml,if yes than what configurations are required. -- View this message in context: http://www.nabble.com/custom-interceptor-in-default-stack-tf3871308.html#a10968002 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom interceptor in default stack
--- sudeepj2ee [EMAIL PROTECTED] wrote: can we put our custom interceptor in struts-default.xml,if yes than what configurations are required. You *could*, but why wouldn't you just put it in your struts.xml and not worry about your customizations being lost when you upgrade your S2? d. Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: custom interceptor in default stack
Technically you can, but it's most likley not the best approach. See http://cwiki.apache.org/WW/interceptors.html for information on better ways, or, if you absolutley must, it will show you how to add it to struts-default. -Original Message- From: sudeepj2ee [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 13:02 To: user@struts.apache.org Subject: custom interceptor in default stack can we put our custom interceptor in struts-default.xml,if yes than what configurations are required. -- View this message in context: http://www.nabble.com/custom-interceptor-in-default-stack-tf3871308.html#a10 968002 Sent from the Struts - User mailing list archive at Nabble.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]
RE: How To Lock User Account If he Failed to give Correct Password in three attempts
No way I said that you are being racist I think you are great... Look at the smiley icon I had at the last RTFM is the only way to get the concepts right Mentors are when we get something wrong ... not for teaching concepts ... Happy coding and enjoy RTFM :) Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:56 To: 'Struts Users Mailing List' Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts I'm a firm beleiver in your RTFM answer. You seem to think I was being in some way racist against Indians, this isn't the case. If he had come from a company that said it was The UKs leading IT and technology company I would have made the same remark quoting the title of their website. My point was that if it's a leading IT and technology company of any country why doesn't he have a mentor or collegue to turn to who can answer this as opposed to using this list to go over some basics which should be part of the basic skills of anyone working on a webapp. Al. -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:48 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts May be he is just a trainee learning java / struts / MVC .. If he knew this concepts then why would he come here :) My suggestion is RTFM Remember I am an Indian as well (though I work in the UK) .. nothing wrong in being Indian or working for leading technology company as long as this type of questions is for training purpose and not into a production system for some company who are off-shoring their projects to them By the way why are we here? To help. :) Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:24 To: 'Struts Users Mailing List' Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts You know theres something about requests like this coming from hcl.in who describe themselves as Indias leading IT Technology Company that deeply concerns me. -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:08 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Thanks guru I will come back to you after trying this snippet -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:29 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword();
[OT] Mentors, Was: How To Lock User Account If he Failed to give Correct Password in three attempts
Thanks for the clarification :). I've been a Mentor a number of times in the past and I've always seen it as someone who guides as well as corrects. In companies I worked in a mentor has always been seen as the first port of call when a new coder has problems or is unsure of something, that way not only do the get an answer quickly they can also discuss the solution, and they can see any specifics a company may have about the way of doing something. I've always called the person who comes out of the woodwork only when I get something wrong a Manager :). -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 13:05 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts No way I said that you are being racist I think you are great... Look at the smiley icon I had at the last RTFM is the only way to get the concepts right Mentors are when we get something wrong ... not for teaching concepts ... Happy coding and enjoy RTFM :) Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:56 To: 'Struts Users Mailing List' Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts I'm a firm beleiver in your RTFM answer. You seem to think I was being in some way racist against Indians, this isn't the case. If he had come from a company that said it was The UKs leading IT and technology company I would have made the same remark quoting the title of their website. My point was that if it's a leading IT and technology company of any country why doesn't he have a mentor or collegue to turn to who can answer this as opposed to using this list to go over some basics which should be part of the basic skills of anyone working on a webapp. Al. -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:48 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts May be he is just a trainee learning java / struts / MVC .. If he knew this concepts then why would he come here :) My suggestion is RTFM Remember I am an Indian as well (though I work in the UK) .. nothing wrong in being Indian or working for leading technology company as long as this type of questions is for training purpose and not into a production system for some company who are off-shoring their projects to them By the way why are we here? To help. :) Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:24 To: 'Struts Users Mailing List' Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts You know theres something about requests like this coming from hcl.in who describe themselves as Indias leading IT Technology Company that deeply concerns me. -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:08 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Thanks guru I will come back to you after trying this snippet -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:29 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good
RE: using jstl sql tags for displaying date from database
Ok thanks for your reply n showing me the way. It seems you didn't get my question write. Let me explain it to you... When I query the database normally using sql:query/ tag I get a result set consisting of multiple rows, which I can display using using the c:forEach/ tag. But how to handle query like select sysdate from dual? The whole application is based upon struts framework. I have used struts 1.2.9. I thought jstl sql tag would be a better option to execute such small query since it's very simple. So, I'm trying to get it done using jstl. Can u help? AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:20 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I'm showing you the solution, but I'm not going to do your job for you. Now if you think about the question, that about how you would cope with adjusting the time on one server (the web server) by a fixed offset (if the database server is in another timezone), you'll see how you can do it without hitting your network and the database for each occasion where you want to get the time for a query. I've got no reason to waste your time, having seen your entirely flash website I can see why you need to do something about it. (sheesh, this reminds me of having to deal with students when I worked at a university). -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:47 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Do u have the solution or just wasting my time??? -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:09 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason these aren't synchronized using NTP or a similar protocol would be...? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:33 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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] - 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]
[OT] Re: using jstl sql tags for displaying date from database
Ambaris, I think it's quite the opposite here, but anyway... the fact is it's database dependent. Depending on the DB you may be able use select now() as a query and if it doesn't work consult you DB manual. The question has nothing to do with struts Oz On 05/06/2007, at 9:46 PM, Ambaris Mohanty wrote: Do u have the solution or just wasting my time??? -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:09 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason these aren't synchronized using NTP or a similar protocol would be...? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:33 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. __ __ Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities +for+kidsc s=bz - 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] - 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: using jstl sql tags for displaying date from database
I still don't understand why you're not using the server to get the date and explicitly including it in the query, for example; jsp:useBean id=now class=java.util.Date / sql:query var=books select * from table where date = ? sql:param value=${now} / /sql:query Or even doing all of the above in an action and using the jsp to display the results. Using the database as a timesource is something 99.9% of developers advise strongly against, isn't very well supported, and just isn't what a database is designed to do, hence why there is very little support for it. -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 13:19 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Ok thanks for your reply n showing me the way. It seems you didn't get my question write. Let me explain it to you... When I query the database normally using sql:query/ tag I get a result set consisting of multiple rows, which I can display using using the c:forEach/ tag. But how to handle query like select sysdate from dual? The whole application is based upon struts framework. I have used struts 1.2.9. I thought jstl sql tag would be a better option to execute such small query since it's very simple. So, I'm trying to get it done using jstl. Can u help? AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:20 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I'm showing you the solution, but I'm not going to do your job for you. Now if you think about the question, that about how you would cope with adjusting the time on one server (the web server) by a fixed offset (if the database server is in another timezone), you'll see how you can do it without hitting your network and the database for each occasion where you want to get the time for a query. I've got no reason to waste your time, having seen your entirely flash website I can see why you need to do something about it. (sheesh, this reminds me of having to deal with students when I worked at a university). -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:47 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Do u have the solution or just wasting my time??? -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 5:09 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason these aren't synchronized using NTP or a similar protocol would be...? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:33 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database Because the application is all about generating reports from the data in the database. So I want to display the database server time and not the web server time. It makes more sense to the users. AM -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:54 PM To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database And the reason for not using the server time would be..? -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:21 To: 'Struts Users Mailing List' Subject: RE: using jstl sql tags for displaying date from database I want to display the same time in all the client machines irrespective of their location. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:34 PM To: Struts Users Mailing List Subject: Re: using jstl sql tags for displaying date from database --- Ambaris Mohanty wrote: And I want that the date should come from the database. Why would you want the current date to come from the database? d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc s=bz - 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]
s:textfield key reads wrong key from i18n bundle
I have a Company object that's attached to my User object with the following JPA configuration: @ManyToOne(cascade = CascadeType.ALL, optional=true) @JoinColumn(name=company_id) public Company getCompany() { return company; } In my userForm.jsp, I'm trying to render allow users to edit the company name with the following textfield: s:textfield key=user.company.name required=false cssClass=text large / In my i18n bundle, I have two keys: company.name=Acme, Inc. user.company.name=Company Name For some reason, Acme, Inc. is getting rendered as the label instead of Company Name. As far as I can tell, this is a bug in Struts 2.0.6. Should I enter an issue for it in JIRA? Thanks, Matt -- View this message in context: http://www.nabble.com/%3Cs%3Atextfield-key%3E-reads-wrong-key-from-i18n-bundle-tf3871460.html#a10968459 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ending session
Mansour wrote: I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ? 1. provide a logout action. In this action, get the ServletRequest and invalidate the session immediately; but 2. if the user simply closes the browser, you have no option but to wait for the session to expire. Maybe all you really want is a shorter session timeout.; but 3. If you want a registry of all current sessions on the server so you can invalidate them manually, implement a HttpSessionListener and add this listener to web.xml. It will be notified whenever a session is created or destroyed so you to track the HttpSession objects yourself. Don't do this unless you really need it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom interceptor in default stack
I am going for a https and for switching between http and https for that i have made a interceptor, and there are arount 35 struts- xml files which are included in struts.xml,what i was thinking is that instead of inserting interceptor in each strut-xml i can have a global interceptor kind of thing that could reflect changes if mentioned at one place that could be achived only if i put that interceptor in default-xml which all my xml's are extending. Dave Newton-4 wrote: --- sudeepj2ee [EMAIL PROTECTED] wrote: can we put our custom interceptor in struts-default.xml,if yes than what configurations are required. You *could*, but why wouldn't you just put it in your struts.xml and not worry about your customizations being lost when you upgrade your S2? d. Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/custom-interceptor-in-default-stack-tf3871308.html#a10968910 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How To Lock User Account If he Failed to give Correct Password in three attempts
Your initial response to Srinivasula was OT and vague enough to make me think WTF? This is a place for individuals to meet and get help - whoever they work for and whatever their skill level. Lets not put new people off asking questions - just don't reply if something annoys you. Niall P.S. I think the same about using RTFM - just don't bother if you can't be courteous On 6/5/07, Al Sutton [EMAIL PROTECTED] wrote: I'm a firm beleiver in your RTFM answer. You seem to think I was being in some way racist against Indians, this isn't the case. If he had come from a company that said it was The UKs leading IT and technology company I would have made the same remark quoting the title of their website. My point was that if it's a leading IT and technology company of any country why doesn't he have a mentor or collegue to turn to who can answer this as opposed to using this list to go over some basics which should be part of the basic skills of anyone working on a webapp. Al. -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:48 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts May be he is just a trainee learning java / struts / MVC .. If he knew this concepts then why would he come here :) My suggestion is RTFM Remember I am an Indian as well (though I work in the UK) .. nothing wrong in being Indian or working for leading technology company as long as this type of questions is for training purpose and not into a production system for some company who are off-shoring their projects to them By the way why are we here? To help. :) Regards Guru -Original Message- From: Al Sutton [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:24 To: 'Struts Users Mailing List' Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts You know theres something about requests like this coming from hcl.in who describe themselves as Indias leading IT Technology Company that deeply concerns me. -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 12:08 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Thanks guru I will come back to you after trying this snippet -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:29 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts HttpSession session = request.getSession(); If ( session.getAttribute(LoginCount) == null ) { Session.setAttribute(LoginCount, new Integer(1)); } else { Integer loginCount = session.getAttribute(LoginCount); try { Writecode to login; } catch (Loginexception e) { If (loginCount.intValue() 2 ) { Write code to block the user return mapping.findForware(AccountLocked); } else { loginCount = new Integer(loginCount.intValue() +1 ); return mapping.findForware(Login); } } } Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 11:45 To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Yaa I know but I need some sample exact steps -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 4:13 PM To: Struts Users Mailing List Subject: RE: How To Lock User Account If he Failed to give Correct Password in three attempts Store the count in the session using appropriate name Once that is above the limit then write the code to lock it ... . One suggestion though . All business logic code in single action That is not a good design ... Cant you make your business objects more layered ? Regards Guru -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 10:17 To: Struts Users Mailing List Subject: How To Lock User Account If he Failed to give Correct Password in three attempts Hi Struts User Community, Here I am sending my login action code (part only) and My DAO Code. Now I have to lock the user if he failed to enter correct user name and password in three attempts. How can I implement this in struts? Please help me with some sample code or rough idea? String username = ((LoginForm) form).getUsername(); String password = ((LoginForm) form).getPassword(); String newPassword =
RE: custom interceptor in default stack
Any reason you're not using transport-guaranteeCONFIDENTIAL/transport-guarantee? Before you ask, here's a reference with an example that has a clickable link to the definition http://wiki.metawerx.net/Wiki.jsp?page=Web.xml -Original Message- From: sudeepj2ee [mailto:[EMAIL PROTECTED] Sent: 05 June 2007 14:00 To: user@struts.apache.org Subject: Re: custom interceptor in default stack I am going for a https and for switching between http and https for that i have made a interceptor, and there are arount 35 struts- xml files which are included in struts.xml,what i was thinking is that instead of inserting interceptor in each strut-xml i can have a global interceptor kind of thing that could reflect changes if mentioned at one place that could be achived only if i put that interceptor in default-xml which all my xml's are extending. Dave Newton-4 wrote: --- sudeepj2ee [EMAIL PROTECTED] wrote: can we put our custom interceptor in struts-default.xml,if yes than what configurations are required. You *could*, but why wouldn't you just put it in your struts.xml and not worry about your customizations being lost when you upgrade your S2? d. __ __ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/custom-interceptor-in-default-stack-tf3871308.html#a10 968910 Sent from the Struts - User mailing list archive at Nabble.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]
Re: Ending session
2. if the user simply closes the browser, you have no option but to wait for the session to expire. Maybe all you really want is a shorter session timeout.; but I'm sure that I've read that it's possible, using Javascript, to detect if a client closes the browser if that's true, then you could use an AJAX call to invalidate the session. Having said that, unless the you store huge amounts of data in the session, it probably won't be too much of a problem to wait for the session to timeout on its own. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ending session
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roger, Roger Varley wrote: I'm sure that I've read that it's possible, using Javascript, to detect if a client closes the browser if that's true, then you could use an AJAX call to invalidate the session. This is possible, but you can't bet on it actually working. The user might have javascript disabled, or the browser may not fire javascript events as it's closing itself entirely (instead of just closing one window, for instance). Basically, the only reliable way to destroy a session is to wait for it to time out (unless the user explicitly logs out, of course). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZWnT9CaO5/Lv0PARAr7sAKCwRHe0YRnmJ2VvE1m73OIxkthBPgCgrp/f 7quPP1ZU7RT0rN3M6fqe2jI= =AvW9 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] How do I disable tabletrtd tags generated by s:form ?
Hi! I've done several projects with struts1 and planned to use struts2 in my new project. I am amazed the the code is so concise in struts2. But I have quetsion about the s:form tag. When I use s:form and s:textfield, the table, tr and td tags are generated in html page. Can I disable this feature? Because it might interfere my page layout. Thanks!
Re: Ending session
Roger Varley wrote: I'm sure that I've read that it's possible, using Javascript, to detect if a client closes the browser if that's true, then you could use an AJAX call to invalidate the session. This is possible, but you can't bet on it actually working. The user might have javascript disabled, or the browser may not fire javascript events as it's closing itself entirely (instead of just closing one window, for instance). Basically, the only reliable way to destroy a session is to wait for it to time out (unless the user explicitly logs out, of course). I would not disagree with this. However, you have to suspect that the majority of clients don't have Javascript turned off, otherwise Ajax wouldn't be the current favourite technology. :-) Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Mentors, Was: How To Lock User Account If he Failed to give Correct Password in three attempts
Personally, I've never thought that RTFM or PRTM by itself is a sufficient response. Since all of our material is online, it's much better to provide a link directly to a relevant page in the documentation. IMHO, it's just as lazy to reply with RTM as it is to post without reading the manual. :) Sometimes, I've found that, in fact, the answer is not in the manual, or not easy to find. At which point, I try to add the page and then link to it. (Remember, anyone who files a CLA with the ASF is welcome to help with the documentation.) I would like to stress that we do not consider it acceptable to criticize anyone who makes a good-faith post to this list. The ASF motto is Criticize the code, not the coder. I would consider it a personal favor if we could avoid references to an individual or an individual's employer. The Struts User List has always been welcome to newcomers and to any question, no matter how basic or how naive, and I would very much like to keep that tradition alive. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ending session
I think the way it is mostly done is by using push events from the server. Have a look at Mortbay Jetty servlet container if you are really interested, It's supposed to handle continuations/push events quite well. If you can no longer push server events out you could make the assumption the client has disconnected. Greg Wilkins had a video on it not too long ago that was interesting - you should be able to find it on google easily. He's been working on the whole connection scalability issue for quite some time ( I think he had some experimental java.nio stuff back in v5.0). Overall though, I agree you can't reliably trust the browser to notify you of the end of session. Oz On 06/06/2007, at 12:42 AM, Roger Varley wrote: Roger Varley wrote: I'm sure that I've read that it's possible, using Javascript, to detect if a client closes the browser if that's true, then you could use an AJAX call to invalidate the session. This is possible, but you can't bet on it actually working. The user might have javascript disabled, or the browser may not fire javascript events as it's closing itself entirely (instead of just closing one window, for instance). Basically, the only reliable way to destroy a session is to wait for it to time out (unless the user explicitly logs out, of course). I would not disagree with this. However, you have to suspect that the majority of clients don't have Javascript turned off, otherwise Ajax wouldn't be the current favourite technology. :-) Regards Roger - 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: [S2] How do I disable tabletrtd tags generated by s:form ?
Take a look here: http://struts.apache.org/2.x/docs/why-do-the-form-tags-put-table-tags-around-controls.html musachy On 6/5/07, Vincent Lin [EMAIL PROTECTED] wrote: Hi! I've done several projects with struts1 and planned to use struts2 in my new project. I am amazed the the code is so concise in struts2. But I have quetsion about the s:form tag. When I use s:form and s:textfield, the table, tr and td tags are generated in html page. Can I disable this feature? Because it might interfere my page layout. Thanks! -- Hey you! Would you help me to carry the stone? Pink Floyd
Can I Redirect Action Result to Strut1 action in struts.xml
In the struts 2 configuration file struts.xml /restricted/main/Mene.do I know I cann't do that but anyone knows the way to fulfill the same functionality. Any suggestion would be appreciated! -- View this message in context: http://www.nabble.com/Can-I-Redirect-Action-Result-to-Strut1-action-in-struts.xml-tf3872273.html#a10971215 Sent from the Struts - User mailing list archive at Nabble.com.
Re: Can I Redirect Action Result to Strut1 action in struts.xml
--- panpan [EMAIL PROTECTED] wrote: In the struts 2 configuration file struts.xml /restricted/main/Mene.do I know I cann't do that but anyone knows the way to fulfill the same functionality. http://struts.apache.org/2.x/docs/result-types.html Noting in particular: http://struts.apache.org/2.x/docs/redirect-result.html d. Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handeling org.apache.struts.chain.commands.InvalidPathException
Thank you for your response. We actually have an Exception Handler setup and it catches java.lang.Exception. Here is the mapping for it... global-exceptions exception handler=com.xxx.action.ExtendedExceptionHandler key=global.error.message scope=request type=java.lang.Exception/ /global-exceptions Wouldn't this normally catch the org.apache.struts.chain.commands.InvalidPathException? Or do we specifically catch the InvalidPathException? Thank you for your time. Original Message Follows From: Niall Pemberton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Re: Handeling org.apache.struts.chain.commands.InvalidPathException Date: Tue, 5 Jun 2007 11:52:14 +0100 You can either set up an exception handler for InvalidPathException or you can mark one of your actions in the struts-config.xml as unknown. Niall On 6/4/07, Nathan Hook [EMAIL PROTECTED] wrote: We have recently upgraded to struts 1.3.8 and have been running into the org.apache.struts.chain.commands.InvalidPathException when a user types in a url that doesn't map correctly. I am hoping to instead of show the user the tomcat exception page, I wanted to show a 404 error page. How do I go about changing the config files or struts to show the 404 page. Thank you for your time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ PC Magazines 2007 editors choice for best Web mailaward-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_pcmag_0507 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] s:radio/ map to boolean property not checked
I have a java bean serviceData with a Boolean property autoActivate in my action. And I wrote a s:radio/ tag in my JSP: s:radio label=autoActivate name=serviceData.autoActivate list=#{'true':'true', 'false':'false'} / But the default radio button is not checked in my page. (While autoActivate is true the radio button of 'true' should be checked, but it isn't.) It works when I map s:select/ to java 1.5 enum, but it doesn't work when I map s:radio to java.lang.Boolean. Did I do anything wrong? Thanks.
Re: Can I Redirect Action Result to Strut1 action in struts.xml
Thanks, Dave. I just tried it. It worked. les;param name=actionNameMenu.do les;param name=namespace/restricted/main S2 knows to how to redirect to S1 action. That's great. Dave Newton-4 wrote: --- panpan [EMAIL PROTECTED] wrote: In the struts 2 configuration file struts.xml /restricted/main/Mene.do I know I cann't do that but anyone knows the way to fulfill the same functionality. http://struts.apache.org/2.x/docs/result-types.html Noting in particular: http://struts.apache.org/2.x/docs/redirect-result.html d. Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Can-I-Redirect-Action-Result-to-Strut1-action-in-struts.xml-tf3872273.html#a10971663 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] How do I disable tabletrtd tags generated by s:form ?
Hi Vincent, The table layout is default for forms using the xhtml theme. You have a couple options if you don't want to use that. Try the css_xhtml theme or the simple theme. 1. Specify a different default theme globally with the 'struts.ui.theme' property in your struts.xml file. For example, this line would do it for you: struts constant name=struts.ui.theme value=css_xhtml / /struts 2. You can specify it inline when you use the tag. For example, s:form theme=css_xhtml ... /s:form Although, I'm not sure if this theme designation cascades down through the child elements. It might take some experimenting. 3. Create your own theme by extending an existing one http://struts.apache.org/2.0.6/docs/extending-themes.html Eric Rank On Jun 5, 2007, at 8:17 AM, Vincent Lin wrote: Hi! I've done several projects with struts1 and planned to use struts2 in my new project. I am amazed the the code is so concise in struts2. But I have quetsion about the s:form tag. When I use s:form and s:textfield, the table, tr and td tags are generated in html page. Can I disable this feature? Because it might interfere my page layout. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I Redirect Action Result to Strut1 action in struts.xml
panpan wrote: Thanks, Dave. I just tried it. It worked. les;param name=actionNameMenu.doles;/param les;param name=namespace/restricted/mainles;/param S2 knows to how to redirect to S1 action. That's great. Dave Newton-4 wrote: --- panpan [EMAIL PROTECTED] wrote: In the struts 2 configuration file struts.xml /restricted/main/Mene.do I know I cann't do that but anyone knows the way to fulfill the same functionality. http://struts.apache.org/2.x/docs/result-types.html Noting in particular: http://struts.apache.org/2.x/docs/redirect-result.html d. Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Can-I-Redirect-Action-Result-to-Strut1-action-in-struts.xml-tf3872273.html#a10971838 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I Redirect Action Result to Strut1 action in struts.xml
--- panpan [EMAIL PROTECTED] wrote: Thanks, Dave. I just tried it. It worked. That's great :) Just an FYI; I, at least, am receiving three copies of each of your list posts. d. 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:radio/ map to boolean property not checked
I think you have the same problem as I just had. Because you put the values as literals in s:radio, the tag ends up comparing a String true against a Boolean true which of course returns false. Could you try the tag like this: s:radio label=autoActivate name=serviceData.autoActivate list=#{true:'true', false:'false'} / Torsten Vincent Lin schrieb: I have a java bean serviceData with a Boolean property autoActivate in my action. And I wrote a s:radio/ tag in my JSP: s:radio label=autoActivate name=serviceData.autoActivate list=#{'true':'true', 'false':'false'} / But the default radio button is not checked in my page. (While autoActivate is true the radio button of 'true' should be checked, but it isn't.) It works when I map s:select/ to java 1.5 enum, but it doesn't work when I map s:radio to java.lang.Boolean. Did I do anything wrong? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Softer action mappings
Is there a way to get the current request substituted in an action mapping? action name=PayrollUpdate_* method={1} class=prAction result name=input type=tiles${currentRequest}/result I'd rather not stash this in a session variable if it's available someplace! -- Scott [EMAIL PROTECTED]
Re: s:radio/s:checkboxlist and primitive properties
Sorry I just realize I didn't use the tag the right way. I had String literals in my list instead of the actual primitives/objects... Now of course it works just fine without any patching! Slowly, but I am getting there ;-) Torsten Torsten Römer schrieb: I tried to use primitive types/arrays of primitives as name property of s:radio and s:checkboxlist. It works fine, but the state is not maintained because the ContainUtil.compare() method returns false as it compares e.g. an Integer and a Sting using Object.equals(). Is there a reason why we can't use primitives like in for example s:checkbox? I patched my own ContainUtil.compare() and it seems to work fine now - should I log a JIRA issue/RFE? Hope I haven't overlooked an existing issue/post on this! Torsten - 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: Quetsions about s:datepicker tag
1. nope, you will have to use 2 pickers, one for the time and another for the date 2. nope 3. Big bug in datetimepicker: https://issues.apache.org/struts/browse/WW-1917 , until 2.1, you would have to use an String for the field that will be assigned the date value, or use a converter. musachy On 6/5/07, Vincent Lin [EMAIL PROTECTED] wrote: Hi, I've tried s:datepicker/ tag in my JSP. It's really a cool tag which render a date selection javascript control. But I have some quetsions about this tag: 1. Can I select date and time simultaneously in one datepicker control? Currently I map a date property in action to 2 separate datepicker in JSP: one is for date, and the other is for time. 2. Can I select second in datepicker? 3. When I first use datepicker tag in my JSP, I encounterred a type conversion problem. I got an error message like this: ERROR - ParametersInterceptor - ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'userData.createDate' with value '[Ljava.lang.String;@16b7f83' It was solved by writing an type converter and configured in xwork-conversion.properties. But I saw the document says that date converter is provided by struts2, we don't need to configure it manually. Is this problem caused by locale? I am using traditional Chinese (zh_TW). Thanks! -- Hey you! Would you help me to carry the stone? Pink Floyd
is there anyway to store the previous added lateExtraAmount?
hi, iam using struts, i have one class i.e LateExtra,in this class i have wriiten the code like below double lateExtraAmount = calc.calculateLateExtra(currentContract); from the above iam getting the lateExtraAmount for ex:intially the amount is 2000 After that i Updated the amount to 2500, then the lateExtraAmount =Updated Amount-Intial amount i.e 500, then After that iam setting the value as model.setAmount(String.valueOf(lateExtraAmount)); After some time I updated the amount from 2500 to 2600 then lateExtraAmount=Updated Amount-Intial amount i.e 100. but i want the previous added lateExtraAmount and Latest added lateExtraAmount .for that i have wriiten the code like below String newLateExtraAmount=new Double(Double.parseDouble(model.getAmount())+lateExtraAmount).toString(). model.setAmount(String.valueOf(newLateExtraAmount)); but the problem with the above code is whenever iam going to that screen the amount is incrementing. my problem is there anyway to store the previous added lateExtraAmount? so that i can add the previous added lateExtraAmount with Latest added lateExtraAmount.i will get the result properly if anybody knows please assist me i have been trying from the last two days... thanks, prasad - Heres a new way to find what you're looking for - Yahoo! Answers
datetimepicker shows 1907 when populated from existing value
I'm having a problem with the datetimepicker where it always thinks the year is 1907 when it gets loaded from an existing value. I have only been able to find this thread on the issue which suggests there is a bug but doesn't really provide any real work around ... http://www.mail-archive.com/user@struts.apache.org/msg61093.html I am using a String to store the value from the date picker as suggested by the last message in the thread but I am still getting the same behavior. Is there any solution or work around to this problem using struts 2.0.6? -- Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Mixing JSP variables and strut properties
Before I begin, I apologize if I offend anyone by asking a question that could easily be found in the Struts 2 documentation by searching for the correct keywords, and, no, I did not read the entire Struts documentation nor any other Struts textbook (though I did read and appreciate a good chunk of the Starting Struts 2 book). See code below (numbered with cat -n). Lines 0,1 work well. Lines 4,7,8 don't work. For line 4, I also tried %{}, %= %. For line 7/8 I tried device[i]. Can someone tell me the correct way to escape/access the JSP variables inside a Struts tag, and a Struts property (from a getter) in JSP? Thanks! Code: 0 PIN1: s:property value=device[0].PIN/ 1 Total Count: s:property value=deviceCount/ 2 TABLE 3 % 4 for ( int i = 0; i deviceCount; i++ ) { 5 % 6 TR 7 TDs:property value=device[%{i}].PIN//TD 8 TDs:property value=device[%=i%].version//TD 9 /TR 10 % 11 } 12 % 13 /TABLE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts-Jsp display
All, I have a requirement in which I display reports in a jsp using Struts. The reports pull huge data like 3-5 records will be in the jsp page. Right now, I get the records in an array from my DAO and then set them to my form bean. In results jsp, I iterate through it and use bean:write tag to write all values in jsp. This approach is pretty slow. After it displays all records the page simply hangs. From IE page I cannot move forward/backward etc Can anyone suggest an improvement ? In DAO i just do JDBC select and get the records. JDBC retrieves query fast. Thanks. - Got a little couch potato? Check out fun summer activities for kids.
Re: Struts-Jsp display
2007/6/5, Maya menon [EMAIL PROTECTED]: Can anyone suggest an improvement ? I think that you need some sort of paging. One of the most used technique is by using displaytag: http://displaytag.sf.net/ HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Menu
Hi All, I am new to struts menu. Can anybody please help where I can find a good tutorial or suggest me a good place to start work with struts menu. Thanks in advance. -- Regards Archer
Re: Struts Menu
2007/6/5, Archer [EMAIL PROTECTED]: Hi All, I am new to struts menu. Can anybody please help where I can find a good tutorial or suggest me a good place to start work with struts menu. Thanks in advance. Probably at Struts Menu website http://struts-menu.sourceforge.net/ Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: datetimepicker shows 1907 when populated from existing value
What is the format of the date in the string? If you stick to RFC 3339 it should be fine : -MM-dd (this is just the value, the display format can be set using the displayFormat attribute) musachy On 6/5/07, Allen Gilliland [EMAIL PROTECTED] wrote: I'm having a problem with the datetimepicker where it always thinks the year is 1907 when it gets loaded from an existing value. I have only been able to find this thread on the issue which suggests there is a bug but doesn't really provide any real work around ... http://www.mail-archive.com/user@struts.apache.org/msg61093.html I am using a String to store the value from the date picker as suggested by the last message in the thread but I am still getting the same behavior. Is there any solution or work around to this problem using struts 2.0.6? -- Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Mixing JSP variables and strut properties
PIN1: s:property value=device[0].PIN/ Total Count: s:property value=deviceCount/ TABLE s:iterator value=device TR TD s:property value=PIN/ /TD TD s:property value=version//TD /TR /s:iterator /TABLE some references: iterator: http://struts.apache.org/2.x/docs/iterator.html OGNL: http://struts.apache.org/2.x/docs/ognl.html musachy On 6/5/07, yitzle [EMAIL PROTECTED] wrote: Before I begin, I apologize if I offend anyone by asking a question that could easily be found in the Struts 2 documentation by searching for the correct keywords, and, no, I did not read the entire Struts documentation nor any other Struts textbook (though I did read and appreciate a good chunk of the Starting Struts 2 book). See code below (numbered with cat -n). Lines 0,1 work well. Lines 4,7,8 don't work. For line 4, I also tried %{}, %= %. For line 7/8 I tried device[i]. Can someone tell me the correct way to escape/access the JSP variables inside a Struts tag, and a Struts property (from a getter) in JSP? Thanks! Code: 0 PIN1: s:property value=device[0].PIN/ 1 Total Count: s:property value=deviceCount/ 2 TABLE 3 % 4 for ( int i = 0; i deviceCount; i++ ) { 5 % 6 TR 7 TDs:property value=device[%{i}].PIN//TD 8 TDs:property value=device[%=i%].version//TD 9 /TR 10 % 11 } 12 % 13 /TABLE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: datetimepicker shows 1907 when populated from existing value
I am just using the default settings ... s:datetimepicker name=bean.dateString / when the form is submitted i see that there are actually 2 values submitted, the dojo.bean.dateString and bean.dateString. the format for dojo.bean.dateString is RFC 3339 and the format of bean.dateString is DateFormat.SHORT (mm/dd/yy). if i start with a fresh form and no pre-populated data, select a date and submit, the value is properly in 2007. but if that field is pre-populated because of a validation error or from existing data then it seems to always show 1907, both in the date selector and in the value if i submit the form again. i am assuming that when the datetimepicker is being initialized from an existing value it has to be looking at the value of bean.dateString, which if i select today has a value of 6/5/07. perhaps it's not properly converting that display date into the RFC 3339 value it uses internally? -- Allen Musachy Barroso wrote: What is the format of the date in the string? If you stick to RFC 3339 it should be fine : -MM-dd (this is just the value, the display format can be set using the displayFormat attribute) musachy On 6/5/07, Allen Gilliland [EMAIL PROTECTED] wrote: I'm having a problem with the datetimepicker where it always thinks the year is 1907 when it gets loaded from an existing value. I have only been able to find this thread on the issue which suggests there is a bug but doesn't really provide any real work around ... http://www.mail-archive.com/user@struts.apache.org/msg61093.html I am using a String to store the value from the date picker as suggested by the last message in the thread but I am still getting the same behavior. Is there any solution or work around to this problem using struts 2.0.6? -- Allen - 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: datetimepicker shows 1907 when populated from existing value
On 6/5/07, Allen Gilliland [EMAIL PROTECTED] wrote: I am just using the default settings ... s:datetimepicker name=bean.dateString / when the form is submitted i see that there are actually 2 values submitted, the dojo.bean.dateString and bean.dateString. the format for dojo.bean.dateString is RFC 3339 and the format of bean.dateString is DateFormat.SHORT (mm/dd/yy). That's the bug you mentioned earlier, the value in dojo.bean.dateStringshould be the text that is entered on the date picker(which is ignored by S2), and the one in bean.dateString should be the RFC, but they are switched :( i am assuming that when the datetimepicker is being initialized from an existing value it has to be looking at the value of bean.dateString, which if i select today has a value of 6/5/07. perhaps it's not properly converting that display date into the RFC 3339 value it uses internally? When the date picker gets the value from the stack, if it isn't a Date object, it will try to parse it using the value of the displayFormat, and then format it to RFC (Dojo wants it in RFC). If the value cannot be parsed then it will be passed to Dojo as is. That's why I suggested to use RFC 3339. On 2.1 the datepicker will be able to use Calendar, Date and String fields (different formats will be used to try to parse from the String, SimpleDateFormat.*, RFC 3399, and displayFormat) //I almost sound like I'm trying to sell 2.1 :) musachy -- Allen Musachy Barroso wrote: What is the format of the date in the string? If you stick to RFC 3339 it should be fine : -MM-dd (this is just the value, the display format can be set using the displayFormat attribute) musachy On 6/5/07, Allen Gilliland [EMAIL PROTECTED] wrote: I'm having a problem with the datetimepicker where it always thinks the year is 1907 when it gets loaded from an existing value. I have only been able to find this thread on the issue which suggests there is a bug but doesn't really provide any real work around ... http://www.mail-archive.com/user@struts.apache.org/msg61093.html I am using a String to store the value from the date picker as suggested by the last message in the thread but I am still getting the same behavior. Is there any solution or work around to this problem using struts 2.0.6 ? -- Allen - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Softer action mappings
do you mean the request url? musachy On 6/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is there a way to get the current request substituted in an action mapping? action name=PayrollUpdate_* method={1} class=prAction result name=input type=tiles${currentRequest}/result I'd rather not stash this in a session variable if it's available someplace! -- Scott [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Ending session
Probably the easiest way to do this would be to have a very short session timeout period (5minutes?) set on the server. You could then have a JavaScript function that polls the server every 5 minutes. Each ajax request made by the JavaScript will reset the session timer on the server. On 6/5/07, Mansour [EMAIL PROTECTED] wrote: I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Why are my struts pages rendering slow
I have a page with several form fields (checkboxes, drop downs, radio buttons)... The page renders slowly from top to bottom, as if it's being streamed...I posted this same issue a couple of weeks ago, and I'm still trying to figure out the solution... I have devMode = false, and tried everything under the sun... I have a similar page in JSF, and it renders very fast...Any ideas??? Charbel
Re: [S2] Why are my struts pages rendering slow
do you have an s:head tag in the head section of your pages? are you using the ajax theme? i have noticed that my pages are a lot slower when they have to include and initialize the dojo stuff. -- Allen Charbel Abdul-Massih wrote: I have a page with several form fields (checkboxes, drop downs, radio buttons)... The page renders slowly from top to bottom, as if it's being streamed...I posted this same issue a couple of weeks ago, and I'm still trying to figure out the solution... I have devMode = false, and tried everything under the sun... I have a similar page in JSF, and it renders very fast...Any ideas??? Charbel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: datetimepicker shows 1907 when populated from existing value
Musachy Barroso wrote: On 6/5/07, Allen Gilliland [EMAIL PROTECTED] wrote: I am just using the default settings ... s:datetimepicker name=bean.dateString / when the form is submitted i see that there are actually 2 values submitted, the dojo.bean.dateString and bean.dateString. the format for dojo.bean.dateString is RFC 3339 and the format of bean.dateString is DateFormat.SHORT (mm/dd/yy). That's the bug you mentioned earlier, the value in dojo.bean.dateStringshould be the text that is entered on the date picker(which is ignored by S2), and the one in bean.dateString should be the RFC, but they are switched :( i am assuming that when the datetimepicker is being initialized from an existing value it has to be looking at the value of bean.dateString, which if i select today has a value of 6/5/07. perhaps it's not properly converting that display date into the RFC 3339 value it uses internally? When the date picker gets the value from the stack, if it isn't a Date object, it will try to parse it using the value of the displayFormat, and then format it to RFC (Dojo wants it in RFC). If the value cannot be parsed then it will be passed to Dojo as is. That's why I suggested to use RFC 3339. On 2.1 the datepicker will be able to use Calendar, Date and String fields (different formats will be used to try to parse from the String, SimpleDateFormat.*, RFC 3399, and displayFormat) //I almost sound like I'm trying to sell 2.1 :) I wish it was already out so that I could use it. In any case, it sounds like there are a number of bugs with the current datetimepicker so I think I'll find an alternative solution until 2.1 comes out and the bugs are worked out. Thanks for the explanation. -- Allen musachy -- Allen Musachy Barroso wrote: What is the format of the date in the string? If you stick to RFC 3339 it should be fine : -MM-dd (this is just the value, the display format can be set using the displayFormat attribute) musachy On 6/5/07, Allen Gilliland [EMAIL PROTECTED] wrote: I'm having a problem with the datetimepicker where it always thinks the year is 1907 when it gets loaded from an existing value. I have only been able to find this thread on the issue which suggests there is a bug but doesn't really provide any real work around ... http://www.mail-archive.com/user@struts.apache.org/msg61093.html I am using a String to store the value from the date picker as suggested by the last message in the thread but I am still getting the same behavior. Is there any solution or work around to this problem using struts 2.0.6 ? -- Allen - 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: [S2] Why are my struts pages rendering slow
I am not using the ajax theme...I'm not using any specialized concepts...just straight struts 2 tags, and a combination of the css_xhtml theme and the simple theme... I did notice however, that when my page only has s:property.../ tags, to write out text, and no form fields, it renders faster... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen Gilliland Sent: Tuesday, June 05, 2007 3:24 PM To: Struts Users Mailing List Subject: Re: [S2] Why are my struts pages rendering slow do you have an s:head tag in the head section of your pages? are you using the ajax theme? i have noticed that my pages are a lot slower when they have to include and initialize the dojo stuff. -- Allen Charbel Abdul-Massih wrote: I have a page with several form fields (checkboxes, drop downs, radio buttons)... The page renders slowly from top to bottom, as if it's being streamed...I posted this same issue a couple of weeks ago, and I'm still trying to figure out the solution... I have devMode = false, and tried everything under the sun... I have a similar page in JSF, and it renders very fast...Any ideas??? Charbel - 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]
AW: Struts-Jsp display
Hi Maya, I suggest you should implement a paging mechanism not only on the struts side but also on the query side as well. Take you original select and enclose it by an outer select using the rownum to fetch only the records needed for display. A simple example (Oracle 10g): Original query: select * from s2location Now with an additional outer select select * from ( select * from s2location ) x where rownum10 and rownum=20 Then you use variables for min and max rownum and you are able to fetch only the records needed from the database. Your action can use parameters or you can use custom tags to implement the paging. Advantage: your bean with the records holds only the records displayed and therefore you need little memory. Disadvantage: every paging action triggers a database select. As far as I know the displaytag uses the other approach: store the entire select in a bean and navigate through it. From the point of the user this is very fast as the entire result set is already in the memory and paging is easy. But it needs a lot of memory and you should not have a lot of similiar objects in your application. The decision which way to go depends on your application layout and hard- and software enviroment. We have a dedicated Oracle server and an dedicated App-Server and are using mostly query based paging. Regards, Norbert Norbert Hirneisen science4you Online-Monitoring Please visit us: http://www.science4you.org (in German) Norbert Hirneisen Science Communications von-Müllenark-Str. 19 53179 Bonn phone +49-228-6194930 -Ursprüngliche Nachricht- Von: Maya menon [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 5. Juni 2007 20:09 An: user@struts.apache.org Betreff: Struts-Jsp display All, I have a requirement in which I display reports in a jsp using Struts. The reports pull huge data like 3-5 records will be in the jsp page. Right now, I get the records in an array from my DAO and then set them to my form bean. In results jsp, I iterate through it and use bean:write tag to write all values in jsp. This approach is pretty slow. After it displays all records the page simply hangs. From IE page I cannot move forward/backward etc Can anyone suggest an improvement ? In DAO i just do JDBC select and get the records. JDBC retrieves query fast. Thanks. - Got a little couch potato? Check out fun summer activities for kids. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Why are my struts pages rendering slow
--- Charbel Abdul-Massih wrote: I did notice however, that when my page only has s:property.../ tags, to write out text, and no form fields, it renders faster... http://struts.apache.org/2.x/docs/performance-tuning.html Note in particular the exclamation-pointed section titled Copy the /template directory from the Struts 2 jar in your WEB_APP root. d. Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Why are my struts pages rendering slow
The most interesting part is in IE, it renders quick...in Firefox, the top of the page renders, then slowly, it renders the rest of the page line by line...Any suggestions??? -Original Message- From: Charbel Abdul-Massih [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 3:28 PM To: Struts Users Mailing List Subject: RE: [S2] Why are my struts pages rendering slow I am not using the ajax theme...I'm not using any specialized concepts...just straight struts 2 tags, and a combination of the css_xhtml theme and the simple theme... I did notice however, that when my page only has s:property.../ tags, to write out text, and no form fields, it renders faster... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen Gilliland Sent: Tuesday, June 05, 2007 3:24 PM To: Struts Users Mailing List Subject: Re: [S2] Why are my struts pages rendering slow do you have an s:head tag in the head section of your pages? are you using the ajax theme? i have noticed that my pages are a lot slower when they have to include and initialize the dojo stuff. -- Allen Charbel Abdul-Massih wrote: I have a page with several form fields (checkboxes, drop downs, radio buttons)... The page renders slowly from top to bottom, as if it's being streamed...I posted this same issue a couple of weeks ago, and I'm still trying to figure out the solution... I have devMode = false, and tried everything under the sun... I have a similar page in JSF, and it renders very fast...Any ideas??? Charbel - 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: [S2] Why are my struts pages rendering slow
I *just* had the same issue. One table, (5 columns), displaying anywhere from 10 to 50 records. Hidden behind some CSS Div code, I had: Column 1 : Textbox control Column 2 : Select control with 6 options Column 3 : Select control with 5 options Column 4 and 5 : Edit and Delete hyperlinks. Same thing. Faster on IE and slow rendering on Firefox. I figured it was the fact that with that many form controls, (anywhere from 30 to 150 of them on one page), the browser was taking a little longer to display the page. I took the CSS code out that hid my form controls, (so that you would see the form controls upon initial browser hit), and I saw the same browser display slowness. It didn't matter if they were hidden or initially viewable. I now use some Javascript to create the form controls, per record, based on when the user hits the Edit hyperlink. By creating the form controls on a need-it-now basis, (instead of 'need-the-at-the-beginning'), I have 0 form controls upon first viewing. My page renders as fast as a static page would now. Just a thought Jon -Original Message- From: Charbel Abdul-Massih [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 12:31 PM To: Struts Users Mailing List Subject: RE: [S2] Why are my struts pages rendering slow The most interesting part is in IE, it renders quick...in Firefox, the top of the page renders, then slowly, it renders the rest of the page line by line...Any suggestions??? -Original Message- From: Charbel Abdul-Massih [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 3:28 PM To: Struts Users Mailing List Subject: RE: [S2] Why are my struts pages rendering slow I am not using the ajax theme...I'm not using any specialized concepts...just straight struts 2 tags, and a combination of the css_xhtml theme and the simple theme... I did notice however, that when my page only has s:property.../ tags, to write out text, and no form fields, it renders faster... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen Gilliland Sent: Tuesday, June 05, 2007 3:24 PM To: Struts Users Mailing List Subject: Re: [S2] Why are my struts pages rendering slow do you have an s:head tag in the head section of your pages? are you using the ajax theme? i have noticed that my pages are a lot slower when they have to include and initialize the dojo stuff. -- Allen Charbel Abdul-Massih wrote: I have a page with several form fields (checkboxes, drop downs, radio buttons)... The page renders slowly from top to bottom, as if it's being streamed...I posted this same issue a couple of weeks ago, and I'm still trying to figure out the solution... I have devMode = false, and tried everything under the sun... I have a similar page in JSF, and it renders very fast...Any ideas??? Charbel - 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]
Re: Handeling org.apache.struts.chain.commands.InvalidPathException
On 6/5/07, Nathan Hook [EMAIL PROTECTED] wrote: Thank you for your response. We actually have an Exception Handler setup and it catches java.lang.Exception. Here is the mapping for it... global-exceptions exception handler=com.xxx.action.ExtendedExceptionHandler key=global.error.message scope=request type=java.lang.Exception/ /global-exceptions Wouldn't this normally catch the org.apache.struts.chain.commands.InvalidPathException? Or do we specifically catch the InvalidPathException? Looking at the source code seems that you have to define each specific exception. Niall Thank you for your time. Original Message Follows From: Niall Pemberton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Re: Handeling org.apache.struts.chain.commands.InvalidPathException Date: Tue, 5 Jun 2007 11:52:14 +0100 You can either set up an exception handler for InvalidPathException or you can mark one of your actions in the struts-config.xml as unknown. Niall On 6/4/07, Nathan Hook [EMAIL PROTECTED] wrote: We have recently upgraded to struts 1.3.8 and have been running into the org.apache.struts.chain.commands.InvalidPathException when a user types in a url that doesn't map correctly. I am hoping to instead of show the user the tomcat exception page, I wanted to show a 404 error page. How do I go about changing the config files or struts to show the 404 page. Thank you for your time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ PC Magazine's 2007 editors' choice for best Web mail—award-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_pcmag_0507 - 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: [S2] Mixing JSP variables and strut properties
Thank you. I got it to work (after playing with it for an hour. Stupid array variables sometimes are singular and sometimes plural. I need to decide on one or the other... An hour because I don't know my own naming... ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I Redirect Action Result to Strut1 action in struts.xml
if you are constructing the url using the s:url tag, there are two different attributes you may be using. The action attribute assumes that the action will end in *.action, so you can't forward to a Struts-1 action using the action attribute. Instead use the 'value' attribute, and you can then forward to 'myaction.do', and it works. panpan wrote: It was very sad to find out that the redirect URL is like http://localhost:8080/restricted/main/Menu.do.action. even though the page is correctly displayed. When I click 'Submit', there is exception: There is no Action mapped for action name Menu.do. Anyone knows how to solve this problem, is there a parameter I can set to let S2 knows to redirect to S1? So S2 will not add an extra action string at the end of URL. Thanks in advance! quote author=panpan Thanks, Dave. I just tried it. It worked. les;param name=actionNameMenu.doles;/param les;param name=namespace/restricted/mainles;/param S2 knows to how to redirect to S1 action. That's great. Dave Newton-4 wrote: --- panpan [EMAIL PROTECTED] wrote: In the struts 2 configuration file struts.xml /restricted/main/Mene.do I know I cann't do that but anyone knows the way to fulfill the same functionality. http://struts.apache.org/2.x/docs/result-types.html Noting in particular: http://struts.apache.org/2.x/docs/redirect-result.html d. Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Can-I-Redirect-Action-Result-to-Strut1-action-in-struts.xml-tf3872273.html#a10978742 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
is there anyway to store the previous added lateExtraAmount?
hi, iam using struts, i have one class i.e LateExtra,in this class i have wriiten the code like below double lateExtraAmount = calc.calculateLateExtra(currentContract); from the above iam getting the lateExtraAmount for ex:intially the amount is 2000 After that i Updated the amount to 2500, then the lateExtraAmount =Updated Amount-Intial amount i.e 500, then After that iam setting the value as model.setAmount(String.valueOf(lateExtraAmount)); After some time I updated the amount from 2500 to 2600 then lateExtraAmount=Updated Amount-Intial amount i.e 100. but i want the previous added lateExtraAmount and Latest added lateExtraAmount .for that i have wriiten the code like below String newLateExtraAmount=new Double(Double.parseDouble(model.getAmount())+lateExtraAmount).toString(). model.setAmount(String.valueOf(newLateExtraAmount)); but the problem with the above code is whenever iam going to that screen the amount is incrementing. my problem is there anyway to store the previous added lateExtraAmount? so that i can add the previous added lateExtraAmount with Latest added lateExtraAmount.i will get the result properly if anybody knows please assist me i have been trying from the last two days... thanks, prasad - Download prohibited? No problem! CHAT from any browser, without download.
How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?
Recent issue is driving me batty. Suddenly started receiving exceptions in app server logs (tomcat a la jboss)... Servlet.service() for servlet AxisServlet threw exception java.lang.IllegalStateException org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:220) org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:610) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) After many many hours of research, appears that I get this exception if a specific struts action (one of several) executes at the same time as a SOAP call to the AxisServlet. It ends up causing the return of an empty dataset to the calling SOAP client (and giving me a bad headache to boot). Weird. The actions that appear to cause this aren't special in any way (not any different than other actions in my application), but I am obviously missing something. I have a suspicion that the struts actions that cause this are all chained events (one action calls another which leads to a JSPbut can't completely confirm). Any thoughts? How can the activities of one servlet effect another such as this? Yes...they are in the same war/ear..and they probably share some common classes. For the record...Jboss 4./tomcat 5.5 Struts 1.3X and Axis 1.2 (although have tried 1.4...same results). Java 1.5 on FreeBSD 6.0. Any help would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?
--- Jeff Amiel [EMAIL PROTECTED] wrote: Recent issue is driving me batty. Suddenly started receiving exceptions in app server logs (tomcat a la jboss)... *Nothing* else changed in the app and/or configuration? Any thoughts? How can the activities of one servlet effect another such as this? Yes...they are in the same war/ear..and they probably share some common classes. I almost always suspect non-synchronized data first if there's no config or app changes that might have brought on non-deterministic behavior like that. d. ___ You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
is there anyway to store the previous added lateExtraAmount
hi, iam using struts, i have one class i.e LateExtra,in this class i have wriiten the code like below double lateExtraAmount = calc.calculateLateExtra(currentContract); from the above iam getting the lateExtraAmount for ex:intially the amount is 2000 After that i Updated the amount to 2500, then the lateExtraAmount =Updated Amount-Intial amount i.e 500, then After that iam setting the value as model.setAmount(String.valueOf(lateExtraAmount)); After some time I updated the amount from 2500 to 2600 then lateExtraAmount=Updated Amount-Intial amount i.e 100. but i want the previous added lateExtraAmount and Latest added lateExtraAmount .for that i have wriiten the code like below String newLateExtraAmount=new Double(Double.parseDouble(model.getAmount())+lateExtraAmount).toString(). model.setAmount(String.valueOf(newLateExtraAmount)); but the problem with the above code is whenever iam going to that screen the amount is incrementing. my problem is there anyway to store the previous added lateExtraAmount? so that i can add the previous added lateExtraAmount with Latest added lateExtraAmount.i will get the result properly if anybody knows please assist me i have been trying from the last two days... thanks, prasad - Heres a new way to find what you're looking for - Yahoo! Answers
is there anyway to store the previous added lateExtraAmount
hi, iam using struts, i have one class i.e LateExtra,in this class i have wriiten the code like below double lateExtraAmount = calc.calculateLateExtra(currentContract); from the above iam getting the lateExtraAmount for ex:intially the amount is 2000 After that i Updated the amount to 2500, then the lateExtraAmount =Updated Amount-Intial amount i.e 500, then After that iam setting the value as model.setAmount(String.valueOf(lateExtraAmount)); After some time I updated the amount from 2500 to 2600 then lateExtraAmount=Updated Amount-Intial amount i.e 100. but i want the previous added lateExtraAmount and Latest added lateExtraAmount .for that i have wriiten the code like below String newLateExtraAmount=new Double(Double.parseDouble(model.getAmount())+lateExtraAmount).toString(). model.setAmount(String.valueOf(newLateExtraAmount)); but the problem with the above code is whenever iam going to that screen the amount is incrementing. my problem is there anyway to store the previous added lateExtraAmount? so that i can add the previous added lateExtraAmount with Latest added lateExtraAmount.i will get the result properly if anybody knows please assist me i have been trying from the last two days... thanks, prasad - Did you know? You can CHAT without downloading messenger. Know how!
Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?
On 6/5/07, Dave Newton [EMAIL PROTECTED] wrote: *Nothing* else changed in the app and/or configuration? nope...no code changes. The problem has always existed...once or twice a day. However recently, as often as 200 per day because certain actions are being hit much more often because of certain new customers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?
On 6/6/07, Jeff Amiel [EMAIL PROTECTED] wrote: Recent issue is driving me batty. Suddenly started receiving exceptions in app server logs (tomcat a la jboss)... Servlet.service() for servlet AxisServlet threw exception java.lang.IllegalStateException org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:220) org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:610) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) After many many hours of research, appears that I get this exception if a specific struts action (one of several) executes at the same time as a SOAP call to the AxisServlet. It ends up causing the return of an empty dataset to the calling SOAP client (and giving me a bad headache to boot). Weird. The actions that appear to cause this aren't special in any way (not any different than other actions in my application), but I am obviously missing something. I have a suspicion that the struts actions that cause this are all chained events (one action calls another which leads to a JSPbut can't completely confirm). Any thoughts? How can the activities of one servlet effect another such as this? Yes...they are in the same war/ear..and they probably share some common classes. For the record...Jboss 4./tomcat 5.5 Struts 1.3X and Axis 1.2 (although have tried 1.4...same results). Java 1.5 on FreeBSD 6.0. Any help would be appreciated. Might be a Tomcat issue - can you be more precise about the version of Tomcat 5.5? Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Properties files
Is there a standard way to read properties files I create? Maybe a jakarta commons library? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Properties files
Comes with java itself .. grep java.util.Properties Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! Asaf Paris Mandoki wrote: Is there a standard way to read properties files I create? Maybe a jakarta commons library? - 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: Properties files
Yeah, create a .properties file, have your key, value pairs in it. Write a simple java program like this at first to see how it works: import java.util.ResourceBundle; public class ConfigRead { public static ResourceBundle confdetails=ResourceBundle.getBundle( JDomTrial.myconffile); public static void main(String args[]) { String inputdir=getConfValue(MyConfiguration); System.out.println(input directory=+inputdir); } public static String getConfValue(String key) { String value=; if(!key.equals(null) !key.equals()) { value=confdetails.getString(key); } return value; } } On 6/5/07, Asaf Paris Mandoki [EMAIL PROTECTED] wrote: Is there a standard way to read properties files I create? Maybe a jakarta commons library? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Sometimes I go about in pity for myself, and all the while, a great wind carries me across the sky.
Re: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?
On 6/5/07, Niall Pemberton [EMAIL PROTECTED] wrote: Might be a Tomcat issue - can you be more precise about the version of Tomcat 5.5? from org/apache/catalina/util/ServerInfo.properties server.info=Apache Tomcat/5.5 server.number=5.5.0.0 server.built=Sep 25 2005 10:08:45 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
display current date in header
Hi all, I'm using struts 1.2.9 along with Tiles. I want to display current date in the header page. Can anybody tell me the best approach to do so? Thank you, AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...?
It smells like a threading issue to me. Are the Action and the AxisServlet accessing the same resource, and if so are they doing it through a layer that implements caching?, my initialy thought is that somewhere a cached is being used for one, then returned to the other, then being cleared by one, and when it comes to being user by the other it's null or invalid. Just a thought -Original Message- From: Jeff Amiel [mailto:[EMAIL PROTECTED] Sent: 06 June 2007 01:34 To: user@struts.apache.org Subject: How can one servlet (ActionServlet) effect another servlet (AxisServlet)...? Recent issue is driving me batty. Suddenly started receiving exceptions in app server logs (tomcat a la jboss)... Servlet.service() for servlet AxisServlet threw exception java.lang.IllegalStateException org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.ja va:220) org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:610) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java: 327) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) After many many hours of research, appears that I get this exception if a specific struts action (one of several) executes at the same time as a SOAP call to the AxisServlet. It ends up causing the return of an empty dataset to the calling SOAP client (and giving me a bad headache to boot). Weird. The actions that appear to cause this aren't special in any way (not any different than other actions in my application), but I am obviously missing something. I have a suspicion that the struts actions that cause this are all chained events (one action calls another which leads to a JSPbut can't completely confirm). Any thoughts? How can the activities of one servlet effect another such as this? Yes...they are in the same war/ear..and they probably share some common classes. For the record...Jboss 4./tomcat 5.5 Struts 1.3X and Axis 1.2 (although have tried 1.4...same results). Java 1.5 on FreeBSD 6.0. Any help would be appreciated. - 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]