Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Herman Schelti

Ranch Hand
+ Follow
since Jul 17, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Herman Schelti

hi,

I used Netbeans 6.8 as IDE, it comes with GlassFish v3 Domain and Tomcat 6.0.20. Both servers have to result here.

with the configuration that I used, the form tag looks like <form id="editRelatie" method="post" action="/WebApplication1/index.htm">
(you probably have a different context root)

Did you find anything in your logfiles or console?

Herman

8 years ago
hi Gert-Jan,

works fine if you change your config a little: see below
Hope this works for you!

Herman

8 years ago

Now i have inserting data to table



No, you are "nserting" ....
hi,

see http://www.w3schools.com/SQl/sql_foreignkey.asp

just add a "," after

DEPT_ID" INTEGER




1. CREATE TABLE "Student" (
2. "ID" INTEGER not null primary key,
3. "NAME" VARCHAR(30),
4. "DEPT_ID" INTEGER,
5. FOREIGN KEY (DEPT_ID) REFERENCES DEPARTMENT(DEPT_ID)
6. );

hi,

if the e.getMessage() does not give enough information, add the class of the exception


It will probably give you a ClassNotFoundException, here's how to solve it:

If you have a connection from Netbeans to your MySQL database, that does not mean that your application can connect to the MySQL database.
You will have to add the mysql driver (the .jar file that it's in) to your webapplication (just put the jar file the lib folder of your webapplication), or add that .jar file to the classpath of your server.

Herman
I think you need to use { instead of (

Try to change:


into:



(I found this at http://www.rgagnon.com/javadetails/java-0107.html)

good luck,
Herman
hi,

my guess is that

throws a ClassNotFoundException


might be in your log, but it's only 1 line, easy to overlook.

Why not change it into


Good luck!

Herman
PS Please copy/paste from your log if you reply.
hi,

then con is null.

how do you initialize this variable con? (post some code)

Herman
hi Rob,

use a PreparedStatement, it will take care of the quotes for you.
See for an example:
http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html

Herman
hi Bernard,

I did UrlyBird last year (can't remember which version)

1. yes, you have to provide an implementation. GUI and serverside are two different things. Sun will probably run a script to test your "create" method.

2. Yes, it's just the number assigned but don't know if it changes. I assumed it didn't.

3. If your specs don't say it should be deleted, then don't make it. Just make what they ask. Same goes for hiding booked rooms: does it say so in your specs? If not: don'make it.

4. If you lock client-side that's possible. I choose to lock server-side only. Server does not go on holiday without unlocking...

Herman
hi,

just use the logger for your logging (don't mix with System.out)

Herman
[ December 16, 2008: Message edited by: Herman Scheltinga ]
hi Potter,

You are using the JDBC_ODBC bridge, it does not implement very much.
Here's some code:



cheers,
Herman
No.

In a webapplication your classes will go into a folder inside
WEB-INF/classes. (or in a .jar file inside WEB-INF/lib)

Your .jsp (the sources) will not be there, and the compiled versions certainly will not be there.

Herman
9 years ago
JSP
hi,

just read your errormessage again
Error creating bean with name 'bookShopTxAdvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined.

You need to define a 'transactionManager'.

Herman
Swallowing exceptions is also pretty bad.



Herman
[ July 25, 2008: Message edited by: Herman Scheltinga ]
9 years ago
JSP