i had got an when i upload to resing server,
Code:
====
Count.jsp
-----
Integer applicationCount = (Integer)application.getAttribute
("applicationCount");
if (applicationCount == null) {
applicationCount = new Integer(1);
} else {
applicationCount= new Integer(applicationCount.intValue()
+ 1);
}
application.setAttribute("applicationCount",
applicationCount);
if(applicationCount==1){
out.print(applicationCount);
}else{
out.print(applicationCount);
}
if i run these code i got an exception that in resin server
500 Servlet Exception
Note: sun.tools.javac.Main has been deprecated.
/adac1/p1/count6.jsp:20: Incompatible type for java.lang.Integer.
Can't
convert java.lang.Integer to int.
if(applicationCount==1){
^
1 error, 1 warning
my version for resin is
Resin 2.1.13
===================
but its work for me in local server
i use apache tomcat 6.0 & jdk 1.6
help me
> sun.tools.javac.Main has been deprecated.
For the proper way to invoke the Java compiler see
http://mindprod.com/jgloss/javacompiler.html
http://mindprod.com/jgloss/onthefly.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
The future has already happened, it just isn�t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 61)
> if(applicationCount==1){
For this to work, you need auto-unboxing. That was introduced with JDK
1.5. Are you compiling to an earlier version?