sql « Database « JSP-Servlet Q&A

1. Find potential SQL inject problems in Java/JSP code    stackoverflow.com

I'm working for a customer with a huge legacy codebase consisting of various Java en JSP based applications. Most querying is done using the home-build 'orm' system. Some applications use Plain Old ...

2. Lib to protect SQL/javascript injection for java/jsp    stackoverflow.com

Anyone know a good lib where i can run the strings before they are inserted, that can strip out sql/javascript code? To be run in jsp pages. Idealy the lib would be:

  • Free
  • Lightweight
  • Easy ...

3. How to call sql procedure from an html button?    stackoverflow.com

Hey guys, my doubt is pretty simple to understand. I have a sql procedure that generates a util file as its output depending on the input parameters that are passed to ...

4. Help in getting a database management system running    stackoverflow.com

http://projectabstracts.com/406/java-based-online-shopping.html This project is about "Online Shopping". It uses Java as front-end implementing applets, servlets and JDBC as the connecting link to the back-end which is implemented using SQL. The ...

5. how to get a specific row values from database using servlet?(without using any sql conditions.)    stackoverflow.com

i want to display a table from the database. but displaying only 5rows (from 6 to 10), i have a table name only. it is the dynamic process, so the query doesn't ...

6. SQL group by question    stackoverflow.com

I have a problem when retrieving data from a SQL using JSP.

ResultSet rs = statement.executeQuery("select orderdate, 

7. Help using flags in my jsp    stackoverflow.com

This might be confusing, so just ask if a better explanation is needed. I am trying to select certain teams for a particular user. Here is my SELECT statement: ...

8. How to print SUM, and AVG SQL values with JDBC?    stackoverflow.com

Okay, I am trying to do print the results of a SUM and AVG function using JDBC. So basically, it's not working. What am I doing wrong?


9. How can I send html/javascript values to sql and return it back to the same page in jsp?    stackoverflow.com

I started out with an html page. Then, I renamed the file with a .jsp extension, as I will be using jsp to accomplish this particular task. Which is: I wish ...

10. Downloading attachment from database using java    stackoverflow.com

I have used the following code for downloading the attachment from database but the downloaded file is of 0 bytes. What is the cause and how can I fix it? Here ...

11. how to use a variable in a where clause    stackoverflow.com

I use jsp and sql and I want to query a table using a variable that I have already declared (entity) here is my query:

String **entite**="informatique";

rs = st.executeQuery ("select * from ...

12. problem with sql and jsp    stackoverflow.com

I am using jsp, I do know why does not work:



try { 
}catch(ClassNotFoundException ce){out.println(ce);} 

con = DriverManager.getConnection("jdbc:mysql://localhost/Test","root", "zakaria");
st = con.createStatement(); 
st.executeQuery("UPDATE Demande SET id_status =2 ...

13. How to fetch entries/values from database to a jsp page one by one?    stackoverflow.com

I have a table in Microsoft SQL server Management Studio with two columns title and data and each column has 10 enteries. I have a jsp page on which i want to ...

14. How can I delete database records from a jsp page?    stackoverflow.com

The following code is a part of my project and the output of this code is that I get all the title of the posts in the database and a delete ...

15. How to avoid saving details in database when a new user tries to create account with existing username?    stackoverflow.com

I have a jsp page in my project where user fills up the details for creating an account. when a user enters username and clicks on the check button, the button ...

16. java.lang.NumberFormatException: null    stackoverflow.com

Hello i have a problem with insert code i'm getting this error java.lang.NumberFormatException: null i think the problem from the insert query some value is invalid or missing

public static AnimalBean appendAnimal(AnimalBean ...

18. Not importing java.sql.*    coderanch.com

19. JSP with Oracle / SQL    coderanch.com

20. synchronized & JSP (& eventually SQL)    coderanch.com

21. Getting SQL Data in JSP or Servlet    coderanch.com

22. The SQL controversy and Sue's Book    coderanch.com

Performing SQL directly from a JSP page, which constitutes a 'view', is a pretty severe violation of the MVC architecture. Hence the controversy. I could go into the catechism of why uncoupling the model from the view is a good thing and all, but that's been covered before and by others more eloquent than myself. I'll just say that I'm a ...

23. Populate listbox from sql    coderanch.com

24. using JSP to read SQL data    coderanch.com

Forgive my noob question. I've used the search tool but haven't found the info I need. I'd like to connect from jsp to SQL and do a simple query. I've come up with this amount of code so far, but it fails left right and center... I'm using MS SQL Server 2000 and Tomcat, jdk is 1.4.1_06 I can't even get ...

25. sql:param Problems.    coderanch.com

Howdy all, I am writing a jsp application which uses a proprietary JDBC database driver. I am getting errors thrown and am having trouble drilling down to the cause. The error is thrown when I use a prepared statement and the tag ie: SELECT INVNO, EACHES, SPECDISC, RETAIL, BODATE, BOPACKLIST, ORIGPO FROM BORD WHERE CUST = ? ...

26. Inconsistent results with sql:param    coderanch.com

Here is the source of my problems. This code works fine on 3 out of the 4 computers that I have, but when executed on one of them with the same input and the same database, I fail to get a response while the other 3 respond perfectly. The little check before the actual query returns the same/correct values in all ...

27. SQL Poll Question in JSP    coderanch.com

28. hours and minutes set/get sql timestamp    coderanch.com

29. running sql in jsp    coderanch.com

Thanks a lot for the reply. I have a problem though. I have installed Tomcat and have been running an application without any problem. But when I start this simple application it says resource not found. The path of the jsp page is C:\Tomcat 5.0\webapps\jspbook\ch1\ The error message is HTTP Status 404 - /jspbook/ch1/first.jsp -------------------------------------------------------------------------------- type Status report message /jspbook/ch1/first.jsp description ...

30. SQL Exeption    coderanch.com

I am getting SQLExeption when I try to execute the code below. Can anyone help me with it? ........ , . - . - , _ , ........ ......... ) ` - . .> ' `( ......... ........ / . . . .`\ . . \ ........ ........ |. . . . . |. . .| ....... ......... \ . . ...

31. Using SQL in a JSP    coderanch.com

32. SQL coding to add stock balance in JSP    coderanch.com

33. SQL and JSP    coderanch.com

34. subquery SQL and JSP    coderanch.com

35. JSP & SQL problems    coderanch.com

36. SQL Stored procedure in JSP    coderanch.com

37. Helper tool to Build SQL in JSP??    coderanch.com

38. servlets and sql    coderanch.com

ok peoples, I have a problem. I'm in the process of creating a online system where people login and stuff. I've got the login page working correctly and the database connection working correctly also. I have given users the option to register if they have not been on before, and this is where I come unstuck. The user enters in their ...

39. Web Resourses for using SQL in servlets    coderanch.com

40. SQL coding to add stock balance in JSP    coderanch.com

I am facing some problem writing this SQL coding on adding a stock balance record in JSP: Below is an extract from my coding: Purchase A Stock Item

Purchase A Stock Item


Item IDItem Name Item RefVendor ID Item Cost Item Markup Selling PriceItem QuantityRe- order Quantity

41. sql syntax in a servlet    coderanch.com

42. how to decouple sql in servlet    coderanch.com

43. calling SQL loader from servlet    coderanch.com

44. Problem executing SQL in SERVLET.    coderanch.com

45. Servlets and PL\SQL    coderanch.com

Hi guys, I've got the following code that calls a stored procedure from a web based servlet application. CallableStatement cst = conn.getReadOnlyConnection().prepareCall({call PCK_PRODUCT.DELETE_PRODUCT_TRANSACTION(?,?,?)}; The above statement calls a PL\SQL stored procedure in the database. The stored procedure takes about 2 hrs to complete. When my servlet calls this procedure, the relevant webpage on the front end is showing that its waiting ...

46. Call SQL Script from JSP    coderanch.com

47. How to implement sql command one by one    coderanch.com

48. Servlets and SQL Express 2005    coderanch.com

49. Please help to resolve SQL command not properly ended issue in servlet    coderanch.com

I am using this select statement in java servlet and trying to execute it. But I am getting "SQL command not properly ended" error message in the console. But when I can successfully run this select query in the TOAD editor. I would appreciate if someone can help me to resolve this issue. Thanks.. Select statement in servlet: sql = "SELECT ...

50. jsp sql : Compare Datetime    dbforums.com

51. Jsp, Ajax and SQL..possible?    go4expert.com

52. How to get / setAttribute from a List with many sql id.    java-forums.org

else if (!userPath.isEmpty() && userPath.equals("/listevents")) { String head = (String) request.getParameter("head"); String city = (String) request.getParameter("city"); String month = (String) request.getParameter("month"); String day = (String) request.getParameter("day"); List list = managerFacade.listEvents(head, city, Integer.parseInt(month), Integer.parseInt(day)); ArrayList test = new ArrayList(); Iterator it = list.iterator(); while(it.hasNext()) { test.add(eventFacade.find( it.next())); } request.setAttribute("profile", "listem"); request.setAttribute("events",test); userPath = "/profile"; }

53. Servlets with sql and access db's.    forums.oracle.com

54. SQL and databases availability inside JSP pages    forums.oracle.com

I want to develop a project using JSP pages i have the following questions:- 1. what database can we use and how to connect the JSP pages to let say Oracle database. 2.And can we write SQL statements (for example select * from items where item number = value) inside the java code in the JSP pages. 3.and a final question ...

55. jsp and SQl    forums.oracle.com

56. jsp and sql - very slow performance    forums.oracle.com