Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

<bean:write null exception with bean define

<bean:write null exception with bean define

 
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans
View previous topic :: View next topic  
Author Message
juniormember



Joined: 28 Jun 2008
Posts: 154

PostPosted: Wed Jul 08, 2009 1:17 pm    Post subject: <bean:write null exception with bean define Reply with quote

Hi

In struts i am using code to define variable


Code:
<logic:iterate id="ViewForm" name="vcQPaper" scope="request">
   <bean:define id="sPaperCode" type="java.lang.String">
      <bean:write name="ViewForm" property="SPaperCode" />
   </bean:define>
</logic:iterate>


But it is show null

Quote:
Define tag cannot set a null value for bean with id: sPaperCode



How to resolve this problem in struts.

thanks
Back to top
View user's profile Send private message
javatech



Joined: 19 Jan 2007
Posts: 39

PostPosted: Wed Jul 08, 2009 3:11 pm    Post subject: Reply with quote

if your value come null in property="SPaperCode",
it will throw error of null for <bean:define id="sPaperCode">


try to use


this code instead of old

Code:
<logic:iterate id="ViewForm" name="vcQPaper" scope="request">
 
   <bean:define id="sPaperCode" type="java.lang.String" name="ViewForm" property="SPaperCode" />

</logic:iterate>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack