Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
(OP)
Hi,
I am wondering if someone could assist me with trying to figure out what's wrong with my web application.
The current live application is on Java 5 with Tomcat 5.5.29. It also uses YUI 2.6.0 and JCIFs for authentication.
I have upgraded on a virtual machine to Java 7 and Tomcat 7.0.50. I have tried to follow the migration documents on Tomcat, though this is not my field of expertise so I may not have fully understood parts of it.
I have removed the JCIFs implementation from the web.xml file and now use JNDI basic authentication against LDAP.
I have managed to get my web app to load and allow me access through the LDAP check it does. I then tell the web app to find an order, which should bring up the order page. This page uses the YUI implementation to display tabs (some tabs have sub tabs on them). On the upgraded web application, when I run it, it doesn't populate the information on the tabs. You can see the tabs, but that's it, it collapses the tabs.
I can't seem to attach a word file to this to show you the screenshots of how it looks and how it should look. Let me know if you want me to directly email you the screenshots.
Is it that something's fundamentally changed between the versions of either/both Java and Tomcat? I have tried to debug using the F12 Developer Tools, but I cannot see what's wrong. Oh btw, this is in IE9. The web app only works with IE, no other browser.
Here's the Javascript that builds the tabs up:
Here the html code of where it should go:
Please let me know if there is further information you require.
Thanks
Seema
I am wondering if someone could assist me with trying to figure out what's wrong with my web application.
The current live application is on Java 5 with Tomcat 5.5.29. It also uses YUI 2.6.0 and JCIFs for authentication.
I have upgraded on a virtual machine to Java 7 and Tomcat 7.0.50. I have tried to follow the migration documents on Tomcat, though this is not my field of expertise so I may not have fully understood parts of it.
I have removed the JCIFs implementation from the web.xml file and now use JNDI basic authentication against LDAP.
I have managed to get my web app to load and allow me access through the LDAP check it does. I then tell the web app to find an order, which should bring up the order page. This page uses the YUI implementation to display tabs (some tabs have sub tabs on them). On the upgraded web application, when I run it, it doesn't populate the information on the tabs. You can see the tabs, but that's it, it collapses the tabs.
I can't seem to attach a word file to this to show you the screenshots of how it looks and how it should look. Let me know if you want me to directly email you the screenshots.
Is it that something's fundamentally changed between the versions of either/both Java and Tomcat? I have tried to debug using the F12 Developer Tools, but I cannot see what's wrong. Oh btw, this is in IE9. The web app only works with IE, no other browser.
Here's the Javascript that builds the tabs up:
CODE --> Javascript
function YUILoaderSuccess() { //when TabView is loaded, instantiate opportunityViewTabs: var opportunityViewTabs = new YAHOO.widget.TabView('opportunityViewTabs'); tab = new YAHOO.widget.Tab({ label: 'Forecast Details' ,dataSrc: 'includes/tab_forecasttabs.jsp' ,cacheData: true }); opportunityViewTabs.addTab(tab); //when TabView is loaded, instantiate forecastTabs: var forecastTabs = new YAHOO.widget.TabView('forecastTabs'); var forecastSubTabId = ${obTabIndex2}; if (forecastSubTabId > 2) { forecastSubTabId = 0; } tab = new YAHOO.widget.Tab({ label: 'Summary' ,dataSrc: 'includes/tab_forecastsummary.jsp' ,cacheData: true }); forecastTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Progress Notes' ,dataSrc: 'includes/tab_progressnotes.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderProgressNotes();}); forecastTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'System Notes' ,dataSrc: 'includes/tab_systemnotes.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderSystemNotes();}); forecastTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Supporting Documentation' ,dataSrc: 'includes/tab_supdocs.jsp' ,cacheData: true }); forecastTabs.addTab(tab); forecastTabs.set("activeIndex", forecastSubTabId); tab = new YAHOO.widget.Tab({ label: 'Customer Details' ,dataSrc: 'includes/tab_customertabs.jsp' ,cacheData: true }); opportunityViewTabs.addTab(tab); //when TabView is loaded, instantiate ContactsTabs: var customerTabs = new YAHOO.widget.TabView('customerTabs'); var customerSubTabId = ${obTabIndex2}; if (customerSubTabId > 3) { customerSubTabId = 0; } tab = new YAHOO.widget.Tab({ label: 'Registered Office' ,dataSrc: 'includes/tab_registeredoffice.jsp' ,cacheData: true }); customerTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Contacts (Commercial)' ,dataSrc: 'includes/tab_contactscom.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderContactsCom();}); customerTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Contacts (Operational)' ,dataSrc: 'includes/tab_contactsops.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderContactsOps();}); customerTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Installations Sites' ,dataSrc: 'includes/tab_installsites.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderSites();}); customerTabs.addTab(tab); customerTabs.set("activeIndex", customerSubTabId); <c:if test="${orderBean.enableServices||fn:contains(fn:toLowerCase(orderBean.orderStatus),'short-listed')||fn:contains(fn:toLowerCase(orderBean.orderStatus),'order')}"> tab = new YAHOO.widget.Tab({ label: 'Default Settings' ,dataSrc: 'includes/tab_defaultsettings.jsp' ,cacheData: true ,active: true }); opportunityViewTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Services' ,dataSrc: 'includes/tab_services.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderServicesAddedToOrder();}); opportunityViewTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Payment Terms' ,dataSrc: 'includes/tab_paymentterms_order.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderRevenueSummary();}); opportunityViewTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Special Conditions' ,dataSrc: 'includes/tab_specialconditions.jsp' ,cacheData: true }); opportunityViewTabs.addTab(tab); tab = new YAHOO.widget.Tab({ label: 'Declarations' ,dataSrc: 'includes/tab_declarations.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderDeclarationsAddedToOrder();}); opportunityViewTabs.addTab(tab); <c:if test="${!empty orderBean.versionsList}"> tab = new YAHOO.widget.Tab({ label: 'Versions' ,dataSrc: 'includes/tab_versions.jsp' ,cacheData: true }); tab.addListener("dataLoadedChange", function() {renderVersions();}); opportunityViewTabs.addTab(tab); </c:if> </c:if> opportunityViewTabs.set("activeIndex", ${obTabIndex1}); }
Here the html code of where it should go:
CODE --> html
<div class="yui-skin-xxx"> <div id="opportunityViewTabs" class="yui-navset"> </div>
Please let me know if there is further information you require.
Thanks
Seema
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
Cheers,
Dian
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
CODE -->
I've tried setting Watch on opportunityViewTabs and forecastTabs, but I'm not 100% sure on what I'm doing and/or looking for.
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
Cheers,
Dian
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
CODE -->
but neither are showing data on there. I'm not sure if the sub-tabs are being delivered on there (though they should do, as I have not changed any of the code and how it works from the live version (which does work). How would I check to see if it is delivered to Tomcat? Sorry if this is meant to be obvious, but my knowledge of Tomcat is limited.
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
http://serverIP:port/whatever/myApp/includes/tab_d...
If that's not showing data, the problem is in the JSP
Cheers,
Dian
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
It seems like when they're sub-tabs, they don't work. How can it stop working just from upgrading the Java and Tomcat?
Any ideas on how to debug to find out where's it's falling over (if it is)?
Thanks
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
Said that, I get your applicacion involves client and server processing. You said you were familiar with IE debugging tools, so I would recommend use them to check if the page, once load, contains the information of subtabs and just refuse tho show it or not.
If the info is there, the problem will be on the client part. If not, I'd try to identify the JSP calls that are not returning data. You said those two are being correct but, what about the requests that should load the subtabs part? Are they being devilevered? If so, are they returning data?
I get you still have the original app up and running so another option would be to compare both outputs (generated HTML and HTTP requests)
Cheers,
Dian
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
In the Developer Tools in IE, on the Network tab I captured what I was doing. I did this on both live and my test to compare the 2.
I don't know how much difference this makes but on my test I noticed under the Response Headers that Cache-Control value was set to Private. On the live output it had 2 values for Cache-Control, which are "no-cache" and "no-store". Then Pragma is set to "no-cache" on live as well, but it doesn't exist on my test version.
So I looked on the internet and found that you can set these values in the web.xml file (as shown at http://www.royrusso.com/2011/02/22/cache-control-w...). I have now set the init-param to the below:
CODE --> xml
And I also saw on the internet (at http://daveharris.wordpress.com/2007/07/09/how-to-...) to set the valve in the context.xml as:
CODE --> xml
So going back to the Network output in the Developer Tools, looking at the URL /myapp/includes/tab_defaultsettings.jsp, the Type is blank on test with a http result of 302, but on live it says "text/html" with a http result of 200. Looking at the Detailed View at the Response Headers tab, test says:
CODE -->
The live Detailed View says:
CODE -->
Note that the 2 above have slightly different information. Is this anything to do with it? Should I be able to see what's wrong from this?
Please let me know what I'm missing
Thanks
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
Btw, I see a .do that reminds me a Struts application. What is your applicacion using (Spring, Struts, Servel, JSP)? Did you try putting the log level to debug to see if something came up?
Cheers,
Dian
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
It is a struts, servlet, jsp, java application.
In the web.xml file I have:
CODE --> xml
Should I be setting the values differently? I haven't changed any of these values, they are the same as the live application.
Thanks
Seema
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
CODE --> xml
It shouldn't have contained the *.jsp url pattern. This was causing the request filter (doFilter function) to process .jsp pages.
I have removed this and it all works now. Thanks for your help Dian.
Seema
RE: Web Application (JSP, Servlets, Struts) Issue - Java & Tomcat Upgrade
Cheers,
Dian