1

In my java web application sources generated by Sencha CMD are located in resources folder. I am trying to run application in dev mode (without build) using boostrap.js, so I declared Ext.Manifest and included below in jsp file:

<script id="microloader" data-app="52906e0a-6b39-4de6-b1f2-dc27cf37969e" type="text/javascript" src="resources/bootstrap.js"></script>

With standard configuration microloader tries to load files as if extjs application source files were directly in web root path, which is inccorect as the files are not there:

http://localhost:8080/myapp/classic.json

how to "tell" microloader to look for the files in resource folder, so the request would look like this:

http://localhost:8080/myapp/resources/classic.json

I am able to make this work without using boostrap.js, if I include app.js directly and specify appFolder in Ext.Application. But I want to test different profiles (modern, classic).

patryks
  • 650
  • 2
  • 15
  • 32
  • I think you can set this up in the somewhere in app.json – pagep Jan 29 '17 at 23:30
  • The best config I found that should do the trick is boostrap.base in app.json but it is not working. When I set `"base": "resources/${app.dir}"` it still tries to load classic.json from web root. – patryks Jan 29 '17 at 23:48
  • After changes to the app.json I think you have to rebuild the bootstrap. – pagep Jan 30 '17 at 00:41
  • 1
    After changing base I cannot build application. SenchaCmd throws error that is unable to find bootstrap.js in `..\webapp\resources\resources`. Note that I already generated app in resources folder. – patryks Jan 30 '17 at 01:01
  • In Extjs6 when building prod it will put the entire bootstrap.json in local storage. We had similar issues. Clear the Local storage. – Nikos Js Jan 30 '17 at 13:08
  • @gisit you will have to make entry in app.json for "path" – Tejas Jan 30 '17 at 15:37
  • @Couponrabais there is nothing in local storage – patryks Feb 02 '17 at 23:12
  • @Tejas1991 where to add path? In root level of app.json add `"path":"resources/"`? – patryks Feb 02 '17 at 23:13
  • yes inside path – Tejas Feb 03 '17 at 08:14
  • do you find a solution ? i m asking questions in same theme here : http://stackoverflow.com/questions/43634461/stack-extjs-6-spring-boot – mik3fly-4steri5k May 03 '17 at 16:03
  • No. I ended up developing without boostrap.js. There was a similar question regarding extjs 5 also without answer https://www.sencha.com/forum/showthread.php?286393-How-to-set-correct-paths-in-the-generated-bootstrap-json – patryks May 04 '17 at 20:08

0 Answers0