Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Facing Problem while integrating with Tomcat

    As I am new to smart client , I start with a basic example of creating a button using smart client. I followed below Steps:

    1.Created a directory scripts in WEB-INF folder. This directory contains all the JS which are required for Smart Client.
    2. Created a jsp which is importing all the smart client JS. Code is like this
    Code:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    		<script type="text/javascript" language="javascript" src="scripts/ISC_Core.js"></script>
    		<script type="text/javascript" language="javascript" src="scripts/ISC_Foundation.js"></script>
    		<script type="text/javascript" language="javascript" src="scripts/ISC_Containers.js"></script>
    		<script type="text/javascript" language="javascript" src="scripts/ISC_Grids.js"></script>
    		<script type="text/javascript" language="javascript" src="scripts/ISC_Forms.js"></script> 
    		<script type="text/javascript" language="javascript" src="scripts/ISC_DataBinding.js"></script>
    		<script type="text/javascript" language="javascript" src="scripts/load_skin.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    Hello
    <script>
    isc.Button.create({
    	title: "Smart Button",
    	width: 200
    })
    </script>
    </body>
    </html>
    When I started the server try to access the page then I am not able to see any button . I am getting a JS error stating isc is undefined.

    Am I missing something ? Plz guide me.

    #2
    remove your doctype

    Comment


      #3
      I removed doctype also from code but still facing same problem "isc is undifined " . What else could be wrong ?

      Comment


        #4
        Are you sure your path to the js files is correct, relative to the application context?

        Look at your tomcat logs and/or the console if using FireFox. Are you seeing any 404 errors when the browser is requesting the Smartclient files?

        Comment


          #5
          There is no error in tomcat logs. Even I put all the js files in the folder where my jsp is stored and changed the path in jsp. But all efforts are in vain . Any other work around ?

          Comment


            #6
            I got it in TC. Here's what I did

            When I deployed this to Tomcat a few days ago, here's what I did:

            I create a folder under webapps called test.

            I copied isomorphic folder into the folder test.

            From there I just modified files in the examples folder, but they work.

            Restarted tomcat.

            It doesn't need to be in webinf since they aren't jsp's. And don't forget everytime you add or remove files you have to restart tomcat, or at least the container (test). You can do that from the admin console if you have it enabled, otherwise just stop and start tomcat and it should work.

            Comment


              #7
              This is really ridiculous attempt to try Smartclient.
              You can simply put your isomorphic folder directly under your main web application folder

              tomcat/webapps/<myWebApp>/isomorphic
              And this would workout perfectly fine.


              If you want to change the path of isomorphic folder, you need to specify the isomorphicuri attribute in your script path in your jsp.

              Don't try to reinvent the wheels.

              Comment

              Working...
              X