hi
html commands like
disabled doesn't pass the value to the .java class,
what is the error?
u]when we put a disabled keyword before the value the above jsp did not work, but when we remove that disabled keyword it works successfully[/u]
what the wrong?
error report
10:49:32,004 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
product id is null
product name is
ggimhan@hotmai.com10:49:32,004 ERROR ServletDispatcher:185 - Could not execute action
java.lang.NullPointerException: null is not a valid identifier
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1844)
this is working successfully,
<html>
<head>
<title>Product List</title>
</head>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Iterator"%>
<body>
<h1>Products Modify </h1>
<form method="POST" action="productupdate.action">
<%
test.hibernate.actions.ProductModify e=new test.hibernate.actions.ProductModify();
e.setOid(request.getParameter("oid"));
String s=e.doExecute();
System.out.println("mod execute is ="+ s);
String s1=e.getOid();
System.out.println("mod oid is ="+s1);
java.util.List list=e.getProducts();
System.out.println("mod list.size()="+list);
Iterator iter = list.iterator();
if(iter.hasNext()){
test.hibernate.data.Product p = (test.hibernate.data.Product) iter.next();
String oid=p.getId();
String a= p.getName();
double b=p.getPrice();
int c=p.getAmount();
%>
<p align="center"><font color="#000000" size="6"><strong> Modify An Product </strong></font></p>
<div align="center">
<table width="80%" border="1">
<tr>
<td width="48%" bgcolor="#999999"> <div align="left">
<p><strong>Org ID</strong></p>
<p><strong>Org Name</strong></p>
</div></td>
<td width="52%"><p>
<input name="productid" type="text" size="35" value="<%= oid%>">
</p>
<p>
<input name="name" type="text" size="35" value="<%= a%>">
</p></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product price</strong></div></td>
<td><input name="price" type="text" size="35" value="<%= b%>"></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product Amount</strong></div></td>
<td><input name="amount" type="text" size="35"value="<%= c%>"></td>
</tr>
<%
}
%>
</table>
</div>
<p align="center">
<input type="submit" name="Submit" value="Change Now">
</body>
</html>
but when we put a disabled keyword before the value of the above jsp , it did not work error report
10:49:32,004 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
product id is null
product name is
ggimhan@hotmai.com10:49:32,004 ERROR ServletDispatcher:185 - Could not execute action
java.lang.NullPointerException: null is not a valid identifier
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1844)
when we disabled null value is passing, what the wrong?
<
input name="productid" type="text" size="35" disabled value="<%= oid%>">
</p>
<p>
<input name="name" type="text" size="35" value="<%= a%>">
</p></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product price</strong></div></td>
<td><input name="price" type="text" size="35" value="<%= b%>"></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product Amount</strong></div></td>
<td><input name="amount" type="text" size="35"value="<%= c%>"></td>
help me
regards gimhan