Albin Joseph

Greenhorn
+ Follow
since Jan 22, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Albin Joseph

What are the disadvantages of Serializable interface. Is there any performance or any kind of issues associated with Serializable interface.
16 years ago
Hi All,

I have a JSP which is having a structure like the one below. I am using WebSphere Application Server 6. When the below JSP rendered to the screen it is showing only the contents of my dynamic include and code after the last dynamic include. I have tried to change the buffer size still the same problem persists.




What could be the problem? Please help me.

The output of the above JSP is

Contents of header.jsp
Contents of nav.jsp
The final data
16 years ago
JSP
You can keep your array of bytes in session and from the next page retrieve this value and display it.
17 years ago
Hi

I am getting an exception in my Hibernate exception. Below is the stack trace of my exception.

he following exception was logged org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.javacertificate.data.table.Exam.setField1
at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValuesWithOptimizer(PojoEntityTuplizer.java:215)
at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:185)
at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3232)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
................................


This is my database details for this field.

+---------------+--------------+------+
| Field | Type | Null |
+---------------+--------------+------+
| FIELD1 | bigint(20) | YES |
+---------------+--------------+------+

my mapping is

<property name="field1" type="long">
<column name="FIELD1" />
</property>

and following is my java class.

private long field1;

public long getField1() {
return field1;
}

public void setField1(long field1) {
this.field1 = field1;
}

How can I resolve this issue ?
[ May 26, 2006: Message edited by: Albin Joseph ]
Thanks for your help. The problem solved. There was a mis match in the data type.
hi

I am new to hibernate. When I am trying to insert a record to the database. I am getting an exception. Below is the stack trace of my exception.

Hibernate: insert into USERS (LOGON_ID, PASSWORD, RESETTED, WRNGCOUNT, LOCKED, USERS_ID) values (?, ?, ?, ?, ?, ?)
java.lang.ClassCastException
at org.hibernate.type.IntegerType.set(IntegerType.java:41)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:83)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:60)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(Abst
ractEntityPersister.java:1826)

Here USERS_ID is my primary key and is of type long. Below is my mappign file.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">


<hibernate-mapping>
<class name="com.aufond.data.table.User" table="USERS">
<id name="init_usersId" type="long" column="USERS_ID">
<generator class="assigned" />
</id>

<property name="logonId" type="java.lang.String">
<column name="LOGON_ID" />
</property>

<property name="password" type="java.lang.String">
<column name="PASSWORD" />
</property>
<property name="resetted" type="boolean">
<column name="RESETTED" />
</property>
<property name="wrongCount" type="int">
<column name="WRNGCOUNT" />
</property>

<property name="locked" type="boolean">
<column name="LOCKED" />
</property>
</class>
</hibernate-mapping>



What is wrong with my code. Please help me.
JSP is mainly used for presentaion logic only. But servlet can handle business logic also.

The main difference between servlets and JSP is servlets can supprot any type of protocol like SMTP, FTP.. But JSP supports HTTP protocol only
18 years ago
If the filename itself is dynamic , you need to use <jsp:include&>.
If you want to pass some paramters, then <jsp:include> is the only solution.
[ February 14, 2006: Message edited by: Albin Joseph ]
18 years ago
JSP
No problem.

Why you need to distingush methods from these two interfaces ? Because there is no implementation in the interface so would it make any sense distingushing these two itnerfaces.
18 years ago
POST is slow compared to GET. And POST is not considered to be idempotent.
18 years ago
Hi

You can use any type of protocol like FTP, SMTP with GenericServlet. But Sun is providing implementation only for HTTP protocol. So if you want to use FTP with servlet , then extend GenericServlet and provide the necessery implementations
18 years ago
Use Div with two images. And depends on the click show and hide the DIV
You can find out some practice questions from here.

http://www.javacertificate.net/scwcd.htm
In JSP teh default value for isThreadSafe is true. that means it will not implement SingleThreadModel. So any number of threads can access the service method at a time.

Don't be confused on seeing the default value 'true', think that we are telling to the compiler that 'My JSP page is already thread safe, so I don't need any special mechanisms like implementing SingleThreadModel to make my JSP thread safe.'
18 years ago
JSP