Announcement

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

    #16
    I was able to add a SCRIPT SRC= entry into my JSP app file. The bad news is that it apparently not being executed. Good news: when I look at the page source, and I click on it, I see the compiled version of what is to be included. So, I have the path right.

    The bad news is that it is not being executed. And, it is damn silent on the reason. Google research has not revealed why, either.

    I think there is some subtlety that escapes me. Or, some bug dose of ignorance in play. I feel close to a solution. But, that may be an illusion.

    Back to mines Saturday PM.

    Thanks,

    Rick

    Comment


      #17
      If the <script> tag is not closed (no matching </script>), the src attribute is misspelled, or the <script> is not in a place in the DOM where it's allowed (eg, it's in between the </head> and <body>, an inert area), this would be expected.

      Comment


        #18
        I tried very hard to get the referenced jsp file to run. I changed the filename to have a .js extension. No dice. I put quotes around the URL.

        It seemed so simple in the docs.

        For example, a SmartClient View expressed in XML and contained within a JSP is still a separately cacheable resource when loaded via a <SCRIPT SRC> tag and advertised as a cacheable resource via HTTP headers, because it is ultimately delivered to the browser as simple JavaScript.
        Searching on the Internet is not helpful. I did not find one example of a JSP file being run using a SCRIPT tag. Also, I find statements like the referenced file cannot have SCRIPT tags within. Which conflicts with your docs.

        Looking at HTTP headers leads off into configuring my Apache server. I cannot do that.

        Also, I find admonitions to include the referenced file at the end, lest the browser be held up loading.

        Do I need to add something to the SCRIPT tag? Do I need to add or change anything in the referenced JSP file? Are there any examples to look at? Or, keywords to Google to get close to an answer?

        Thanks,

        Rick

        Comment


          #19
          All you need is <script src="path/to/some.jsp"></script>, that's it.

          But the .jsp should return only JavaScript content. No HTML. Component XML is fine because it's translated to JavaScript.

          Don't rename the file to .js, this of course breaks it.

          Comment


            #20
            I really appreciate y'all staying with me on this problem. I think I tried already what you recommend. But, I could be wrong. This time I can show you what is not working. The referenced code might be scanned (as evidenced in the server log, below.) But, it is not being run. The first thing it does is define ProjectForm. And, my first test tries to open that.

            === 2013-03-17 14:40:30,296 [sor4] INFO RequestContext - URL: '/isomorphic/system/modules/ISC_VisualBuilder.js', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0': Moz (Gecko) with Accept-Encoding header
            === 2013-03-17 14:40:30,343 [sor4] INFO Download - File D:/My Websites/Planet Project/isomorphic/system/modules/ISC_VisualBuilder.js not found, sending 404
            === 2013-03-17 14:40:30,375 [sor1] INFO RequestContext - URL: '/tools/visualBuilder/workspace/MyProjects.jsp', User-Agent:'Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0': Moz (Gecko) with Accept-Encoding header
            === 2013-03-17 14:40:30,390 [sor2] INFO Download - Returning 304: Not modified on conditional get of: D:\My Websites\Planet Project\isomorphic\system\modules\ISC_Analytics.js
            === 2013-03-17 14:40:30,375 [sor3] INFO Download - Returning 304: Not modified on conditional get of: D:\My Websites\Planet Project\isomorphic\system\modules\ISC_Drawing.js
            === 2013-03-17 14:40:31,375 [sor8] INFO Download - Returning 304: Not modified on conditional get of: D:\My Websites\Planet Project\isomorphic\skins\TreeFrog\load_skin.js
            === 2013-03-17 14:40:32,203 [sor1] INFO JSSyntaxScannerFilter - /tools/visualBuilder/workspace/MyProjects.jsp: scanning <script> tags in html output
            === 2013-03-17 14:40:32,234 [sor1] INFO Compression - /tools/visualBuilder/workspace/MyProjects.jsp: 167885 -> 20904 bytes
            === 2013-03-17 14:40:37,328 [sor4] INFO RequestContext - URL: '/isomorphic/system/modules/ISC_DocViewer.js', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0': Moz (Gecko) with Accept-Encoding header
            === 2013-03-17 14:40:37,343 [sor4] INFO Download - File D:/My Websites/Planet Project/isomorphic/system/modules/ISC_DocViewer.js not found, sending 404
            === 2013-03-17 14:40:37,750 [sor4] INFO RequestContext - URL: '/isomorphic/system/modules/ISC_VisualBuilder.js', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0': Moz (Gecko) with Accept-Encoding header
            === 2013-03-17 14:40:37,750 [sor4] INFO Download - File D:/My Websites/Planet Project/isomorphic/system/modules/ISC_VisualBuilder.js not found, sending 404
            === 2013-03-17 14:40:38,093 [sor4] INFO Download - Returning 304: Not modified on conditional get of: D:\My Websites\Planet Project\isomorphic\skins\TreeFrog\skin_styles.css
            Here is how the main JSP file starts...
            Code:
            <%@ page contentType="text/html; charset=UTF-8"%>
            <%@ taglib uri="/WEB-INF/iscTaglib.xml" prefix="isomorphic" %>
            <HTML><HEAD><TITLE>PlanetProjectAlphaApp</TITLE>
            <isomorphic:loadISC skin="TreeFrog" includeModules="Drawing,Analytics,DocViewer,VisualBuilder"/>
             </HEAD><BODY>
            <SCRIPT>
            isc.Page.setAppImgDir("../graphics/");
            <isomorphic:XML>
            <HTMLPane ID="HTMLPane0" overflow="hidden" autoDraw="false">
                <contents>&lt;html&gt;  &lt;head&gt; &lt;meta http-equiv=Content-Type content=&quot;text/html; charset=windows-1252&quot;&gt; &lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered)&quot;&gt; &lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:&quot;Cambria Math&quot;; 	panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	font-size:13.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;} .MsoPapDefault 	{margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;  &lt;/head&gt;  &lt;body lang=EN-US&gt;  &lt;div&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Thank you for trying out PlanetProject(tm). This software is still under development. However, much of the powerful functionality is working and I welcome you to explore it.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; There are no passwords as of yet. So, if your Email has been entered into the system, then you are a legitimate &lt;b&gt;Team Member&lt;/b&gt; and you can use the button below to login. &lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; There are no tutorials or help systems yet, either. So, you will have to experiment. A system for recording bugs is being planned. When it has been established, a link will be created to it here. Until then, bugs will have to be communicated via email to the address below. &lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; &lt;u&gt;To get you started, below are a few definitions for the objects you are about to manipulate.&lt;/u&gt; &lt;img src=&quot;images/LoginDiagram.jpg&quot; alt=&quot;Login Diagram&quot; style=&quot;max-width:40%&quot; align=&quot;right&quot;&gt; &lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; You are a &lt;b&gt;Team Member&lt;/b&gt;. You belong to a &lt;b&gt;Community&lt;/b&gt;. &lt;b&gt;Communities&lt;/b&gt; will have one or more &lt;b&gt;Organizations&lt;/b&gt;. You must be associated with one of them. These can be internal departments or external customers. &lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; &lt;b&gt;Communities&lt;/b&gt; can have &lt;b&gt;Projects&lt;/b&gt;. &lt;b&gt;Team Members&lt;/b&gt; associated with a &lt;b&gt;Project&lt;/b&gt; are &lt;b&gt;Stakeholders&lt;/b&gt;. A &lt;b&gt;Team Member&lt;/b&gt; may be a &lt;b&gt;Stakeholder&lt;/b&gt; on more than one &lt;b&gt;Project&lt;/b&gt;. &lt;b&gt;Team Members&lt;/b&gt; are external &lt;b&gt;Stakeholders&lt;/b&gt; if they are part of an external &lt;b&gt;Organization&lt;/b&gt;.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Each &lt;b&gt;Project&lt;/b&gt; will have its own &lt;b&gt;Issues&lt;/b&gt;. In PlanetProject, &lt;b&gt;Issues&lt;/b&gt; are things that need to be discussed. They are often Problems. But an &lt;b&gt;Issue&lt;/b&gt; can represent another type such as an Assumption, Commitment, Constraint, Decision, Dependency, Goal, Information, Lesson Learned, Question, Request, or Risk.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Each &lt;b&gt;Issue&lt;/b&gt; will have its own Tasks. The &lt;b&gt;Issue&lt;/b&gt; represents the reason for its tasks. No &lt;b&gt;Task&lt;/b&gt; exists without an &lt;b&gt;Issue&lt;/b&gt;. Nothing is ever done well without knowing WHY.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Besides having a Type, an &lt;b&gt;Issue&lt;/b&gt; will have an Impact. That reflects on the priority of the &lt;b&gt;Issue&lt;/b&gt; and its Tasks. (If an &lt;b&gt;Issue&lt;/b&gt; is a Risk, it will also have a Likelihood.) Tasks get their importance from their &lt;b&gt;Issue&lt;/b&gt;, and can form a strategy for resolution of the &lt;b&gt;Issue&lt;/b&gt;. Each &lt;b&gt;Issue&lt;/b&gt; may also have a Category. The list of Categories can be customized by each &lt;b&gt;Community&lt;/b&gt; to suit the needs of their projects. The starting list is Cost, Quality, Schedule, Scope and Technical.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Each &lt;b&gt;Project&lt;/b&gt; will have its own Meetings. The purpose of a Meeting is to gather the appropriate &lt;b&gt;Team Members&lt;/b&gt; to discuss a specific set of &lt;b&gt;Issues&lt;/b&gt;. Such &lt;b&gt;Team Members&lt;/b&gt; would be associated as Participants of the Meeting. They could be &lt;b&gt;Stakeholders&lt;/b&gt;, or just anyone in the &lt;b&gt;Community&lt;/b&gt;.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Each &lt;b&gt;Project&lt;/b&gt; will have its own &lt;b&gt;Reports&lt;/b&gt;. The purpose of a &lt;b&gt;Report&lt;/b&gt; is to communicate information about the &lt;b&gt;Project&lt;/b&gt; and/or its &lt;b&gt;Issues&lt;/b&gt; to appropriate &lt;b&gt;Team Members&lt;/b&gt;. Such &lt;b&gt;Team Members&lt;/b&gt; would be associated as &lt;b&gt;Recipients&lt;/b&gt; of the &lt;b&gt;Report&lt;/b&gt;.&lt;/p&gt;  &lt;p style=&apos;margin-top:0in;margin-right:0in;margin-bottom:9.0pt;margin-left:0in;\ntext-align:justify&apos;&gt; Now that you have a bit of the hierarchy, feel free to go deeper. If you have any comments or questions, contact &lt;a href=&quot;mailto:rick@menloparksoftware.com&quot;&gt;Rick Bollinger (rick@menloparksoftware.com)&lt;/a&gt;.&lt;/p&gt;  &lt;/div&gt;  &lt;/body&gt;  &lt;/html&gt;</contents>
                <contentsType>page</contentsType>
                <width>100%</width>
                <height>530</height>
                <top>20</top>
                <padding>20</padding>
                <showResizeBar>true</showResizeBar>
                <layoutAlign>top</layoutAlign>
                <visibility>visible</visibility>
            </HTMLPane>
            
            <DynamicForm numCols="6" ID="LoginForm" ref="LoginForm" autoDraw="false">
            And, here is how it ends...
            Code:
            <Window ID="TeamMemberWindow" autoDraw="false">
                <isModal>true</isModal>
                <title>Window2</title>
                <items><Canvas ref="TeamMemberLayout"/>
                </items>
                <showModalMask>true</showModalMask>
                <modalMaskOpacity>20</modalMaskOpacity>
                <width>100%</width>
                <height>400</height>
                <top>120</top>
                <showShadow>false</showShadow>
            </Window>
            
            
            </isomorphic:XML></SCRIPT>
            <SCRIPT SRC="../../../tools/visualBuilder/workspace/MyProjects.jsp"></SCRIPT>
            </BODY></HTML>
            The file being reference starts like this...
            Code:
            <isomorphic:XML>
            <DataSource>
                <loadID>Project</loadID>
            </DataSource>
            
            <DataSource>
                <loadID>TeamMember</loadID>
            </DataSource>
            
            <DynamicForm numCols="9" colWidths="60,100,60,*,*,*,*,*,*" overflow="hidden" dataSource="Project" ID="ProjectForm" autoDraw="false">
            And, ends like this...
            Code:
            <Window ID="MyProfileWindow" autoDraw="false">
                <isModal>true</isModal>
                <title>Window2</title>
                <items><Canvas ref="MyProfileLayout"/>
                </items>
                <showModalMask>true</showModalMask>
                <modalMaskOpacity>20</modalMaskOpacity>
                <width>100%</width>
                <height>400</height>
                <top>120</top>
                <showShadow>false</showShadow>
            </Window>
            
            
            </isomorphic:XML>
            The script I see in Firebug is just from the main file. Although, it shows the SCRIPT tag making the external reference. No errors are indicated. The code just lays there.

            Do I need to wrap it in a function and call it, or something?

            Thanks,

            Rick

            Comment


              #21
              The code in the main file looks ok (the script src=...) reference.
              What do you get if you hit that page directly (MyProjects.jsp)? Do you see JS or do you see XML?
              If you're seeing XML, you need to add the taglib definition to the top so the JSP engine will recognize the isomorphic:XML tags and perform the conversion to JS.

              Comment


                #22
                Good call! That did the trick.

                I remember seeing JSP before on one of my unsuccessful tests. It must have been before I started deleting things.

                One last question that I have been unable to answer before now. My remote server only has the runtime installed. I have been saving the pure JS code generated and uploading that to the server under the assumtion that JSP with XML in it would not work.

                Is my assumption valid?

                I owe y'all a great amount of gratitude to help me get this far. I hope this is the last major technology to conquer. I could not have done it without the great support.

                If you drew the short straw to work Sunday I really appreciate this act of mercy on my part.

                Thanks, and have a great week!

                Rick

                Comment


                  #23
                  No, not a valid assumption. Our software is not interpreting the .jsp, Tomcat is. Your deployment of our runtime vs the SDK does not affect Tomcat's behavior with respect to .jsps.

                  Comment

                  Working...
                  X