I am not really sure what you are doing?? If you need a datasource and have set it up appropriately in your context.xml see http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html(for tomcat 6.0) you get the datasource doing something like this:
Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:/comp/env"); DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle"); in an action. You don't need to have a datasource as a hidden field. mas > Hi Mas, > >> 2) actually assigns the value "" >> 1) gets the value of the property from the formbean if it has been assigned >> in the formbean. >> You may have an action that populates the form by hitting a database, >> loading the data in the form >> and the forwarding to your current page ie before editing a record. > > If I'd like to load value from datasources into , in my jsp file, (1) should > always be used; otherwise, (2) will rewritten the form value to "" ? > > Thanks, > -- > Lu Ying > > >>> (1)<html:hidden property="field1" /> >>> (2)<html:hidden property="field1" value="" /> >>> >>> >>> When I load value from popup windows, it seems that default value will >>> be setup on (1); while (2) always return value="". -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 mark.shif...@yale.edu --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org