26
votes
5answers
25k views
132
votes
8answers
66k views
How to get UTF-8 working in java webapps?
I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support äöå etc. for regular Finnish text and Cyrillic alphabets like ЦжФ for special cases.
My setup is the ...
34
votes
9answers
17k views
LINQ for Java tool [closed]
Would a LINQ for java be a useful tool? I have been working on a tool that will allow a Java object to map to a row in a database.
Would this be useful for Java
programmers?
What features would ...
5
votes
2answers
12k views
JDBC MySql Connection Pooling practices
I have a Java-JSF Web Application on GlassFish, in which I want to use connection pooling. Therefore I created an application scoped bean that serves with Connection instances for other beans:
import ...
8
votes
9answers
894 views
Achieve hierarchy, Parent/Child Relationship in an effective and easy way
I have a table like
create table site
(
site_Id int(5),
parent_Id int(5),
site_desc varchar2(100)
);
Significance of the fields:
site_Id : Id of the sites
parent_Id : Parent id of the site
...
16
votes
6answers
28k views
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
I'm working on getting my database to talk to my Java programs. What do I need to get started?
Having already read through (and been thoroughly confused, something that does not happen often) with ...
3
votes
3answers
4k views
How I save and retrieve an image on my server in a java webapp
Here with another question on Images ( which seems to be more difficult than I initialy predicted) I'm working on a java Web app with JSF 2.0 ( apache myFaces) and I want this app to be able to upload ...
5
votes
2answers
8k views
Handling MySQL datetimes and timestamps in Java
In a java application what would a good compromise in terms of extracing and inputting date information with a MySQL database using a mix of datetimes and timestamps?
30
votes
5answers
7k views
How can I protect MySQL username and password from decompiling?
Java .class files can be decompiled fairly easily. How can I protect my database if I have to use the login data in the code?
6
votes
2answers
21k views
How should I connect to a MySQL data source from Eclipse?
I have an external MySQL server that's set up and working fine. I created a database connection in Eclipse and can view the database in the Data Source Explorer tab.
Now, I have a servlet that needs ...
2
votes
6answers
16k views
Solving a “communications link failure” with jdbc and mysql
I'm trying to connect to the local mysql server but I keep getting an error
here is the code
public class Connect
{
public static void main(String[] args)
{
Connection conn = ...
12
votes
2answers
22k views
Java: Insert multiple rows into MySQL with PreparedStatement
I want to insert multiple rows into a MySQL table at once using Java. The number of rows is dynamic. In the past I was doing...
for (String element : array) {
myStatement.setString(1, ...
18
votes
7answers
34k views
MySQL-JDBC: Communications Link Failure
My program that connects to a MySQL database was working fine. Then, without changing any code used to set up the connection, I get this exception:
...
3
votes
4answers
5k views
Android JDBC not working: ClassNotFoundException on driver
I'm trying to use JDBC in my Android application to connect to a remote database to do inserts, queries, etc. I have successfully connected and done these things in a different JAVA project. So I ...
2
votes
6answers
1k views
Getting last record from mysql
I am using mysql and facing some problem. I want to retrieve last row that is inserted.
<< Below are details >>
Below is how I created table.
create table maxID (myID varchar(4))
I inserted ...