In my project, I have created a functionality which registers Editors.
For this, I have used bean class, jsp, Servlet and a Dao class.
I have a “Editors” table in database with following columns:
SQL> desc editors;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(5)
On running the application using tomcat 6, I am getting exception with the following stack trace :
HTTP Status 500 -
type Exception report
description The server encountered an internal error () that prevented it from fulfilling this request.
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.
I can see one issue is, your "t1" field is disabled. so whenever your form is getting submit, that field value will not get submit. So i suggest you can take that value under hidden variable. and can change the below line to new as i have mentioned.
The problem has been solved. What i did is, removed the commented line & closed MyEclipse IDE & started it again.
I don't know what is happening. At present, i am executing the same code, and its running fine. This is the 2nd time i am facing such problem. And if i am changing the code in MyEclipse, to make it to come into effect, i need to restart the IDE, its not getting refreshed while compiling it again
Can anyone tell the reason for same?
Joined: Jun 05, 2010
Also, how to replace this scriptlets from EL in my jsp??
Although you've probably solved your current problem, a hidden bug is ticking in your code. It is lurking in the following line:
Never ever use the INSERT statement without specifying the columns into which you're inserting, for two reasons:
1) If the number of columns in the table is changed, your program suddenly stops working. If you specify the columns, and a new nullable column is added (or column with default value specified), the statement will remain functional. New columns may be added for various reasons (eg. auditing, replication) that are independent of your application.
2) The second reason is much more serious. The order of columns in the table is not necessarily fixed. If the table is recreated for some reason, or column is dropped and added again for any reason imaginable (including inept DB admin), the order of columns might change. If you're lucky, your program crashes with a data conversion error, or breaks an existing constraint. However, your code might continue to work, but insert data into columns different from what is intended. If this is not caught early on, your database might get littered with errorneous data that will be difficult to disentangle.