Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help me

1 view
Skip to first unread message

shahul

unread,
Dec 15, 2009, 2:39:01 AM12/15/09
to
hai friends,
i am new to Resin Server

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

Roedy Green

unread,
Dec 16, 2009, 6:35:07 AM12/16/09
to
On Mon, 14 Dec 2009 23:39:01 -0800 (PST), shahul
<shahuli...@gmail.com> wrote, quoted or indirectly quoted someone
who said :

> 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)

Roedy Green

unread,
Dec 16, 2009, 6:53:04 AM12/16/09
to
On Mon, 14 Dec 2009 23:39:01 -0800 (PST), shahul
<shahuli...@gmail.com> wrote, quoted or indirectly quoted someone
who said :

> 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?

0 new messages