View Full Version : Setup Instructions
7 Oct 2009, 10:56 AM
Hi Pedro and anyone else;
Disclaimer: I have never configured Tomcat before.
I am setting up DJN on Tomcat 6.0 and going thru your User Guide. It is really good but I think assumes a bit more familiarity with Tomcat than I possess...
1. I think I need to create a new directory under 'webapps' called 'foo' (where 'foo' is the name of my web app). Then in there, make a WEB-INF/lib and copy the JAR's listed in 'Configuring a new project to use djn' into there. So far so good.
2. In your manual where you say "finally you will need to provide the ExtJs files... download them and install them in your web app", which files do you mean exactly and in which directory of 'webapps/foo' should they go? I do not see any JAR's in there, and I am a bit puzzled, does JN rely on Ext's .js files?
Any pointers greatly appreciated!
7 Oct 2009, 11:50 AM
... and right now Tomcat seems to kind of be working, but I am getting this error:
Now, regardless of whether or not I need to do something further with ExtJs files, the fact that DjnServlet is trying to load must mean that it is mapped OK and finding it OK in the DJN .jar file. I listed the contents of the DJN .jar and the above Gson class is NOT in there. There is a 'GsonBuilderConfigurator' though. Does this not imply an error in the contents of the jar?
7 Oct 2009, 11:10 PM
First of all, I would recommend you look for information on how web apps are deployed and the organization of a WAR file, or you will be in for problem after problem.
Then, take a look at Tomcat specifics: the 'webapps' directory is where you put your .war file, do not create a directory, etc. The way you are deploying the app is not the right way, though it might be working by accident.
And, it woulb be wise to try to get the enclosed demo/test WAR file to work first. Just put it under the 'webapps' directory.
The .class file your app is missing is a file used *only* in the demo/test app, not part of the DJN library: maybe you have copied the demo web.xml file to start your own app without cleaning it up?
The ExtJs files are those extjs provides: you need them, DJN is based on ExtJs.
Thanks for the reply. First of all, yes, I figured out that 'ForTesting' thing and of course now it seems like a really dumb question on my part ;) I did not realize the need to hack around with 'web.xml'. I am sure your setup instructions would be more obvious to someone with more Tomcat knowledge.
I am still a bit unclear on the Ext file dependency though. Do you mean their .js's are required to run server-side, eg. files from Ext are required to be in Tomcat's classpath? I don't see how this can be possible and I read some of your source code and can see no evidence of this. It looks like it is all 'softwarementors' and apache utility classes.
Perhaps all you mean is that the Ext .js files need to be accessible to the client-side for the whole thing to work. If so, yes, that is clear. Could you clarify this for me?
Thanks again for all your hard work!
8 Oct 2009, 8:10 AM
Yes, .js files need to be accessible to the client, that's all: no need to be in the classpath.
You just put them in a directory under the web app root directory so that the client browser can find them, and that's it -exactly the way you would do to include any .js or .png or any other file to be referenced in a plain HTML file.
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.