How to use Smart Client objects in jsp file

Hi

I am trying to integrate Smartclient with struts 2.
when i am using the smart client objects in jsp file the system is not able to find the smart client objects.
e.g

Below is a small piece of code that i have writte.
when i try to execute it it says “CANVAS Is undefined”.
where as if i use the same piece of code (i.e script tag in HTML file it works).

i think there might be some problem in the way i have to use the taglib and i am not following the correct methodology.
I have added the isomorphic directory under webcontents.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<%@page language=“java” contentType=“text/html; charset=ISO-8859-1”
pageEncoding=“ISO-8859-1”%>
<%@ taglib uri=“/WEB-INF/iscTaglib.xml” prefix=“isomorphic” %>
<HEAD>
<SCRIPT SRC=${pageContext.request.contextPath}/isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=${pageContext.request.contextPath}/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=${pageContext.request.contextPath}/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=${pageContext.request.contextPath}/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=${pageContext.request.contextPath}/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=${pageContext.request.contextPath}/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
</HEAD>
<BODY>
<SCRIPT>
Canvas.create({
ID:“myFirstWidget”,
contents:“Hello world!”,
backgroundColor:“blue”
});
</SCRIPT>
</BODY>
</HTML>

Thanks & regards
Hemant

The paths for your <SCRIPT src=> tags are apparently wrong. Use View Source to see what those paths have expanded into, then make sure the various files (ISC_Core.js etc) are actually available at those URLs.

Hi
Thanks a ton

one more thing i want to know is that. I have a grid or say dropdown (combo box) and i want to populate sending data from a java class. howe can i achieve it. what all ways are there to send data from JAVA class to the UI layer.

Thanks & Regards
Hemant

Hello Hemant,

Use comboBox.optionDataSource. For the DataSource itself, the best place to start is the QuickStart Guide’s “Data Integration” chapter - you want path 1, Server-side Integration with Java.