PDA

View Full Version : Configure Ext App in a Web Project inside workspace



plunavat
22 Aug 2016, 8:00 AM
Hello,

If we want to configure extjs app inside a web application, there are two options

Option-1

We follow the steps mentioned below

We create Dynamic Web Project in eclipse.
Create a extjs app "MyApp" inside WebContent. "MyApp" folder is created and the complete ext folder is copied inside folder
We run sencha app watch. This would build the extjs application in build folder
Now we run Tomcat server on 8080 port
The application is available on http://localhost:8080/MyApp


we have a svn software to commit the code on common server and ext folder would unnecessary be committed which we don't want
we can exclude the ext folder from committing, but still is a extra process

Option-2

Possible solution is to go with Workspace Option
1. Create the workspace in eclipse

https://drive.google.com/file/d/0B120TdbFlh4dd2FaUW9leHRtcUE/view?usp=sharing

https://drive.google.com/file/d/0B120TdbFlh4dRndiWnNEWUVKR2M/view?usp=sharing

2. Create Dynamic web project inside the workspace

we first create a "EclipseWebProject" inside the workspace and then create dynamic web project in "EclipseWebProject"


54992

54993

3. "EclipseWebProject" Folder Structure

54994

4. Create extjs app "MyApp" inside "WebContent". This is done by adding sencha app from eclipse

https://drive.google.com/file/d/0B120TdbFlh4dakxGeEVnLWs2T1k/view?usp=sharing

(https://drive.google.com/file/d/0B120TdbFlh4dNkFjRld1eVR6Yms/view?usp=sharing)https://drive.google.com/file/d/0B120TdbFlh4dNkFjRld1eVR6Yms/view?usp=sharing
(https://drive.google.com/file/d/0B120TdbFlh4dNkFjRld1eVR6Yms/view?usp=sharing)
5. "MyApp" folder structure. Now here the ext folder is not created

https://drive.google.com/file/d/0B120TdbFlh4dV21abE1XaEpfcDQ/view?usp=sharing
(https://drive.google.com/file/d/0B120TdbFlh4dV21abE1XaEpfcDQ/view?usp=sharing)
6. I run sencha app watch by running sencha configuration

https://drive.google.com/file/d/0B120TdbFlh4deGlBZ242RGJaa0k/view?usp=sharing

7. "MyApp" is build properly and can be accessed at 1841 port

https://drive.google.com/file/d/0B120TdbFlh4daHJXYTRUdTFuOFU/view?usp=sharing

https://drive.google.com/file/d/0B120TdbFlh4dTG5oYzNaLVgxWlE/view?usp=sharing

8. Run the "EclipseWebProject" in tomcat server

https://drive.google.com/file/d/0B120TdbFlh4dd1B1LUZHTUYxQ1k/view?usp=sharing

9. Now access "MyApp"

54995

It gives following error on browser


"NetworkError: 404 Not Found - http://localhost:8080/build/development/MyApp/classic/resources/MyApp-all_1.css?_dc=1471880890976"
MyApp-a...0890976


"NetworkError: 404 Not Found - http://localhost:8080/ext/classic/theme-neptune/overrides/Component.js?_dc=1471880890973"
Compone...0890973


"NetworkError: 404 Not Found - http://localhost:8080/ext/classic/theme-neptune/overrides/grid/column/RowNumberer.js?_dc=1471880890973"

.......




10. tomcat is searching for build files in "WebContent-->build" folder. This scenario is ok for Option-1 when sdk folder is inside the "WebContent" folder

11. In this scenario what can we do so that the tomcat knows the "build" and "ext" folder is in workspace directory

12. In this scenario we can commit the "EclipseWebProject" to svn without committing ext sdk

Thanks & Regards,
Pranav C Lunavat

plunavat
29 Aug 2016, 6:41 AM
Can somebody from sencha at least comment...