Re: how to convert struts based apps from tomcat4 to tomcat5.5?
2009/5/30 Christopher Schultz ch...@christopherschultz.net: So, bean:define is basically calling news.getAbstr() (or news.getTitle()) and it is returning null, which throws an error. I suspect that either your news object is null, or the title or abstract of the news item is null. My guess is that 'news' is null. Maybe you mistyped news as nzews? logic:iterate scope=request id=nzews name=limitNewsList length=2 offset=0 ?? we did this on purpose, to watch the tomcat versions behaviour. Anyway we solved the problem! as Caldarale, Charles R said it seems that Your code may be dependent on a bug in 4.1 that was fixed in later Tomcat levels, indeed with version 5.5 and 6.0 tomcat throws an error. Then we traced down the code, and we found that abst was actually declared as abstract. Now it works. thank you! -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Centos 5 OS not releasing memory Tomcat6
2009/5/28 André Warnier a...@ice-sa.com: If a non-existent process is able to hold on to some memory and not return it to the OS, doesn't that indicate an OS problem ? i think so! but i do not remeber any kernel problem related to memory caching in Centos kernel releases. Maybe you should give a try at Centos 5.3 kernels. -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to convert struts based apps from tomcat4 to tomcat5.5?
2009/5/28 Christopher Schultz ch...@christopherschultz.net: May I put the code here? (i think it's very little and simple to read) Sure. Post what you've got and we'll take a look. !--BEGIN CODE %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % %...@page import=java.util.*% %...@page import=net.our.util.*% %...@page import=net.our.content.bean.*% script language=JavaScript1.2 src=js/scroller/JSFX_Layer.js/script script language=JavaScript1.2 src=js/scroller/JSFX_VerticalScroller.js/script script language=JavaScript1.2 var myScroller = new JSFX.VerticalScroller(); myScroller.setStyle(font-family: Verdana, Arial, Helvetica, sans-serif;); myScroller.setShowTime(3); % java.util.ArrayList limitNewsList = null; java.sql.Connection conn = null; try{ javax.sql.DataSource dataSource = DatabaseUtil.getDataSource( application, request); conn = dataSource.getConnection(); String lang_iso = request.getLocale().getISO3Language(); if( null == lang_iso || lang_iso.length()==0 ){ lang_iso = Constants.DEFAULT_LANG; } if (null != conn) { limitNewsList = net.our.content.dao.ContentDAO.getLimitedContent(conn, 6, lang_iso,news); System.out.println( !-- debug: news found + limitNewsList.size() + -- ); System.out.println( show news:; + limitNewsList + ); //this is working! i can see the arraylist populated } //conn.close(); } catch ( java.sql.SQLException sqle ){ throw new java.sql.SQLException(sqle.getMessage()); } finally{ if (conn!=null) conn.close(); } // if the next line is commented, then the page is shown in he right way! request.setAttribute(limitNewsList , limitNewsList ); % logic:empty name=limitNewsList myScroller.addMessage(Prossimamente news); /logic:empty logic:notEmpty name=limitNewsList //the problem should be in the bean:define myScroller.addMessage('logic:iterate scope=request id=nzews name=limitNewsList length=2 offset=0b#187;/bbean:define id=abst name=news property=abstr /bean:define id=title name=news property=title/html:link action=/newsDetail paramId=id paramName=news paramProperty=idfont color=#A9%= ((String)title).replaceAll(\', #146;) %/font/html:linkbrhtml:link action=/newsDetail paramId=id paramName=news paramProperty=id%= StringUtil.getFirstNChar( (String)abst, 30 ).replaceAll(\', #146;) %/html:linkspan style=font-size:4px;brbr/span/logic:iterate'); /script I SKIP THE REST OF THE CODE-- the error from catalina.out is: ERROR [TP-Processor40] - Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Define tag cannot set a null value at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) etc. etc. if i comment this line request.setAttribute(limitNewsList , limitNewsList );, the page is shown without errors. -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to convert struts based apps from tomcat4 to tomcat5.5?
2009/5/29 Maurizio Rottin maurizio.rot...@gmail.com: 2009/5/28 Christopher Schultz ch...@christopherschultz.net: logic:empty name=limitNewsList myScroller.addMessage(Prossimamente news); /logic:empty logic:notEmpty name=limitNewsList //the problem should be in the bean:define myScroller.addMessage('logic:iterate scope=request id=nzews name=limitNewsList length=2 offset=0b#187;/bbean:define id=abst name=news property=abstr /bean:define id=title name=news property=title/html:link action=/newsDetail paramId=id paramName=news paramProperty=idfont color=#A9%= ((String)title).replaceAll(\', #146;) %/font/html:linkbrhtml:link action=/newsDetail paramId=id paramName=news paramProperty=id%= StringUtil.getFirstNChar( (String)abst, 30 ).replaceAll(\', #146;) %/html:linkspan style=font-size:4px;brbr/span/logic:iterate'); /script I SKIP THE REST OF THE CODE-- the error from catalina.out is: ERROR [TP-Processor40] - Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Define tag cannot set a null value at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) etc. etc. we have isolated the item with the wrong scope: javax.servlet.jsp.JspException: Cannot find bean news in any scope but still...why? -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how to convert struts based apps from tomcat4 to tomcat5.5?
Hi all, i am in the process to move an application from tomcat 4.1.29(source from tomcat website) to tomcat 5.5.23 with struts 1.2.9 from redhat. It seems that everything works but one single page so far. the error from catalina.out is: ERROR [TP-Processor40] - Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Define tag cannot set a null value at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) etc. etc. It should be something about the scope, but we do not understand why now it works this way! Said in an other way, this error should not be raised according to the struts documentation on-line. Since we do not understand why this is not working properly, we are wondering if: a) is there a way to migrate the application from tomcat4.1.29 to 5.5.23 without modifing our (.java and .jsp) packages? b) if not, what are the changes in the struts framework between the two STRUTS versions? Or at least, may you point us to the right documentation? (I really can't find it!) Thank you in advance, -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Centos 5 OS not releasing memory Tomcat6
2009/5/28 msweeney whiterockbi...@gmail.com: Tomcat version 6 Apache 2.2.3 Centos 5.2 VMware 2.5 2 VPU's 4G Memory Guest Memory usage is on a avg 122 MB and Host Memory is at 3.31 G so we know it's not the balloon driver. Problem statement: I understand as a SysAdmin that the JVM loves to grab all the memory resources as it can, sort of like Oracle. However when we stop and then attempt to restart Tomcat it fails and the server needs to be restarted. Also it seems that this memory is being held in the Linux Cache system and to release it we run the following: echo 3 /proc/sys/vm/drop_caches tomcat6 is not included in Centos, then i assume you take source file from apache tomcat website. If this is the case, when you stop tomcat, then you have to kill the process. try a ps -ef | grep j and you will probably see that java is still running. if you are succesful in killing the process, then try to start tomcat. -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to convert struts based apps from tomcat4 to tomcat5.5?
2009/5/28 Caldarale, Charles R chuck.caldar...@unisys.com: From: Maurizio Rottin [mailto:maurizio.rot...@gmail.com] Subject: how to convert struts based apps from tomcat4 to tomcat5.5? the error from catalina.out is: ERROR [TP-Processor40] - Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Define tag cannot set a null value at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) etc. etc. Your code may be dependent on a bug in 4.1 that was fixed in later Tomcat levels. There are a set of system properties you can adjust to change the 5.5 behavior to be the same as in 4.1, and you might need to experiment with those: http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html In particular, look at the ones in the Jasper section. ok, i'll read it soon! Also, Tomcat 6 implemented several more Jasper-related properties that might be pertinent (hard to tell without seeing your code). Since you're upgrading, why not move to Tomcat 6.0? It's noticeably better in many ways than 5.5. I use centos5.3 and I am not a tomcat expert. Then i found easy to install tomcat rpm's incuded in Centos distribution (which ships tomcat 5.5.23). Anyway i remember that is pretty easy to install tomcat, maybe just untar the package, then maybe i'll give it a try! thank you, -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to convert struts based apps from tomcat4 to tomcat5.5?
2009/5/28 Caldarale, Charles R chuck.caldar...@unisys.com: Your code may be dependent on a bug in 4.1 that was fixed in later Tomcat levels. this can be the error! but i don't know if this is the right mailinglist to post the code that generate the error! May I put the code here? (i think it's very little and simple to read) There are a set of system properties you can adjust to change the 5.5 behavior to be the same as in 4.1, and you might need to experiment with those: http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html In particular, look at the ones in the Jasper section. i can't find where those are in the old tomcat installation, but the specific problem should be a programming error. Anyway i'll continue my search. thanks, -- mr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org