Re: Struts 1.3 : Preventing SQL Injection (form.field validation)

2013-03-22 Thread Paul Benedict
If you use JDBC prepared statements, you will not have to worry about SQL injection. Paul On Fri, Mar 22, 2013 at 6:36 PM, J.V. wrote: > Does anyone out there have a method I could use to pass a form field > variable that would check for all known SQL injection vulnerabilities (with >

Re: Struts 1.3 : Preventing SQL Injection (form.field validation)

2013-03-22 Thread Anjib Mulepati
Use Filter On 3/22/2013 7:36 PM, J.V. wrote: Does anyone out there have a method I could use to pass a form field variable that would check for all known SQL injection vulnerabilities (with regards to the form field only, irrespective of the method of SQL execution) and return a true/false if

Struts 1.3 : Preventing SQL Injection (form.field validation)

2013-03-22 Thread J.V.
Does anyone out there have a method I could use to pass a form field variable that would check for all known SQL injection vulnerabilities (with regards to the form field only, irrespective of the method of SQL execution) and return a true/false if it passes the test? I have about 100+ forms

Re: Struts2Builder 0.5.0 has been released - now with support for Oracle, Sybase, and MS SQL Server

2012-08-29 Thread Dave Newton
I'd like to make sure we don't turn the list into a Struts2Builder forum. Thomas wrote: > Bruce wrote: > Also why cannot the maven compiler settings be set to generate Java 1.6 > > instead of Java 1.5? > > I just didn't see a reason to do so, since EE 1.5 is still prevalent in > the world. > JE

Re: Struts2Builder 0.5.0 has been released - now with support for Oracle, Sybase, and MS SQL Server

2012-08-29 Thread Thomas Sattler
Hello Bruce. Thanks for writing, and thanks for trying Struts2Builder. > It worked well generating a complete Struts 2 CRUD web application. I used on > Mac OS 10.8.1 and with MySQL. That's good to hear. I am glad you got it working on Mac. I have not tested it there, and I haven't heard of a

Re: Struts2Builder 0.5.0 has been released - now with support for Oracle, Sybase, and MS SQL Server

2012-08-29 Thread bphill...@ku.edu
0-has-been-released-now-with-support-for-Oracle-Sybase-and-MS-SQL-Server-tp5710530p5710540.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional c

Struts2Builder 0.5.0 has been released - now with support for Oracle, Sybase, and MS SQL Server

2012-08-28 Thread Thomas Sattler
Greetings all. Struts2Builder version 0.5.0 has been released. Struts2Builder is a Java code generation system that can automatically build a real, live, functioning Struts2 / Hibernate / Spring system for any existing Oracle, MySQL, PostgreSQL, Microsoft SQL Server, or Sybase database

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
ject: RE: generate SQL Hibernate Query using session Jerson - What I would likely suggest you consider is creating a DTO object that resembles your result from the SQLQuery. You can then use one of the stock Hibernate Transformers to convert the SQL results into instances of this DTO Bean and t

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
Users Mailing List Subject: RE: generate SQL Hibernate Query using session Jerson - What I would likely suggest you consider is creating a DTO object that resembles your result from the SQLQuery. You can then use one of the stock Hibernate Transformers to convert the SQL results into instances of

RE: generate SQL Hibernate Query using session

2011-02-17 Thread CRANFORD, CHRIS
Jerson - What I would likely suggest you consider is creating a DTO object that resembles your result from the SQLQuery. You can then use one of the stock Hibernate Transformers to convert the SQL results into instances of this DTO Bean and then you can return the beans to your view to iterate

Re: generate SQL Hibernate Query using session

2011-02-17 Thread Mead Lai
I think you may use the Composite Class in Hibernate. Query q = session.createQuery (" select new NewCompositeClass(members, classInfo.className) " + " from Members members, ClassInfo classInfo " + " where members.level = classInfo.classCode "); and you need a class:NewCompositeClass.java

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
error...I couldn't find any Thanks in advance Many Thanks and Regards, Jerson From: Jerson John [mailto:jer...@cprvision.com] Sent: Friday, February 18, 2011 10:53 AM To: 'Struts Users Mailing List' Subject: RE: generate SQL Hibernate Query using session Hi, Thanks for your

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
ce in properties.Please advice me a approach for thisThanks in advance Many Thanks and Regards, Jerson -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Friday, February 18, 2011 10:34 AM To: Struts Users Mailing List Subject: Re: generate SQL Hibernate Query using se

Re: generate SQL Hibernate Query using session

2011-02-17 Thread Dave Newton
What does having joins have to do with not being able to map to your data model? Dave On Feb 17, 2011 8:43 PM, "Jerson John" wrote: > Hi, > I am trying to generate SQL query using session.createSQLQuery and > returning the list object..This select query contains joins an

generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
Hi, I am trying to generate SQL query using session.createSQLQuery and returning the list object..This select query contains joins and so it cannot be mapped to any of my model objects.How can I now get the values in my jsp page using iterator tag in Struts 2... Please help me on this Many

RE: SQL Injection

2010-03-18 Thread adam pinder
use hibernate its definitely worth trying. the SQL queries can be parameterised and the parameter names can refer to fields in an object, it handles the escaping of values to be sql safe. > From: gustavo.felisbe...@wit-software.com > To

RE: SQL Injection

2010-03-18 Thread Gustavo Felisberto
Hello, As far as I know there is nothing in struts to prevent SQL injection. And that should be done at the database level, so it is not related to Struts. Also there is no simple way of making parameters "sql injection safe". You can take a look at http://www.owasp.org

SQL Injection

2010-03-18 Thread abhishek jain
Hi, Do we have any special technique in Struts for preventing sql injection, i know we can prevent it via parameterized query , but my application design do not permit so, So can anyone here help me on this, i need a function whom if i pass a value, it becomes sql injection safe., Pl. help

Re: SQL ExcuteQuery

2009-12-08 Thread musomesa
Your trouble is here: pstmtname = conn.prepareStatement(sql); sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID = " + UserID; When you call prepareStatement(sql) the sql string is sent to the database which "prepares" it (essentially does all

Re: SQL ExcuteQuery

2009-12-07 Thread Saeed Iqbal
Connection conn = null; > PreparedStatement pstmtname = null; > pstmtname = conn.prepareStatement(sql); > sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID > = > " + UserID; > pstmtname.setString(1, "123456"); > pstmtname.executeQuery();

RE: SQL ExcuteQuery

2009-12-07 Thread Vishnu Vyasan Nelliparmbil
Move your sql before the prepared statement. Sql =" sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID = ?"; pstmtname = conn.prepareStatement(sql); pstmtname.setString(1, "123456"); pstmtname.setString(2, UserID); pstmtname.executeQuery(); This

Re: SQL ExcuteQuery

2009-12-07 Thread Sushim Saini
09/12/8 Sushim Saini > > > > > > > hi Nguyen Xuan Son > > > > use > > > > pstmtname.executeQuery() instead of pstmtname.executeQuery(); > > > > > > > > On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son > > wrote: >

Re: SQL ExcuteQuery

2009-12-07 Thread Nguyen Xuan Son
29, Nguyen Xuan Son > wrote: > > > > > > > dear all > > > > I've written > > > > Connection conn = null; > > > > PreparedStatement pstmtname = null; > > > > pstmtname = conn.prepareStatement(sql); > > > > sql = "UPDATE t

Re: SQL ExcuteQuery

2009-12-07 Thread Avlesh Singh
instead of pstmtname.executeQuery(); > > > > On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son wrote: > > > > > dear all > > > I've written > > > Connection conn = null; > > > PreparedStatement pstmtname = null; > > > pstmtname =

Re: SQL ExcuteQuery

2009-12-07 Thread Nguyen Xuan Son
#x27;ve written > > Connection conn = null; > > PreparedStatement pstmtname = null; > > pstmtname = conn.prepareStatement(sql); > > sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE > ROW_ID > > = > > " + UserID; > > pstmtname.

Re: SQL ExcuteQuery

2009-12-07 Thread Sushim Saini
hi Nguyen Xuan Son use pstmtname.executeQuery() instead of pstmtname.executeQuery(); On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son wrote: > dear all > I've written > Connection conn = null; > PreparedStatement pstmtname = null; > pstmtname = conn.prepareStatement(sq

SQL ExcuteQuery

2009-12-07 Thread Nguyen Xuan Son
dear all I've written Connection conn = null; PreparedStatement pstmtname = null; pstmtname = conn.prepareStatement(sql); sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID = " + UserID; pstmtname.setString(1, "123456"); pstmtname.executeQuery();

Re: SQL Optimization Tools and Procedures

2009-06-19 Thread john feng
nough information about the production usage situation before tuning it. John On Fri, Jun 19, 2009 at 11:16 AM, Edward Song wrote: > Here's a Friday discussion. > > As an application developer, I can write SQL pretty well, but I wouldn't > say > that I'm an expert.

Re: SQL Optimization Tools and Procedures

2009-06-19 Thread Terry Gardner
If you have the code in a workable configuration, you can test it easily with a SQL query job using SLAMD (http://slamd2.dev.java.net). This generate load that may point to indexing problems and other performance-related problems. On Jun 19, 2009, at 11:16 AM, Edward Song wrote: Here

SQL Optimization Tools and Procedures

2009-06-19 Thread Edward Song
Here's a Friday discussion. As an application developer, I can write SQL pretty well, but I wouldn't say that I'm an expert. My last project I did run into some design and architecture issues that needed a little bit of reworking and refactoring. To help avoid this, I want to

Re: Re: Dummy example Struts 2.0 - My Sql

2008-11-26 Thread stewart
I will be out of the office, and mostly without email access, until Dec 1. Please contact the One World office, 605-845-7172, with any general needs, and Danny Nickels, [EMAIL PROTECTED], at the same number, for any technical or integration issues. If this is an emergency, please feel free to c

Re: Dummy example Struts 2.0 - My Sql

2008-11-26 Thread Carlos Iglesias
b_App_Struts/ > > You can use above link to have brief idea. > > > -Original Message- > From: Carlos Iglesias [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 26, 2008 3:16 PM > To: user@struts.apache.org > Subject: Dummy example Struts 2.0 - My Sql > >

RE: Dummy example Struts 2.0 - My Sql

2008-11-26 Thread Rajil
:16 PM To: user@struts.apache.org Subject: Dummy example Struts 2.0 - My Sql Hello, I'm beginning wity Struts and I found the samples very useful, expecially the app struts2-showcase-2.0.11.2.war. But I'd need other sample to begin my own to make my owns aplications. ¿Is there any sample

Dummy example Struts 2.0 - My Sql

2008-11-26 Thread Carlos Iglesias
Hello, I'm beginning wity Struts and I found the samples very useful, expecially the app struts2-showcase-2.0.11.2.war. But I'd need other sample to begin my own to make my owns aplications. ¿Is there any sample of struts2 with mysql? ¿Can anyone send my an url? Thanks in advance. Carlos Iglesia

Re: I don't know what to call this SQL Exception.

2008-08-06 Thread Owen Berry
"Optimistic locking" will give you some information. One way to do this is to have a column in your database table that denotes a version number, which is incremented every time the row changes. Include that value in your form, and then you will be able compare the form version to the database vers

I don't know what to call this SQL Exception.

2008-08-06 Thread ryan webb
Hi!! I know this is not struts question but I don't know this term so I cannot search the internet fot it. Two users are seeing the same page (data from database), and both of them are editing the same piece of data however, the other user submits the changes (update/delete) first. I need to inf

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Antonio Petrelli
f the following link: > http://www.net-security.org/dl/articles/IntegrigyIntrotoSQLInjectionAttacks.pdf > > Thx. > > Mike > > > --- On Thu, 11/15/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > > From: Antonio Petrelli <[EMAIL PROTECTED]> > > Subject: Re: Struts Val

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Roberto Nunnari
Hi Mike. my comments below. Mike Duffy wrote: Thx Gary. That is good information. We are actually using JBoss with EJB 3.0, which uses Hibernate under the covers, so I am assuming we are covered. Not that sure.. if your DAO uses SQL strings in the queries (Hibernate lets you do that

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Antonio Petrelli
2007/11/15, Mike Duffy <[EMAIL PROTECTED]>: > No matter where this is done, the basic problem is we have single quotes, > double quotes, ampersands, semicolons, and parenthesis in our data. This may be off topic, but does not is suffice to use prepared statement and parameters to avoid such attac

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Antonio Petrelli
this way: you can always create a query dinamically, with a variable number of parameters. In the PDF you sent, there is this sentence: SQL Statements using bind variables are generally immune to SQL Injection attacks as the Oracle database will use the value of the bind variable exclusively and n

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Mike Duffy
: Struts Validator to Prevent SQL Injection Attacks > To: "Struts Users Mailing List" > Cc: [EMAIL PROTECTED] > Date: Thursday, November 15, 2007, 11:13 AM > Dave Newton wrote: > > --- Mike Duffy <[EMAIL PROTECTED]> wrote: > >> Does anyone have a gre

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Mike Duffy
> Subject: Re: Struts Validator to Prevent SQL Injection Attacks > To: "Struts Users Mailing List" , [EMAIL PROTECTED] > Date: Thursday, November 15, 2007, 11:21 AM > 2007/11/15, Mike Duffy <[EMAIL PROTECTED]>: > > No matter where this is done, the basic prob

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Mike Duffy
No matter where this is done, the basic problem is we have single quotes, double quotes, ampersands, semicolons, and parenthesis in our data. After Googleing on this topic for an hour or so I do not see an elegant solution, other than possibly filtering on SQL key words (DROP, ALTER, etc

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Gary Affonso
Dave Newton wrote: --- Mike Duffy <[EMAIL PROTECTED]> wrote: Does anyone have a great solution for a validator that will prevent users from entering malicious SQL into form entry text fields? I'm not sure that belongs in a validator; unless you never need to allow the use of a s

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Martin Gainty
return error if (AND / OR / == ) or any possible SQLInjections are found http://www.acunetix.com/websitesecurity/sql-injection2.htm XSS Scripting solution might use JS Validator to scan for html tags in the input form or table or input comes to mind but just in case JS validatpr passes it on the

Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Mike Duffy
Does anyone have a great solution for a validator that will prevent users from entering malicious SQL into form entry text fields? Thx. Mike Get easy, one-click access to your favorites. Make Yahoo

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Dave Newton
--- Mike Duffy <[EMAIL PROTECTED]> wrote: > Does anyone have a great solution for a validator > that will prevent users from entering malicious SQL > into form entry text fields? I'm not sure that belongs in a validator; unless you never need to allow the use of a single

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Al Sutton
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 tag I get a

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Ambaris Mohanty
ct 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 Mes

[OT] Re: using jstl sql tags for displaying date from database

2007-06-05 Thread Oguz Kologlu
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

[OT] RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Dave Newton
--- 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 a

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Al Sutton
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

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Ambaris Mohanty
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'

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Al Sutton
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 dat

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Ambaris Mohanty
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: 'Strut

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Al Sutton
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 sa

RE: using jstl sql tags for displaying date from database

2007-06-05 Thread Ambaris Mohanty
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

Re: using jstl sql tags for displaying date from database

2007-06-05 Thread Dave Newton
--- 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 a

FW: using jstl sql tags for displaying date from database

2007-06-05 Thread Ambaris Mohanty
_ 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

using jstl sql tags for displaying date from database

2007-06-05 Thread Ambaris Mohanty
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: [OT] Re: Struts 1.1 issue (myEclipse+Jboss 3.2.5+SQL Server 2000)

2006-02-09 Thread Jitendra Kumar
Dave, Thanks for your response. I have got your point and will try to follow the guidelines from my next mail on. I was basically interested in knowing all the steps that are required to connect to a remote SQL server 2000 using Struts on JBoss. After a night of trial and errors, I have finally

[OT] Re: Struts 1.1 issue (myEclipse+Jboss 3.2.5+SQL Server 2000)

2006-02-08 Thread Dave Newton
Jitendra Kumar wrote: > Using the above I simply want to print the records of any table in my SQL > Server 2K DB. > > The problem: > I am not able to do the above. I have tried changing some files in Jboss. I > have copied some jars of DB Drivers in WEB-INF/lib fol

Struts 1.1 issue (myEclipse+Jboss 3.2.5+SQL Server 2000)

2006-02-08 Thread Jitendra Kumar
I am writing this mail after spending a lot of time struggling with the stuff mentioned in subject line. My Setup 1. myEclipse IDE 2. Struts Version 1.1 3. JDK 1.5 4. Jboss 3.2.5 (Please don't ask me to go to Jboss mailing list :-( ) 5. SQL Server 2000 (This server is running on a remot

RE: For sql experts

2006-02-03 Thread Jimmy Emmanual
Friday, February 03, 2006 10:25 AM To: Struts Users Mailing List Subject: Re: For sql experts FROM PARTY_NOTE PN 1WHERE PN.1PARTY_ID might have to be... FROM PARTY_NOTE PN1 WHERE PN1.PARTY_ID What happens if you get more than one last_update_dt equal to the maximum? Gluck &qu

Re: For sql experts

2006-02-03 Thread ALEX HYDE
FROM PARTY_NOTE PN 1WHERE PN.1PARTY_ID might have to be... FROM PARTY_NOTE PN1 WHERE PN1.PARTY_ID What happens if you get more than one last_update_dt equal to the maximum? Gluck "Jonnalagadda, Sumithra" <[EMAIL PROTECTED]> wrote: SELECT DEPTNUM.REF_VALUE, CAMNUM.REF_VALUE, (

For sql experts

2006-02-03 Thread Jonnalagadda, Sumithra
SELECT DEPTNUM.REF_VALUE, CAMNUM.REF_VALUE, (SELECT PN1.NOTE_TEXT FROM PARTY_NOTE PN 1WHERE PN.1PARTY_ID = DEPTNUM.PARTY_ID and max(pn1.last_update_dt)) NOTE FROM PARTY_REFERENCE DEPTNUM, PARTY_REFERENCE CAMNUM, PARTY_ASSOC REL WHERE DEPTNUM.PARTY_ID = REL.TO_PARTY_ID AND REL.FROM_PARTY_ID = CAMN

Re: OT: Is there a very simple "MVC" for ASP 2005 w/ a tutorial? Something to show my poor friend about taking SQL out of ASP but very simple.

2006-01-19 Thread Ted Husted
http://opensource2.atlassian.com/confluence/oss/display/IBATIS/Quick+Start+Guide -T. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

OT: Is there a very simple "MVC" for ASP 2005 w/ a tutorial? Something to show my poor friend about taking SQL out of ASP but very simple.

2006-01-19 Thread netsql
tia, .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Sunil_Sahu
date String, add a day, and return sql date? [EMAIL PROTECTED] wrote: > [...] > public static String addDaysToDate( String strDate, String noofDays, > String dateFormat ) throws Exception noofDays? What are those? Days 30 minutes offs

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Laurie Harper
[EMAIL PROTECTED] wrote: [...] public static String addDaysToDate( String strDate, String noofDays, String dateFormat ) throws Exception noofDays? What are those? Days 30 minutes offset from everywhere else? ;-) L. -

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Sunil_Sahu
ate String, add a day, and return sql date? Mick Knutson wrote: >I need to see if anyone has a utility to take a String date, add 1 day, >and return a java.sql.Date > > I'd probably check out the Calendar class. Dave Newton Tech

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Dave Newton
Mick Knutson wrote: I need to see if anyone has a utility to take a String date, add 1 day, and return a java.sql.Date I'd probably check out the Calendar class. Dave Newton Technical Lead, MonkeyLips Omnigalgomon Project --

[ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Mick Knutson
I need to see if anyone has a utility to take a String date, add 1 day, and return a java.sql.Date -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- "MMS " made the following annotations. --

Re: Validation of input field requires SQL. Better to put it in Form or in Action?

2005-09-21 Thread Jeff Beal
In general, ActionForm validation is limited to the most basic input validation, mostly making sure that incoming strings can be parsed into a specific type. If you need to issue a SQL query to ensure valid data, that sounds like a business logic operation, and probably makes more sense in the

Validation of input field requires SQL. Better to put it in Form or in Action?

2005-09-20 Thread gollinger
Hi In my HTML-Form I'm sending a number to a action. If the number is valid will be decided by a sql-query. I'm not sure to put this select in the ActionForms validate method or in the action with a corresponding forward. What would be the better way? Thanks for an

Re: Storing images in SQL BLOBs

2005-09-06 Thread amos
On Wed, 2005-09-07 at 14:16 +1000, Murray Collingwood wrote: > Thanks Jason > > I'm having a strange issue with serving up these images. I'm getting a > "socket write > error" from the following code. There are 3 images, the details follow the > code. The > first two images appear, the thir

Re: Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
Thanks Jason I'm having a strange issue with serving up these images. I'm getting a "socket write error" from the following code. There are 3 images, the details follow the code. The first two images appear, the third fails to appear. response.setContentLength((int) f.lengt

Re: Storing images in SQL BLOBs

2005-09-06 Thread Jason Lea
Oh right, you need to discover the location automatically. Something like this might work: request.getSession().getServletContext().getRealPath("/images"); That should give you the full path to /images. Murray Collingwood wrote: How do I find the path actual path to "/images" assuming of co

Re: Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
How do I find the path actual path to "/images" assuming of course that "/images" is a url reference? Is there something like $STRUTS_ROOT? Kind regards mc On 7 Sep 2005 at 14:50, Jason Lea wrote: > I guess it depends if you are trying to restrict access to these images. > > To make all ima

Re: Storing images in SQL BLOBs

2005-09-06 Thread Jason Lea
I guess it depends if you are trying to restrict access to these images. To make all images available for anyone, put them into /images, for example. If you want to not allow any direct access to them, you could create a directory under /WEB-INF and put them there. You would then have to crea

Re: Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
Hi all (Gosh, I'm starting to feel like a regular on this list...) After my experiences below I have rewritten my application to store the images in a local sub-directory, however when I ran this new version the sub-directory was created under the Tomcat/bin directory - not really appropriate.

Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
Hi all I got my app storing and retrieving images from MySQL database - what a mistake! A simple image of 130k took 8 seconds to appear on the page. This is a huge time to sit and stare at a large blank space on the screen. I can't help thinking that this is a bug (performance problem) somewh

Re: How to pass SQL variable from JSP to Action?

2005-09-01 Thread 梁炳�
inal Message- > > From: ??? [mailto:[EMAIL PROTECTED] > > Sent: 01 September 2005 15:09 > > To: Struts Users Mailing List > > Subject: Re: How to pass SQL variable from JSP to Action? > > > > Richard > > > > Are you suggesting something like Hibern

Re: How to pass SQL variable from JSP to Action?

2005-09-01 Thread 梁炳�
> Look it up in a Struts action and place in the presentation layer via an > ActionForm etc before showing the JSP > > -Original Message- > From: ??? [mailto:[EMAIL PROTECTED] > Sent: 01 September 2005 15:09 > To: Struts Users Mailing List > Subject: Re: How to pass SQL

Re: How to pass SQL variable from JSP to Action?

2005-09-01 Thread 梁炳�
lto:[EMAIL PROTECTED] > Sent: 01 September 2005 15:09 > To: Struts Users Mailing List > Subject: Re: How to pass SQL variable from JSP to Action? > > Richard > > Are you suggesting something like Hibernate or iBatis? > > Daniel > > > 2005/9/1, R. Markham <

RE: How to pass SQL variable from JSP to Action?

2005-09-01 Thread Mark Benussi
to pass SQL variable from JSP to Action? Richard Are you suggesting something like Hibernate or iBatis? Daniel 2005/9/1, R. Markham <[EMAIL PROTECTED]>: > Hallo Nobody(??) > > It is bad practice to put SQL Statement in a JSP page. > > Regards > > Richard Markham

Re: How to pass SQL variable from JSP to Action?

2005-09-01 Thread 梁炳�
Richard Are you suggesting something like Hibernate or iBatis? Daniel 2005/9/1, R. Markham <[EMAIL PROTECTED]>: > Hallo Nobody(??) > > It is bad practice to put SQL Statement in a JSP page. > > Regards > > Richard Markham > > > -Ursprüngliche Nach

AW: How to pass SQL variable from JSP to Action?

2005-09-01 Thread R. Markham
Hallo Nobody(??) It is bad practice to put SQL Statement in a JSP page. Regards Richard Markham -Ursprüngliche Nachricht- Von: ??? [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. September 2005 05:30 An: Struts Users Mailing List Betreff: Re: How to pass sql variable from jsp to

Re: How to pass sql variable from jsp to Action?

2005-08-31 Thread 梁炳場
to capture the group_id > and then update a session attribute . > > Then the resulting jsp is like this > > > Is this a proper way to do this? > > I do not know how to write in the Action class so that > it can retrieve the sql value from the passing in jsp file. > > Your help is very much appreicated. >

How to pass sql variable from jsp to Action?

2005-08-31 Thread 梁炳場
know how to write in the Action class so that it can retrieve the sql value from the passing in jsp file. Your help is very much appreicated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: is there a better way of creating SQL queries from form objects ?

2005-05-10 Thread Sean Burlington
Erik Weber wrote: As far as the implementation goes, there is no reason to be scared of switches and loops. (But favor polymorphism/virtual functions over a giant loop.) However, you should get rid of all those concat operators and use StringBuffer.append instead. The performance will improve s

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Aladin Alaily
to deal with it - I just can't find it. I have a database containing many records Searches can be performed on several text fields - and refined by boolean fields. The html form thus consist of several text inputs and several checkboxes. Only one text box should ever be filled in. I can w

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Erik Weber
rformed on several text fields - and refined by boolean fields. The html form thus consist of several text inputs and several checkboxes. Only one text box should ever be filled in. I can work out the resultant sql query by using lots of if statements as below but it just doesn't seem very

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Erik Weber
html form thus consist of several text inputs and several checkboxes. Only one text box should ever be filled in. I can work out the resultant sql query by using lots of if statements as below but it just doesn't seem very elegant ... I could also break the search down into several forms a

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Sean Burlington
Rick Reumann wrote: Look into using iBATIS http://www.ibatis.com. It's easy to use and will handle this kind of dynamic SQL very nicel (the PDF instruction manual is nice. Look at the SQL Maps documentatoin under Dynamic Mapped Statements.) that's a bigger change in coding than I wa

Re: is there a better way of creating SQL queries from form objec ts ?

2005-05-09 Thread Sean Burlington
Benedict, Paul C wrote: Sean, Have you thought about constructing a DAO/Adapater object that receives your input, and then does the notorious SQL-string building on the inside? If you cannot get the elegant solution, you should at least make it appear elegant by wrapping it inside of the DAO layer

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Rick Reumann
Look into using iBATIS http://www.ibatis.com. It's easy to use and will handle this kind of dynamic SQL very nicel (the PDF instruction manual is nice. Look at the SQL Maps documentatoin under Dynamic Mapped Statements.) Sean Burlington wrote the following on 5/9/2005 10:37 AM: H

RE: is there a better way of creating SQL queries from form objec ts ?

2005-05-09 Thread Benedict, Paul C
Sean, Have you thought about constructing a DAO/Adapater object that receives your input, and then does the notorious SQL-string building on the inside? If you cannot get the elegant solution, you should at least make it appear elegant by wrapping it inside of the DAO layer. -Original

is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Sean Burlington
of several text inputs and several checkboxes. Only one text box should ever be filled in. I can work out the resultant sql query by using lots of if statements as below but it just doesn't seem very elegant ... I could also break the search down into several forms and so different actions -

RE: [OT] How to transpose a table in MS SQL Server 2000

2005-04-08 Thread Paul McCulloch
Assuming that month, val1 & val2 are the *names* of columns this is going to be a tricky problem to solve with just SQL. You need to query the system tables to extract the names of the columns. The other problem is that the number of columns in your result set needs to vary depending on

  1   2   >