[Catgen-developer] Catgen-server code organization
Status: Beta
Brought to you by:
mbeneteau
|
From: Marc B. <mbe...@ho...> - 2000-09-06 22:00:36
|
(Vadim: please subscribe to catgen-developer and catgen-announce from = http://sourceforge.net/projects/catgen) Because a lot of the dynamic pages (*.jsp) are shared between client and = server, in particular the company homepage, all development will take = place in catgen environment (not catgen-server). Repeat: we will NOT be = working in catgen-server for development (I will change instructions). = It is possible during testing to change the environment by changing = catgen/catgenapp/web-inf/pool.properties. (ie copy pool.server to = pool.properties). Because certain code will be different, there is a = new "Object isServer" that is read by AppInit servlet from = pool.properties and put into servletContext. This will be set in header = code, and any code that needs to be conditional on running on server (or = client) will test as follow: if(isServer=3D=3Dnull) { //client code }else{ //server code } The code that is shared is particularly all the "company homepage" code = as follows: company_home.jsp Company home page show_company.jsp detailed company listing=20 show_producer =20 show_producer2 ??? show_product full product listing (one product) list_product product listing (many products, destination = of search_product.jsp) show_story full story listing search_product (server only, search products across all companies) Since all these forms are part of company homepage and are shared by = client and server, they need to be moved into=20 catgen/catgenapp/homepage directory (I have created this directory, but = I think you need a "cvs co catgen" to make it happen on oyour machine). Alexey, Eugene: please do this first thing tomorrow morning when you get = in (move these files). Also "list_product" should be called = "search_product", we need a separate list_product which is the listing = of products that meet search criteria. Once this is done we can start to work on company homepage. There is currently some problem in LWS that it does not call AppInit at = startup, meaning isServer is always null. This will probably work when = catgen/cagenapp directory is run as a web context from Tomcat (which is = the catgen server development environment) so this is probably not a = problem. Marc. |