1 2 Previous Next 16 Replies Latest reply on Oct 24, 2011 12:16 AM by Dhanya Sreejith

    GateIn merged.js

    Dhanya Sreejith Newbie

      hiii....

       

              Earlier I've posted in the same forum how I can view individual js in GateIn rather than as a single js (merged.js). I got the reply as to set -Dexo.product.developing=true which solved my issue. But now we've a performance tuning issue. Our application is taking long time to login. On removing this argument, itz not taking much time to login but javascript errors (eg: Exo is not defined) is seen in the console. Navigations are also not possible in this situation. Our requirement is : we need to load our js individually without affecting performance.

               Thnx in advance......

        • 1. Re: GateIn merged.js
          Trong Tran Master

          it is hard to determine your problem unless you can show us how to reproduce the problem

          • 2. Re: GateIn merged.js
            Dhanya Sreejith Newbie

            hiii...

                 Thnx for ur reply.... I'll explain our situation : Firstly we started run.bat in a fresh GateIn (the argument -Dexo.product.developing=true was not set)... we were able to get Classic site without any javascript errors. Then, we deployed our war file in this GateIn. In this war file, we've a gatein-resources.xml in which we mentioned all our javascript files. Again we started run.bat .. On taking Classic site, we got so many javascript errors (eg: Exo is not defined)..... On providing the argument -Dexo.product.developing=true, no errors were encountered.... But our application is taking too much time to login.... Is there any way to make available all the js specified in gatein-resources.xml in our application without providing this argument ?

                 Thnx in advance.....

            • 3. Re: GateIn merged.js
              Khoi Nguyen Novice

              Did you always get the javascript error when you were running GateIn without developing mode? Which GateIn version did you try, I also test on GateIn 3.2-M1 but there is no error regardless of developing mode

              • 4. Re: GateIn merged.js
                Dhanya Sreejith Newbie

                Hi Khoi,

                 

                thanks for the response..

                I hope 'without developing mode' means without deploying our application war file in Gatein..(without putting .war file in deploy folder of GateIn).

                If it is the case u r asking, then we have not got javascript errors.Once if we have deployed our application war file, then there is error.

                We r using GateIn 3.1.

                Does upgrading to latest version(GateIn 3.2) resolves our issue??

                Thanks in advance..

                • 5. Re: GateIn merged.js
                  Soren Schmidt Newbie

                  Dhanya,

                   

                  Concerning the javascript errors: Please try to empty the browser cache before each test.

                   

                  cu

                  Soren

                  • 6. Re: GateIn merged.js
                    Trong Tran Master

                    Hi Dhanya,

                     

                    Can you show us content of your war's gatein-resources.xml file ?

                     

                    FYI, the exo.product.developing is false by default if it is not set. In the case, GateIn does two things :

                     

                    1/ Merge all files declared in gatein-resources.xml files in all wars into single js merged.js ( as you known ). The order of merging based on priority of js file configured in gatein-resources.xml

                     

                    2/ Then compress the js that are combined after merging, then send to browser.

                     

                    I hope this information can help you to figure out or do a guess what is happening.

                    • 7. Re: GateIn merged.js
                      Dhanya Sreejith Newbie

                      hiii Trong...

                             Thnx for ur reply...... we've not set the argument -Dexo.product.developing=true.... as per wat u told, in this case, GateIn merges all files in gatein-resources.xml to a single file........ even then, we r getting javascript errors on logging to the application...... y is it so ?????

                             Thnx in advance......

                      • 8. Re: GateIn merged.js
                        Trong Tran Master

                        what do you have now ?

                         

                        if the bug still appears, pls submit your gatein-resources.xml here. It would help us to figure out the problem more precisely.

                        • 9. Re: GateIn merged.js
                          Dhanya Sreejith Newbie

                          hiii Trong...

                                Thnx for ur reply..... I'll provide u the contents of our gatein-resources.xml here.......

                           

                          <?xml version="1.0" encoding="UTF-8"?>

                          <gatein-resources

                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                              xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_1 http://www.gatein.org/xml/ns/gatein_resources_1_1"

                              xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1">

                           

                              <javascript>

                                    <param>

                                       <js-module>extbaseJS</js-module>

                                       <js-path>/javascript/lib/ext-2.1/adapter/ext/ext-base.js</js-path>

                                       <js-priority>1</js-priority>

                                   </param>

                                   <param>

                                       <js-module>extallJS</js-module>

                                       <js-path>/javascript/lib/ext-2.1/ext-all.js</js-path>

                                       <js-priority>2</js-priority>

                                   </param>

                                   <param>

                                       <js-module>extcommonsJS</js-module>

                                       <js-path>/javascript/commons/extCommons.js</js-path>

                                       <js-priority>3</js-priority>

                                   </param>

                                   <param>

                                       <js-module>dateJS</js-module>

                                       <js-path>/javascript/date/date.js</js-path>

                                       <js-priority>2</js-priority>

                                   </param>

                                 </javascript>   

                          </gatein-resources>

                          • 10. Re: GateIn merged.js
                            Trong Tran Master

                            seems the configration is good, no idea why it does not work

                             

                            Could you  create a simple .war which only contains needed resources ( gatein-resources.xml, js files, web.xml) to help us reproduce your problem ?

                            • 11. Re: GateIn merged.js
                              Dhanya Sreejith Newbie

                              hiii Trong...

                               

                                   Thnx for ur reply........ actually we r not able to figure out the reason behind getting js errors after login without providing -Dexo.product.developing=true...  so wat we r trying now is just a trial & error by adding & removing js files in gatein-resources.xml (to find out which js actually is the cause of the js errors)

                              • 12. Re: GateIn merged.js
                                Trong Tran Master

                                Yes, it is good way to study the problem. Just notice that you should clean up browser cache before each test.

                                 

                                You can also submit the simple war here and I can help to reproduce/study in my side

                                 

                                Thx

                                • 13. Re: GateIn merged.js
                                  Dhanya Sreejith Newbie

                                  hiii Trong...

                                       Thnx for ur reply........  By doing so, we figured out the js which caused the js errors..... 

                                  • 14. Re: GateIn merged.js
                                    Dhanya Sreejith Newbie

                                    hiii....

                                          We've imported some external js in our individual JSF pages.... If we do not provide the VM argument -Dexo.product.developing=true, will these js be also merged to merged.js ?

                                    1 2 Previous Next