You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Girish Havaldar <ha...@gmail.com> on 2007/07/05 09:01:35 UTC
Tomcat Version problem
Hi,
we have an application developed using the following components as listed below
mysql 5.0.27
jdk 1.5.0_06
jre 1.5.0_06
tomcat 5.5.20
Apache 2
phpMyAdmin 2.9.2
Servlets 2.3
JSP 1.2
Our application is showing errors when deployed on tomcat 5.5.9(the
Hosting company is using Tomcat 5.5.9.)
so what is the solution.
Also plz send me info abt hosting comapny who can support the above
specification.
Thank you,
Girish S.Havaldar.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
Ha, that will teach you to use the latest and greatest template collections
;)
If you using Netbeans, just right click on the project and move the source
level down to 1.4... I think you going to find all your problems....
----- Original Message -----
From: "Girish Havaldar" <ha...@gmail.com>
To: <us...@tomcat.apache.org>
Sent: Thursday, July 05, 2007 9:37 AM
Subject: Re: Tomcat Version problem
> On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
>> Hi,
>>
>> we have an application developed using the following components as listed
> below
>>
>> mysql 5.0.27
>> jdk 1.5.0_06
>> jre 1.5.0_06
>> tomcat 5.5.20
>> Apache 2
>> phpMyAdmin 2.9.2
>> Servlets 2.3
>> JSP 1.2
>>
>> Our application is showing errors when deployed on tomcat 5.5.9(the
>> Hosting company is using Tomcat 5.5.9.)
> ERROR:
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable for
> the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> DefaultErrorHandler.java:84)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(
> ErrorDispatcher.java:328)
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> :397)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> org.apache.jasper.JspCompilationContext.compile(
> JspCompilationContext.java:556)
> org.apache.jasper.servlet.JspServletWrapper.service(
> JspServletWrapper.java:293)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/5.5.9 logs.
>
>
>> so what is the solution.
>> Also plz send me info abt hosting comapny who can support the above
>> specification.
>>
>>
>> Thank you,
>>
>> Girish S.Havaldar.
>>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Girish Havaldar <ha...@gmail.com>.
Thank you for your suggestion, i am new to this group, next time i'll
this in mind
GS
On 06/07/07, hanasaki <ha...@hanaden.com> wrote:
> What do you mean "v r"? Please do not post shortcut English ;)
>
> When you get things working... Please post the solution to the problem
> so we can all learn.
>
> Girish Havaldar wrote:
> > Thnks for the resplone, now v r doing that only
> >
> > GS.
> >
> > On 06/07/07, hanasaki <ha...@hanaden.com> wrote:
> >> Did you per-complile the JPS's? - don't - in this case
> >> Ensure the jsp version you coded against is the same as that supported
> >> by the hosting company.
> >>
> >> Jon Wingfield wrote:
> >> > You are using jdk1.5 features (autoboxing, for example ) in your JSP
> >> pages.
> >> > Early versions of the 5.5 tree bundled a jsp compiler (JDT) which
> >> didn't
> >> > support these new language features.
> >> > Later versions bundled an updated version of the compiler...
> >> > For deploying on 5.5.9 just get rid of your autoboxing:
> >> >
> >> > int thing = 4;
> >> > request.setAttribute("stuff", new Integer(thing));
> >> >
> >> > instead of
> >> >
> >> > request.setAttribute("stuff", thing);
> >> >
> >> > Regards,
> >> >
> >> > Jon
> >> >
> >> > Girish Havaldar wrote:
> >> >> On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
> >> >>> Hi,
> >> >>>
> >> >>> we have an application developed using the following components as
> >> >>> listed
> >> >> below
> >> >>>
> >> >>> mysql 5.0.27
> >> >>> jdk 1.5.0_06
> >> >>> jre 1.5.0_06
> >> >>> tomcat 5.5.20
> >> >>> Apache 2
> >> >>> phpMyAdmin 2.9.2
> >> >>> Servlets 2.3
> >> >>> JSP 1.2
> >> >>>
> >> >>> Our application is showing errors when deployed on tomcat 5.5.9(the
> >> >>> Hosting company is using Tomcat 5.5.9.)
> >> >> ERROR:
> >> >> type Exception report
> >> >>
> >> >> message
> >> >>
> >> >> description The server encountered an internal error () that
> >> prevented it
> >> >> from fulfilling this request.
> >> >>
> >> >> exception
> >> >>
> >> >> org.apache.jasper.JasperException: Unable to compile class for JSP
> >> >>
> >> >> An error occurred at line: 67 in the jsp file: /classification.jsp
> >> >> Generated servlet error:
> >> >> Type mismatch: cannot convert from Integer to int
> >> >>
> >> >> An error occurred at line: 67 in the jsp file: /classification.jsp
> >> >> Generated servlet error:
> >> >> The method add(int, Object) in the type ArrayList is not applicable
> >> >> for the
> >> >> arguments (int)
> >> >>
> >> >> An error occurred at line: 226 in the jsp file: /classification.jsp
> >> >> Generated servlet error:
> >> >> The method setAttribute(String, Object) in the type ServletRequest
> >> is not
> >> >> applicable for the arguments (String, int)
> >> >>
> >> >> An error occurred at line: 263 in the jsp file: /classification.jsp
> >> >> Generated servlet error:
> >> >> The method setAttribute(String, Object) in the type ServletRequest
> >> is not
> >> >> applicable for the arguments (String, int)
> >> >>
> >> >>
> >> >> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> >> >> DefaultErrorHandler.java:84)
> >> >> org.apache.jasper.compiler.ErrorDispatcher.javacError(
> >> >> ErrorDispatcher.java:328)
> >> >>
> >> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> >> >> :397)
> >> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> >> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> >> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> >> >> org.apache.jasper.JspCompilationContext.compile(
> >> >> JspCompilationContext.java:556)
> >> >> org.apache.jasper.servlet.JspServletWrapper.service(
> >> >> JspServletWrapper.java:293)
> >> >>
> >> >>
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> >> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> >> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> >>
> >> >> note The full stack trace of the root cause is available in the Apache
> >> >> Tomcat/5.5.9 logs.
> >> >>
> >> >>
> >> >>> so what is the solution.
> >> >>> Also plz send me info abt hosting comapny who can support the above
> >> >>> specification.
> >> >>>
> >> >>>
> >> >>> Thank you,
> >> >>>
> >> >>> Girish S.Havaldar.
> >> >>>
> >> >>
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To start a new topic, e-mail: users@tomcat.apache.org
> >> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> > For additional commands, e-mail: users-help@tomcat.apache.org
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Hanasaki,
hanasaki wrote:
> When you get things working... Please post the solution to the problem
> so we can all learn.
I believe the solution was already posted by Jon Wingfield on 2007-07-05
at 06:09:
> You are using jdk1.5 features (autoboxing, for example ) in your JSP
> pages. Early versions of the 5.5 tree bundled a jsp compiler (JDT)
> which didn't support these new language features. Later versions
> bundled an updated version of the compiler...
So, the solution is to either remove your use of autoboxing, or upgrade
to a later version of Tomcat.
-chris
Re: Tomcat Version problem
Posted by hanasaki <ha...@hanaden.com>.
What do you mean "v r"? Please do not post shortcut English ;)
When you get things working... Please post the solution to the problem
so we can all learn.
Girish Havaldar wrote:
> Thnks for the resplone, now v r doing that only
>
> GS.
>
> On 06/07/07, hanasaki <ha...@hanaden.com> wrote:
>> Did you per-complile the JPS's? - don't - in this case
>> Ensure the jsp version you coded against is the same as that supported
>> by the hosting company.
>>
>> Jon Wingfield wrote:
>> > You are using jdk1.5 features (autoboxing, for example ) in your JSP
>> pages.
>> > Early versions of the 5.5 tree bundled a jsp compiler (JDT) which
>> didn't
>> > support these new language features.
>> > Later versions bundled an updated version of the compiler...
>> > For deploying on 5.5.9 just get rid of your autoboxing:
>> >
>> > int thing = 4;
>> > request.setAttribute("stuff", new Integer(thing));
>> >
>> > instead of
>> >
>> > request.setAttribute("stuff", thing);
>> >
>> > Regards,
>> >
>> > Jon
>> >
>> > Girish Havaldar wrote:
>> >> On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
>> >>> Hi,
>> >>>
>> >>> we have an application developed using the following components as
>> >>> listed
>> >> below
>> >>>
>> >>> mysql 5.0.27
>> >>> jdk 1.5.0_06
>> >>> jre 1.5.0_06
>> >>> tomcat 5.5.20
>> >>> Apache 2
>> >>> phpMyAdmin 2.9.2
>> >>> Servlets 2.3
>> >>> JSP 1.2
>> >>>
>> >>> Our application is showing errors when deployed on tomcat 5.5.9(the
>> >>> Hosting company is using Tomcat 5.5.9.)
>> >> ERROR:
>> >> type Exception report
>> >>
>> >> message
>> >>
>> >> description The server encountered an internal error () that
>> prevented it
>> >> from fulfilling this request.
>> >>
>> >> exception
>> >>
>> >> org.apache.jasper.JasperException: Unable to compile class for JSP
>> >>
>> >> An error occurred at line: 67 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> Type mismatch: cannot convert from Integer to int
>> >>
>> >> An error occurred at line: 67 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method add(int, Object) in the type ArrayList is not applicable
>> >> for the
>> >> arguments (int)
>> >>
>> >> An error occurred at line: 226 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method setAttribute(String, Object) in the type ServletRequest
>> is not
>> >> applicable for the arguments (String, int)
>> >>
>> >> An error occurred at line: 263 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method setAttribute(String, Object) in the type ServletRequest
>> is not
>> >> applicable for the arguments (String, int)
>> >>
>> >>
>> >> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> >> DefaultErrorHandler.java:84)
>> >> org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> >> ErrorDispatcher.java:328)
>> >>
>> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> >> :397)
>> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>> >> org.apache.jasper.JspCompilationContext.compile(
>> >> JspCompilationContext.java:556)
>> >> org.apache.jasper.servlet.JspServletWrapper.service(
>> >> JspServletWrapper.java:293)
>> >>
>> >>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> >>
>> >> note The full stack trace of the root cause is available in the Apache
>> >> Tomcat/5.5.9 logs.
>> >>
>> >>
>> >>> so what is the solution.
>> >>> Also plz send me info abt hosting comapny who can support the above
>> >>> specification.
>> >>>
>> >>>
>> >>> Thank you,
>> >>>
>> >>> Girish S.Havaldar.
>> >>>
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail: users-help@tomcat.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Girish Havaldar <ha...@gmail.com>.
Thnks for the resplone, now v r doing that only
GS.
On 06/07/07, hanasaki <ha...@hanaden.com> wrote:
> Did you per-complile the JPS's? - don't - in this case
> Ensure the jsp version you coded against is the same as that supported
> by the hosting company.
>
> Jon Wingfield wrote:
> > You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
> > Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't
> > support these new language features.
> > Later versions bundled an updated version of the compiler...
> > For deploying on 5.5.9 just get rid of your autoboxing:
> >
> > int thing = 4;
> > request.setAttribute("stuff", new Integer(thing));
> >
> > instead of
> >
> > request.setAttribute("stuff", thing);
> >
> > Regards,
> >
> > Jon
> >
> > Girish Havaldar wrote:
> >> On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
> >>> Hi,
> >>>
> >>> we have an application developed using the following components as
> >>> listed
> >> below
> >>>
> >>> mysql 5.0.27
> >>> jdk 1.5.0_06
> >>> jre 1.5.0_06
> >>> tomcat 5.5.20
> >>> Apache 2
> >>> phpMyAdmin 2.9.2
> >>> Servlets 2.3
> >>> JSP 1.2
> >>>
> >>> Our application is showing errors when deployed on tomcat 5.5.9(the
> >>> Hosting company is using Tomcat 5.5.9.)
> >> ERROR:
> >> type Exception report
> >>
> >> message
> >>
> >> description The server encountered an internal error () that prevented it
> >> from fulfilling this request.
> >>
> >> exception
> >>
> >> org.apache.jasper.JasperException: Unable to compile class for JSP
> >>
> >> An error occurred at line: 67 in the jsp file: /classification.jsp
> >> Generated servlet error:
> >> Type mismatch: cannot convert from Integer to int
> >>
> >> An error occurred at line: 67 in the jsp file: /classification.jsp
> >> Generated servlet error:
> >> The method add(int, Object) in the type ArrayList is not applicable
> >> for the
> >> arguments (int)
> >>
> >> An error occurred at line: 226 in the jsp file: /classification.jsp
> >> Generated servlet error:
> >> The method setAttribute(String, Object) in the type ServletRequest is not
> >> applicable for the arguments (String, int)
> >>
> >> An error occurred at line: 263 in the jsp file: /classification.jsp
> >> Generated servlet error:
> >> The method setAttribute(String, Object) in the type ServletRequest is not
> >> applicable for the arguments (String, int)
> >>
> >>
> >> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> >> DefaultErrorHandler.java:84)
> >> org.apache.jasper.compiler.ErrorDispatcher.javacError(
> >> ErrorDispatcher.java:328)
> >> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> >> :397)
> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> >> org.apache.jasper.JspCompilationContext.compile(
> >> JspCompilationContext.java:556)
> >> org.apache.jasper.servlet.JspServletWrapper.service(
> >> JspServletWrapper.java:293)
> >>
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>
> >> note The full stack trace of the root cause is available in the Apache
> >> Tomcat/5.5.9 logs.
> >>
> >>
> >>> so what is the solution.
> >>> Also plz send me info abt hosting comapny who can support the above
> >>> specification.
> >>>
> >>>
> >>> Thank you,
> >>>
> >>> Girish S.Havaldar.
> >>>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by hanasaki <ha...@hanaden.com>.
Did you per-complile the JPS's? - don't - in this case
Ensure the jsp version you coded against is the same as that supported
by the hosting company.
Jon Wingfield wrote:
> You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
> Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't
> support these new language features.
> Later versions bundled an updated version of the compiler...
> For deploying on 5.5.9 just get rid of your autoboxing:
>
> int thing = 4;
> request.setAttribute("stuff", new Integer(thing));
>
> instead of
>
> request.setAttribute("stuff", thing);
>
> Regards,
>
> Jon
>
> Girish Havaldar wrote:
>> On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
>>> Hi,
>>>
>>> we have an application developed using the following components as
>>> listed
>> below
>>>
>>> mysql 5.0.27
>>> jdk 1.5.0_06
>>> jre 1.5.0_06
>>> tomcat 5.5.20
>>> Apache 2
>>> phpMyAdmin 2.9.2
>>> Servlets 2.3
>>> JSP 1.2
>>>
>>> Our application is showing errors when deployed on tomcat 5.5.9(the
>>> Hosting company is using Tomcat 5.5.9.)
>> ERROR:
>> type Exception report
>>
>> message
>>
>> description The server encountered an internal error () that prevented it
>> from fulfilling this request.
>>
>> exception
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> Type mismatch: cannot convert from Integer to int
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method add(int, Object) in the type ArrayList is not applicable
>> for the
>> arguments (int)
>>
>> An error occurred at line: 226 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is not
>> applicable for the arguments (String, int)
>>
>> An error occurred at line: 263 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is not
>> applicable for the arguments (String, int)
>>
>>
>> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> DefaultErrorHandler.java:84)
>> org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> ErrorDispatcher.java:328)
>> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> :397)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>> org.apache.jasper.JspCompilationContext.compile(
>> JspCompilationContext.java:556)
>> org.apache.jasper.servlet.JspServletWrapper.service(
>> JspServletWrapper.java:293)
>>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>> note The full stack trace of the root cause is available in the Apache
>> Tomcat/5.5.9 logs.
>>
>>
>>> so what is the solution.
>>> Also plz send me info abt hosting comapny who can support the above
>>> specification.
>>>
>>>
>>> Thank you,
>>>
>>> Girish S.Havaldar.
>>>
>>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Jon Wingfield <jo...@mkodo.com>.
You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't
support these new language features.
Later versions bundled an updated version of the compiler...
For deploying on 5.5.9 just get rid of your autoboxing:
int thing = 4;
request.setAttribute("stuff", new Integer(thing));
instead of
request.setAttribute("stuff", thing);
Regards,
Jon
Girish Havaldar wrote:
> On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
>> Hi,
>>
>> we have an application developed using the following components as
>> listed
> below
>>
>> mysql 5.0.27
>> jdk 1.5.0_06
>> jre 1.5.0_06
>> tomcat 5.5.20
>> Apache 2
>> phpMyAdmin 2.9.2
>> Servlets 2.3
>> JSP 1.2
>>
>> Our application is showing errors when deployed on tomcat 5.5.9(the
>> Hosting company is using Tomcat 5.5.9.)
> ERROR:
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable
> for the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> DefaultErrorHandler.java:84)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(
> ErrorDispatcher.java:328)
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> :397)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> org.apache.jasper.JspCompilationContext.compile(
> JspCompilationContext.java:556)
> org.apache.jasper.servlet.JspServletWrapper.service(
> JspServletWrapper.java:293)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/5.5.9 logs.
>
>
>> so what is the solution.
>> Also plz send me info abt hosting comapny who can support the above
>> specification.
>>
>>
>> Thank you,
>>
>> Girish S.Havaldar.
>>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Girish Havaldar <ha...@gmail.com>.
wht i think is a version problem,
how to check versions of servlets,jsp,
how 'll come to kn which version v r using
On 05/07/07, Peng Tuck Kwok <pe...@gmail.com> wrote:
>
> I have no idea where your line numbers are but the jsp compiler is already
> asking you to look at 67, 223, 226 in your JSP. Possibly you get cast
> exceptions because whatever you are trying to cast to isn't cast-able or
> converted. Also please double check the types of the objects you are
> passing
> into the methods, the compiler seems to be complaining about it.
>
>
> On 7/5/07, Girish Havaldar <ha...@gmail.com> wrote:
> >
> > ths is the jsp page:
> >
> >
> > <%@page import="java.sql.*,java.util.*,logcheck.settings" errorPage="
> > errorpage.jsp"%>
> > <html>
> > <head>
> > <title> classification</title> </head>
> > <script type="text/javascript" src="dropdown.js"></script>
> > <body bgcolor="#FFFFFF" >
> > <LINK rel="stylesheet" href="style.css" type="text/css" />
> > <form action="classification.jsp" method="POST" name="classif"
> > onSubmit="return check()">
> > <%
> >
> > settings set=new settings();
> > int flag = 0;
> > flag = set.islogedin(request,response);
> > if(flag!=1){
> > out.println("<html><body><center><b>Your session is
> > invalidate..Press F5 or refresh it</b></center></body></html>");
> >
> > }
> > else if(session.isNew()){
> > out.println("<script language=javascript>
> > parent.location.href='expair.jsp';</script>");
> > }
> > else
> > {
> >
> > %>
> > <br>
> > <script language="javascript">
> > function check()
> > {
> > var id = document.getElementById("clname");
> > if(id.value ==''){
> > alert("Empty");
> > return false;
> > }
> > return true;
> > }
> >
> > function ses_check(url)
> > {
> > if(confirm("It will delete all the question coming under
> this
> > Classification !!!!! DO You Want to Proceed ????")){
> > document.location.href=url;
> >
> > }
> > }
> >
> >
> > function online(level,cid)
> > {
> >
> > document.location.href="online.jsp
> ?level="+level+"&CID="+cid+"&e_type=1";
> >
> > }
> >
> > function written(level,cid)
> > {
> > document.location.href="wedastr.jsp
> > ?level="+level+"&CID="+cid+"&e_type=0";
> >
> > }
> > function onlineedit(level,cid)
> > {
> > document.location.href="mangquest.jsp
> > ?e_type=1&sel_level="+level+"&CID="+cid+"";
> > }
> >
> > function writtenedit(level,cid)
> > {
> > document.location.href="mangquest.jsp
> > ?sel_level="+level+"&CID="+cid+"&e_type=0"
> > ;
> > }
> >
> >
> > </script>
> >
> > <%
> > int userid=0;
> > if(session.getAttribute("uid")!=null){
> > userid=
> > Integer.valueOf(""+session.getAttribute("uid"));
> >
> > }
> > else {
> > out.println("<script language=javascript>
> > parent.location.href='expair.jsp';</script>");
> > }
> >
> > PreparedStatement stmt = null;
> > Connection conn= null;
> > ResultSet resultset=null;
> > ResultSet resultset1=null;
> > ResultSet result=null;
> > ResultSet res=null;
> > ResultSet resdel=null;
> > Statement statement=null;
> > Statement statement1=null;
> >
> > String subject=new String();
> > String class_name=new String();
> > String noqt=new String();
> >
> > conn=set.getcon();
> > String PID_str = request.getParameter("PID");
> > int PID=0;
> >
> > statement = conn.createStatement();
> > statement1 = conn.createStatement();
> >
> > String delete = request.getParameter("delete");
> >
> > if((request.getParameter("delete")!= null) && (
> > request.getParameter
> > ("delete").equals("yes")))
> > {
> > ResultSet rss=null;
> > int C_Id_todel = Integer.parseInt(
> > request.getParameter("CID"));
> > ArrayList tnoarr=new ArrayList();
> > ArrayList cidarr=new ArrayList();
> > if((request.getParameter("CID") != null)&&(userid !=
> 0))
> > {
> > cidarr.clear();
> > int avail=0;
> > rss=statement.executeQuery("select CID from
> > classification where PID="+C_Id_todel+" and UID="+userid+" ");
> > while(rss.next())
> > {
> > avail=1;
> > }
> > if(avail==1){
> > out.println("<script
> > language='javascript'>alert('NOT POSSIBLE!!!!it contains a sub
> > classification');</script>");
> > }
> > else{
> > rss=statement.executeQuery("select T_No from
> > questionbank where CID="+C_Id_todel+" ");
> > while(rss.next())
> > {
> > tnoarr.add(rss.getInt(1));
> > }
> > statement.execute("delete from
> classification
> > where CID="+C_Id_todel+" and UID="+userid+"");
> > for(int j=0;j<tnoarr.size();j++)
> > {
> > statement.execute("delete from
> > questionbank where T_No="+tnoarr.get(j)+" ");
> > statement.execute("delete from
> > options_table where T_No="+tnoarr.get(j)+" ");
> > }
> > }
> > }
> > }
> >
> >
> > if(PID_str == null)
> > {
> > PID=-1;
> > out.println("<input type=hidden name='PID'
> > value='"+PID+"'>");
> > }else{
> > PID = Integer.parseInt(PID_str);
> > out.println("<input type=hidden name='PID'
> > value='"+PID+"'>");
> > }
> > if(PID != -1){
> > ResultSet rs1=statement.executeQuery("select
> > PID,class_name,level_disp from classification where CID="+PID+"");
> > while(rs1.next())
> > {
> > subject=(rs1.getString(2));
> > String show_level=rs1.getString(3);
> > int back=rs1.getInt(1);
> >
> > out.println("<div align='left'><b
> > class='label'>Under the heirarchy of <font color=#FF0000> "+subject+"
> > </font> and Level <font color=#FF0000>"+show_level+" </font>
> > </div>");
> > out.println("<table
> > align=right><tr><td></td><td></td><td></td><td class='label'><a
> > href='http:
> > classification.jsp?PID="+back+"'
> > style=text-decoration:none><b> Back</b></a></td></tr>");
> >
> > }
> > }
> >
> >
> > %>
> >
> > <table align="center" ><tr><td ><b class="label">Add
> More
> > </b></td><td><input class="input" id='clname' type="text" name="ctype"
> > size="13" autocomplete=off></td>
> > <td><select class="normal" size="1" name="levels">
> >
> > <% result=statement.executeQuery("select * from
> level
> > ");
> > while(result.next())
> > {
> > out.println(" <option value="+result.getInt(1)+"
> > >"+result.getString(3)+"</option>");}%>
> >
> > </select></td><td><input class="butt" width="30"
> > type="submit" name="create" value="create"/> </td></tr></table>
> >
> >
> > <%
> >
> > int sel_level=0;
> > String dis_level=new String();
> >
> >
> > if(request.getParameter("levels") != null)
> > {
> > sel_level=Integer.parseInt(
> request.getParameter
> > ("levels"));
> > }
> > result=statement.executeQuery("select level_name
> > from level where levelID="+sel_level+" ");
> > if(result.next())
> > {
> > dis_level=result.getString(1);
> > }
> >
> > if((request.getParameter("create") != null) && (
> > request.getParameter("create").equals("create")))
> > {
> > int available=0;
> > String cltype=request.getParameter
> ("ctype");
> > int pd=Integer.parseInt(
> request.getParameter
> > ("PID"));
> > int levl=0;
> > if(request.getParameter("levels") != null)
> > {
> > levl=Integer.parseInt(
> request.getParameter
> > ("levels"));
> > }
> >
> > res=statement.executeQuery("select * from
> > classification where class_name='"+cltype+"' and level="+levl+"");
> > if(res.next())
> > {
> > available=1;
> > }
> > if(available==1){
> >
> > out.println("<script
> > language=javascript>alert('not possible,It have
> > Sub-Classification');</script>");
> > }
> > else
> > {
> >
> > stmt=conn.prepareStatement("INSERT INTO
> > classification(UID,class_name,PID,level,level_disp)values(?,?,?,?,?)");
> > String cctype=request.getParameter("ctype");
> > //cctype=cctype.replace("#","#");
> > stmt.setInt(1,userid);
> > stmt.setString(2,cctype);
> > stmt.setInt(3,PID);
> > stmt.setInt(4,sel_level);
> > stmt.setString(5,dis_level);
> >
> > stmt.executeUpdate();
> > stmt.close();
> > }
> >
> > }else{ }
> >
> > resultset=statement.executeQuery("select * from
> > classification where PID="+PID+" and UID="+userid+" ");
> > int i=1;
> > %>
> > <br><br><div align='center'><TABLE border='0'
> > align=top
> > ><TR class='head'><TH class='back'
> > >SrNo</TH><TH>Classification</TH><TH>Level</TH><TH width="120">Add
> > Question</TH><TH width="70">no.ofquest</TH><TH>Edit
> > Question</TH><th>Action</th></TR></B>
> >
> > <%
> > while(resultset.next())
> > {
> > String level=resultset.getString(6);
> > class_name=resultset.getString(3);
> >
> > String cctest=resultset.getString(3);
> > // String url= "classification.jsp
> > ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
> > int selected=resultset.getInt(5);
> > int cid=resultset.getInt(1);
> > request.setAttribute("c_id",cid);%>
> >
> >
> > <tr class="row"><td><%=i%></td><td><a
> class="one"
> > href='classification.jsp?PID=<%=resultset.getInt
> > (1)%>&backPID="+PID+"'><%=class_name%></a></td><td
> > class="one"><%=level%></td>
> >
> > <%out.println("<td>");
> > out.println("<a class='one' style='display:
> block;
> > border: 1px solid black;' href='#'
> > onClick=\"online('"+selected+"','"+cid+"')\">Online</a>");
> >
> > out.println("<a class='one' style='display: block;
> > border:
> > 1px solid black;' href='#settings'
> > onClick=\"written('"+selected+"','"+cid+"')\">Written</a>");
> > out.println("</td>");
> >
> >
> > resultset1=statement1.executeQuery("select count(*)
> from
> > questionbank where CID="+cid+"");
> > while(resultset1.next())
> > {
> > noqt=resultset1.getString(1);
> > }
> > out.println("<td align='center'>"+noqt+"</td>");
> >
> >
> > out.println("<td align='center'>");
> > out.println("<a class='one' style='display: block;
> > border: 1px solid black;' href='#'
> > onClick=\"onlineedit('"+selected+"','"+cid+"')\">Online</a>");
> > out.println("<a class='one' style='display: block;
> > border: 1px solid black;' href='#settings'
> > onClick=\"writtenedit('"+selected+"','"+cid+"')\">Written</a>");
> > out.println("</td>");
> > %>
> >
> > <%
> > String url= "classification.jsp
> > ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
> > %>
> > <td><a class="one" href='#delete'
> > onclick="ses_check('<%=url%>')">Delete</a></td>
> > <%
> > out.println("</tr>");
> > // out.println("<td><a class='one' href='#delete'
> > onclick='ses_check('+url+')'>Delete</a></td></tr>");
> > out.println("</td></tr>");
> > i++;
> > }
> > statement1.close();
> > statement.close();
> > conn.close();
> > request.setAttribute("level",sel_level);
> > %>
> > </div></TABLE >
> >
> > <% } %>
> > </p>
> > </form>
> > </body>
> > </html>
> >
> > This is the Exception error
> >
> > type Exception report
> >
> > message
> >
> > description The server encountered an internal error () that prevented
> it
> > from fulfilling this request.
> >
> > exception
> >
> > org.apache.jasper.JasperException: Unable to compile class for JSP
> >
> > An error occurred at line: 67 in the jsp file: /classification.jsp
> > Generated servlet error:
> > Type mismatch: cannot convert from Integer to int
> >
> > An error occurred at line: 67 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method add(int, Object) in the type ArrayList is not applicable for
> > the
> > arguments (int)
> >
> > An error occurred at line: 226 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method setAttribute(String, Object) in the type ServletRequest is
> not
> > applicable for the arguments (String, int)
> >
> > An error occurred at line: 263 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method setAttribute(String, Object) in the type ServletRequest is
> not
> > applicable for the arguments (String, int)
> >
> >
> > org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> > DefaultErrorHandler.java:84)
> > org.apache.jasper.compiler.ErrorDispatcher.javacError(
> > ErrorDispatcher.java:328)
> > org.apache.jasper.compiler.JDTCompiler.generateClass(
> JDTCompiler.java
> > :397)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> > org.apache.jasper.JspCompilationContext.compile(
> > JspCompilationContext.java:556)
> > org.apache.jasper.servlet.JspServletWrapper.service(
> > JspServletWrapper.java:293)
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> > :291)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >
> > note The full stack trace of the root cause is available in the Apache
> > Tomcat/5.5.9 logs.
> >
> > Our development Envrnment is
> >
> > mysql 5.0.27
> > jdk 1.5.0_06
> > jre 1.5.0_06
> > tomcat 5.5.20
> > Apache 2
> > phpMyAdmin 2.9.2
> > Servlets 2.3
> > JSP 1.2
> >
> > Our application is showing errors when deployed on tomcat 5.5.9(the
> > Hosting company is using Tomcat 5.5.9.)
> > so what is the solution.
> >
>
Re: Tomcat Version problem
Posted by Peng Tuck Kwok <pe...@gmail.com>.
I have no idea where your line numbers are but the jsp compiler is already
asking you to look at 67, 223, 226 in your JSP. Possibly you get cast
exceptions because whatever you are trying to cast to isn't cast-able or
converted. Also please double check the types of the objects you are passing
into the methods, the compiler seems to be complaining about it.
On 7/5/07, Girish Havaldar <ha...@gmail.com> wrote:
>
> ths is the jsp page:
>
>
> <%@page import="java.sql.*,java.util.*,logcheck.settings" errorPage="
> errorpage.jsp"%>
> <html>
> <head>
> <title> classification</title> </head>
> <script type="text/javascript" src="dropdown.js"></script>
> <body bgcolor="#FFFFFF" >
> <LINK rel="stylesheet" href="style.css" type="text/css" />
> <form action="classification.jsp" method="POST" name="classif"
> onSubmit="return check()">
> <%
>
> settings set=new settings();
> int flag = 0;
> flag = set.islogedin(request,response);
> if(flag!=1){
> out.println("<html><body><center><b>Your session is
> invalidate..Press F5 or refresh it</b></center></body></html>");
>
> }
> else if(session.isNew()){
> out.println("<script language=javascript>
> parent.location.href='expair.jsp';</script>");
> }
> else
> {
>
> %>
> <br>
> <script language="javascript">
> function check()
> {
> var id = document.getElementById("clname");
> if(id.value ==''){
> alert("Empty");
> return false;
> }
> return true;
> }
>
> function ses_check(url)
> {
> if(confirm("It will delete all the question coming under this
> Classification !!!!! DO You Want to Proceed ????")){
> document.location.href=url;
>
> }
> }
>
>
> function online(level,cid)
> {
>
> document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";
>
> }
>
> function written(level,cid)
> {
> document.location.href="wedastr.jsp
> ?level="+level+"&CID="+cid+"&e_type=0";
>
> }
> function onlineedit(level,cid)
> {
> document.location.href="mangquest.jsp
> ?e_type=1&sel_level="+level+"&CID="+cid+"";
> }
>
> function writtenedit(level,cid)
> {
> document.location.href="mangquest.jsp
> ?sel_level="+level+"&CID="+cid+"&e_type=0"
> ;
> }
>
>
> </script>
>
> <%
> int userid=0;
> if(session.getAttribute("uid")!=null){
> userid=
> Integer.valueOf(""+session.getAttribute("uid"));
>
> }
> else {
> out.println("<script language=javascript>
> parent.location.href='expair.jsp';</script>");
> }
>
> PreparedStatement stmt = null;
> Connection conn= null;
> ResultSet resultset=null;
> ResultSet resultset1=null;
> ResultSet result=null;
> ResultSet res=null;
> ResultSet resdel=null;
> Statement statement=null;
> Statement statement1=null;
>
> String subject=new String();
> String class_name=new String();
> String noqt=new String();
>
> conn=set.getcon();
> String PID_str = request.getParameter("PID");
> int PID=0;
>
> statement = conn.createStatement();
> statement1 = conn.createStatement();
>
> String delete = request.getParameter("delete");
>
> if((request.getParameter("delete")!= null) && (
> request.getParameter
> ("delete").equals("yes")))
> {
> ResultSet rss=null;
> int C_Id_todel = Integer.parseInt(
> request.getParameter("CID"));
> ArrayList tnoarr=new ArrayList();
> ArrayList cidarr=new ArrayList();
> if((request.getParameter("CID") != null)&&(userid != 0))
> {
> cidarr.clear();
> int avail=0;
> rss=statement.executeQuery("select CID from
> classification where PID="+C_Id_todel+" and UID="+userid+" ");
> while(rss.next())
> {
> avail=1;
> }
> if(avail==1){
> out.println("<script
> language='javascript'>alert('NOT POSSIBLE!!!!it contains a sub
> classification');</script>");
> }
> else{
> rss=statement.executeQuery("select T_No from
> questionbank where CID="+C_Id_todel+" ");
> while(rss.next())
> {
> tnoarr.add(rss.getInt(1));
> }
> statement.execute("delete from classification
> where CID="+C_Id_todel+" and UID="+userid+"");
> for(int j=0;j<tnoarr.size();j++)
> {
> statement.execute("delete from
> questionbank where T_No="+tnoarr.get(j)+" ");
> statement.execute("delete from
> options_table where T_No="+tnoarr.get(j)+" ");
> }
> }
> }
> }
>
>
> if(PID_str == null)
> {
> PID=-1;
> out.println("<input type=hidden name='PID'
> value='"+PID+"'>");
> }else{
> PID = Integer.parseInt(PID_str);
> out.println("<input type=hidden name='PID'
> value='"+PID+"'>");
> }
> if(PID != -1){
> ResultSet rs1=statement.executeQuery("select
> PID,class_name,level_disp from classification where CID="+PID+"");
> while(rs1.next())
> {
> subject=(rs1.getString(2));
> String show_level=rs1.getString(3);
> int back=rs1.getInt(1);
>
> out.println("<div align='left'><b
> class='label'>Under the heirarchy of <font color=#FF0000> "+subject+"
> </font> and Level <font color=#FF0000>"+show_level+" </font>
> </div>");
> out.println("<table
> align=right><tr><td></td><td></td><td></td><td class='label'><a
> href='http:
> classification.jsp?PID="+back+"'
> style=text-decoration:none><b> Back</b></a></td></tr>");
>
> }
> }
>
>
> %>
>
> <table align="center" ><tr><td ><b class="label">Add More
> </b></td><td><input class="input" id='clname' type="text" name="ctype"
> size="13" autocomplete=off></td>
> <td><select class="normal" size="1" name="levels">
>
> <% result=statement.executeQuery("select * from level
> ");
> while(result.next())
> {
> out.println(" <option value="+result.getInt(1)+"
> >"+result.getString(3)+"</option>");}%>
>
> </select></td><td><input class="butt" width="30"
> type="submit" name="create" value="create"/> </td></tr></table>
>
>
> <%
>
> int sel_level=0;
> String dis_level=new String();
>
>
> if(request.getParameter("levels") != null)
> {
> sel_level=Integer.parseInt(request.getParameter
> ("levels"));
> }
> result=statement.executeQuery("select level_name
> from level where levelID="+sel_level+" ");
> if(result.next())
> {
> dis_level=result.getString(1);
> }
>
> if((request.getParameter("create") != null) && (
> request.getParameter("create").equals("create")))
> {
> int available=0;
> String cltype=request.getParameter("ctype");
> int pd=Integer.parseInt(request.getParameter
> ("PID"));
> int levl=0;
> if(request.getParameter("levels") != null)
> {
> levl=Integer.parseInt(request.getParameter
> ("levels"));
> }
>
> res=statement.executeQuery("select * from
> classification where class_name='"+cltype+"' and level="+levl+"");
> if(res.next())
> {
> available=1;
> }
> if(available==1){
>
> out.println("<script
> language=javascript>alert('not possible,It have
> Sub-Classification');</script>");
> }
> else
> {
>
> stmt=conn.prepareStatement("INSERT INTO
> classification(UID,class_name,PID,level,level_disp)values(?,?,?,?,?)");
> String cctype=request.getParameter("ctype");
> //cctype=cctype.replace("#","#");
> stmt.setInt(1,userid);
> stmt.setString(2,cctype);
> stmt.setInt(3,PID);
> stmt.setInt(4,sel_level);
> stmt.setString(5,dis_level);
>
> stmt.executeUpdate();
> stmt.close();
> }
>
> }else{ }
>
> resultset=statement.executeQuery("select * from
> classification where PID="+PID+" and UID="+userid+" ");
> int i=1;
> %>
> <br><br><div align='center'><TABLE border='0'
> align=top
> ><TR class='head'><TH class='back'
> >SrNo</TH><TH>Classification</TH><TH>Level</TH><TH width="120">Add
> Question</TH><TH width="70">no.ofquest</TH><TH>Edit
> Question</TH><th>Action</th></TR></B>
>
> <%
> while(resultset.next())
> {
> String level=resultset.getString(6);
> class_name=resultset.getString(3);
>
> String cctest=resultset.getString(3);
> // String url= "classification.jsp
> ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
> int selected=resultset.getInt(5);
> int cid=resultset.getInt(1);
> request.setAttribute("c_id",cid);%>
>
>
> <tr class="row"><td><%=i%></td><td><a class="one"
> href='classification.jsp?PID=<%=resultset.getInt
> (1)%>&backPID="+PID+"'><%=class_name%></a></td><td
> class="one"><%=level%></td>
>
> <%out.println("<td>");
> out.println("<a class='one' style='display: block;
> border: 1px solid black;' href='#'
> onClick=\"online('"+selected+"','"+cid+"')\">Online</a>");
>
> out.println("<a class='one' style='display: block;
> border:
> 1px solid black;' href='#settings'
> onClick=\"written('"+selected+"','"+cid+"')\">Written</a>");
> out.println("</td>");
>
>
> resultset1=statement1.executeQuery("select count(*) from
> questionbank where CID="+cid+"");
> while(resultset1.next())
> {
> noqt=resultset1.getString(1);
> }
> out.println("<td align='center'>"+noqt+"</td>");
>
>
> out.println("<td align='center'>");
> out.println("<a class='one' style='display: block;
> border: 1px solid black;' href='#'
> onClick=\"onlineedit('"+selected+"','"+cid+"')\">Online</a>");
> out.println("<a class='one' style='display: block;
> border: 1px solid black;' href='#settings'
> onClick=\"writtenedit('"+selected+"','"+cid+"')\">Written</a>");
> out.println("</td>");
> %>
>
> <%
> String url= "classification.jsp
> ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
> %>
> <td><a class="one" href='#delete'
> onclick="ses_check('<%=url%>')">Delete</a></td>
> <%
> out.println("</tr>");
> // out.println("<td><a class='one' href='#delete'
> onclick='ses_check('+url+')'>Delete</a></td></tr>");
> out.println("</td></tr>");
> i++;
> }
> statement1.close();
> statement.close();
> conn.close();
> request.setAttribute("level",sel_level);
> %>
> </div></TABLE >
>
> <% } %>
> </p>
> </form>
> </body>
> </html>
>
> This is the Exception error
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable for
> the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> DefaultErrorHandler.java:84)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(
> ErrorDispatcher.java:328)
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> :397)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> org.apache.jasper.JspCompilationContext.compile(
> JspCompilationContext.java:556)
> org.apache.jasper.servlet.JspServletWrapper.service(
> JspServletWrapper.java:293)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/5.5.9 logs.
>
> Our development Envrnment is
>
> mysql 5.0.27
> jdk 1.5.0_06
> jre 1.5.0_06
> tomcat 5.5.20
> Apache 2
> phpMyAdmin 2.9.2
> Servlets 2.3
> JSP 1.2
>
> Our application is showing errors when deployed on tomcat 5.5.9(the
> Hosting company is using Tomcat 5.5.9.)
> so what is the solution.
>
Re: Tomcat Version problem
Posted by David Smith <dn...@cornell.edu>.
Your code: userid= Integer.valueOf(""+session.getAttribute("uid"));
Try: userid = ((Integer)session.getAttribute("uid")).intValue() ;
Essentially typecast the Object returned from the session to Integer
before attempting to get the int.
As to this error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)
You should be doing something like setAttribute( "attributeName", new
Integer( int ) ) instead of setAttribute( "attributeName", int )
--David
Johnny Kewl wrote:
> I see one problem...... see note below
> ----- Original Message ----- From: "Girish Havaldar"
> <ha...@gmail.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Thursday, July 05, 2007 10:00 AM
> Subject: Re: Tomcat Version problem
>
>
>> ths is the jsp page:
>>
>>
>> <%@page import="java.sql.*,java.util.*,logcheck.settings" errorPage="
>> errorpage.jsp"%>
>> <html>
>> <head>
>> <title> classification</title> </head>
>> <script type="text/javascript" src="dropdown.js"></script>
>> <body bgcolor="#FFFFFF" >
>> <LINK rel="stylesheet" href="style.css" type="text/css" />
>> <form action="classification.jsp" method="POST" name="classif"
>> onSubmit="return check()">
>> <%
>>
>> settings set=new settings();
>> int flag = 0;
>> flag = set.islogedin(request,response);
>> if(flag!=1){
>> out.println("<html><body><center><b>Your session is
>> invalidate..Press F5 or refresh it</b></center></body></html>");
>>
>> }
>> else if(session.isNew()){
>> out.println("<script language=javascript>
>> parent.location.href='expair.jsp';</script>");
>> }
>> else
>> {
>>
>> %>
>> <br>
>> <script language="javascript">
>> function check()
>> {
>> var id = document.getElementById("clname");
>> if(id.value ==''){
>> alert("Empty");
>> return false;
>> }
>> return true;
>> }
>>
>> function ses_check(url)
>> {
>> if(confirm("It will delete all the question coming under
>> this
>> Classification !!!!! DO You Want to Proceed ????")){
>> document.location.href=url;
>>
>> }
>> }
>>
>>
>> function online(level,cid)
>> {
>>
>> document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";
>>
>>
>> }
>>
>> function written(level,cid)
>> {
>>
>> document.location.href="wedastr.jsp?level="+level+"&CID="+cid+"&e_type=0";
>>
>>
>> }
>> function onlineedit(level,cid)
>> {
>> document.location.href="mangquest.jsp
>> ?e_type=1&sel_level="+level+"&CID="+cid+"";
>> }
>>
>> function writtenedit(level,cid)
>> {
>>
>> document.location.href="mangquest.jsp?sel_level="+level+"&CID="+cid+"&e_type=0"
>>
>> ;
>> }
>>
>>
>> </script>
>>
>> <%
>> int userid=0;
>> if(session.getAttribute("uid")!=null){
>
> ---------------------------------------------
> YOU MIXING TYPES HERE..... USE...
>
> Integer.parseInt(""+session.getAttribute("uid")); // have to put it
> in a try catch
> ---------------------------------------------
>
>> userid=
>> Integer.valueOf(""+session.getAttribute("uid"));
>>
>> }
>> else {
>> out.println("<script language=javascript>
>> parent.location.href='expair.jsp';</script>");
>> }
>>
>> PreparedStatement stmt = null;
>> Connection conn= null;
>> ResultSet resultset=null;
>> ResultSet resultset1=null;
>> ResultSet result=null;
>> ResultSet res=null;
>> ResultSet resdel=null;
>> Statement statement=null;
>> Statement statement1=null;
>>
>> String subject=new String();
>> String class_name=new String();
>> String noqt=new String();
>>
>> conn=set.getcon();
>> String PID_str = request.getParameter("PID");
>> int PID=0;
>>
>> statement = conn.createStatement();
>> statement1 = conn.createStatement();
>>
>> String delete = request.getParameter("delete");
>>
>> if((request.getParameter("delete")!= null) &&
>> (request.getParameter
>> ("delete").equals("yes")))
>> {
>> ResultSet rss=null;
>> int C_Id_todel = Integer.parseInt(
>> request.getParameter("CID"));
>> ArrayList tnoarr=new ArrayList();
>> ArrayList cidarr=new ArrayList();
>> if((request.getParameter("CID") != null)&&(userid != 0))
>> {
>> cidarr.clear();
>> int avail=0;
>> rss=statement.executeQuery("select CID from
>> classification where PID="+C_Id_todel+" and UID="+userid+" ");
>> while(rss.next())
>> {
>> avail=1;
>> }
>> if(avail==1){
>> out.println("<script
>> language='javascript'>alert('NOT POSSIBLE!!!!it contains a sub
>> classification');</script>");
>> }
>> else{
>> rss=statement.executeQuery("select T_No from
>> questionbank where CID="+C_Id_todel+" ");
>> while(rss.next())
>> {
>> tnoarr.add(rss.getInt(1));
>> }
>> statement.execute("delete from classification
>> where CID="+C_Id_todel+" and UID="+userid+"");
>> for(int j=0;j<tnoarr.size();j++)
>> {
>> statement.execute("delete from
>> questionbank where T_No="+tnoarr.get(j)+" ");
>> statement.execute("delete from
>> options_table where T_No="+tnoarr.get(j)+" ");
>> }
>> }
>> }
>> }
>>
>>
>> if(PID_str == null)
>> {
>> PID=-1;
>> out.println("<input type=hidden name='PID'
>> value='"+PID+"'>");
>> }else{
>> PID = Integer.parseInt(PID_str);
>> out.println("<input type=hidden name='PID'
>> value='"+PID+"'>");
>> }
>> if(PID != -1){
>> ResultSet rs1=statement.executeQuery("select
>> PID,class_name,level_disp from classification where CID="+PID+"");
>> while(rs1.next())
>> {
>> subject=(rs1.getString(2));
>> String show_level=rs1.getString(3);
>> int back=rs1.getInt(1);
>>
>> out.println("<div align='left'><b
>> class='label'>Under the heirarchy of <font color=#FF0000> "+subject+"
>> </font> and Level <font color=#FF0000>"+show_level+" </font>
>> </div>");
>> out.println("<table
>> align=right><tr><td></td><td></td><td></td><td class='label'><a
>> href='http:
>> classification.jsp?PID="+back+"'
>> style=text-decoration:none><b> Back</b></a></td></tr>");
>>
>> }
>> }
>>
>>
>> %>
>>
>> <table align="center" ><tr><td ><b class="label">Add
>> More
>> </b></td><td><input class="input" id='clname' type="text" name="ctype"
>> size="13" autocomplete=off></td>
>> <td><select class="normal" size="1" name="levels">
>>
>> <% result=statement.executeQuery("select * from
>> level
>> ");
>> while(result.next())
>> {
>> out.println(" <option value="+result.getInt(1)+"
>>> "+result.getString(3)+"</option>");}%>
>>
>> </select></td><td><input class="butt" width="30"
>> type="submit" name="create" value="create"/> </td></tr></table>
>>
>>
>> <%
>>
>> int sel_level=0;
>> String dis_level=new String();
>>
>>
>> if(request.getParameter("levels") != null)
>> {
>>
>> sel_level=Integer.parseInt(request.getParameter
>> ("levels"));
>> }
>> result=statement.executeQuery("select level_name
>> from level where levelID="+sel_level+" ");
>> if(result.next())
>> {
>> dis_level=result.getString(1);
>> }
>>
>> if((request.getParameter("create") != null) && (
>> request.getParameter("create").equals("create")))
>> {
>> int available=0;
>> String cltype=request.getParameter("ctype");
>> int pd=Integer.parseInt(request.getParameter
>> ("PID"));
>> int levl=0;
>> if(request.getParameter("levels") != null)
>> {
>> levl=Integer.parseInt(request.getParameter
>> ("levels"));
>> }
>>
>> res=statement.executeQuery("select * from
>> classification where class_name='"+cltype+"' and level="+levl+"");
>> if(res.next())
>> {
>> available=1;
>> }
>> if(available==1){
>>
>> out.println("<script
>> language=javascript>alert('not possible,It have
>> Sub-Classification');</script>");
>> }
>> else
>> {
>>
>> stmt=conn.prepareStatement("INSERT INTO
>> classification(UID,class_name,PID,level,level_disp)values(?,?,?,?,?)");
>> String cctype=request.getParameter("ctype");
>> //cctype=cctype.replace("#","#");
>> stmt.setInt(1,userid);
>> stmt.setString(2,cctype);
>> stmt.setInt(3,PID);
>> stmt.setInt(4,sel_level);
>> stmt.setString(5,dis_level);
>>
>> stmt.executeUpdate();
>> stmt.close();
>> }
>>
>> }else{ }
>>
>> resultset=statement.executeQuery("select * from
>> classification where PID="+PID+" and UID="+userid+" ");
>> int i=1;
>> %>
>> <br><br><div align='center'><TABLE border='0'
>> align=top
>>> <TR class='head'><TH class='back'
>>> SrNo</TH><TH>Classification</TH><TH>Level</TH><TH width="120">Add
>> Question</TH><TH width="70">no.ofquest</TH><TH>Edit
>> Question</TH><th>Action</th></TR></B>
>>
>> <%
>> while(resultset.next())
>> {
>> String level=resultset.getString(6);
>> class_name=resultset.getString(3);
>>
>> String cctest=resultset.getString(3);
>> // String url= "classification.jsp
>> ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
>> int selected=resultset.getInt(5);
>> int cid=resultset.getInt(1);
>> request.setAttribute("c_id",cid);%>
>>
>>
>> <tr class="row"><td><%=i%></td><td><a class="one"
>> href='classification.jsp?PID=<%=resultset.getInt(1)%>&backPID="+PID+"'><%=class_name%></a></td><td
>>
>> class="one"><%=level%></td>
>>
>> <%out.println("<td>");
>> out.println("<a class='one' style='display:
>> block;
>> border: 1px solid black;' href='#'
>> onClick=\"online('"+selected+"','"+cid+"')\">Online</a>");
>>
>> out.println("<a class='one' style='display: block;
>> border:
>> 1px solid black;' href='#settings'
>> onClick=\"written('"+selected+"','"+cid+"')\">Written</a>");
>> out.println("</td>");
>>
>>
>> resultset1=statement1.executeQuery("select count(*)
>> from
>> questionbank where CID="+cid+"");
>> while(resultset1.next())
>> {
>> noqt=resultset1.getString(1);
>> }
>> out.println("<td align='center'>"+noqt+"</td>");
>>
>>
>> out.println("<td align='center'>");
>> out.println("<a class='one' style='display: block;
>> border: 1px solid black;' href='#'
>> onClick=\"onlineedit('"+selected+"','"+cid+"')\">Online</a>");
>> out.println("<a class='one' style='display: block;
>> border: 1px solid black;' href='#settings'
>> onClick=\"writtenedit('"+selected+"','"+cid+"')\">Written</a>");
>> out.println("</td>");
>> %>
>>
>> <%
>> String url= "classification.jsp
>> ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
>> %>
>> <td><a class="one" href='#delete'
>> onclick="ses_check('<%=url%>')">Delete</a></td>
>> <%
>> out.println("</tr>");
>> // out.println("<td><a class='one' href='#delete'
>> onclick='ses_check('+url+')'>Delete</a></td></tr>");
>> out.println("</td></tr>");
>> i++;
>> }
>> statement1.close();
>> statement.close();
>> conn.close();
>> request.setAttribute("level",sel_level);
>> %>
>> </div></TABLE >
>>
>> <% } %>
>> </p>
>> </form>
>> </body>
>> </html>
>>
>> This is the Exception error
>>
>> type Exception report
>>
>> message
>>
>> description The server encountered an internal error () that
>> prevented it
>> from fulfilling this request.
>>
>> exception
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> Type mismatch: cannot convert from Integer to int
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method add(int, Object) in the type ArrayList is not applicable
>> for the
>> arguments (int)
>>
>> An error occurred at line: 226 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is
>> not
>> applicable for the arguments (String, int)
>>
>> An error occurred at line: 263 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is
>> not
>> applicable for the arguments (String, int)
>>
>>
>> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> DefaultErrorHandler.java:84)
>> org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> ErrorDispatcher.java:328)
>> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> :397)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>> org.apache.jasper.JspCompilationContext.compile(
>> JspCompilationContext.java:556)
>> org.apache.jasper.servlet.JspServletWrapper.service(
>> JspServletWrapper.java:293)
>>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>> note The full stack trace of the root cause is available in the Apache
>> Tomcat/5.5.9 logs.
>>
>> Our development Envrnment is
>>
>> mysql 5.0.27
>> jdk 1.5.0_06
>> jre 1.5.0_06
>> tomcat 5.5.20
>> Apache 2
>> phpMyAdmin 2.9.2
>> Servlets 2.3
>> JSP 1.2
>>
>> Our application is showing errors when deployed on tomcat 5.5.9(the
>> Hosting company is using Tomcat 5.5.9.)
>> so what is the solution.
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
I see one problem...... see note below
----- Original Message -----
From: "Girish Havaldar" <ha...@gmail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, July 05, 2007 10:00 AM
Subject: Re: Tomcat Version problem
> ths is the jsp page:
>
>
> <%@page import="java.sql.*,java.util.*,logcheck.settings" errorPage="
> errorpage.jsp"%>
> <html>
> <head>
> <title> classification</title> </head>
> <script type="text/javascript" src="dropdown.js"></script>
> <body bgcolor="#FFFFFF" >
> <LINK rel="stylesheet" href="style.css" type="text/css" />
> <form action="classification.jsp" method="POST" name="classif"
> onSubmit="return check()">
> <%
>
> settings set=new settings();
> int flag = 0;
> flag = set.islogedin(request,response);
> if(flag!=1){
> out.println("<html><body><center><b>Your session is
> invalidate..Press F5 or refresh it</b></center></body></html>");
>
> }
> else if(session.isNew()){
> out.println("<script language=javascript>
> parent.location.href='expair.jsp';</script>");
> }
> else
> {
>
> %>
> <br>
> <script language="javascript">
> function check()
> {
> var id = document.getElementById("clname");
> if(id.value ==''){
> alert("Empty");
> return false;
> }
> return true;
> }
>
> function ses_check(url)
> {
> if(confirm("It will delete all the question coming under this
> Classification !!!!! DO You Want to Proceed ????")){
> document.location.href=url;
>
> }
> }
>
>
> function online(level,cid)
> {
>
> document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";
>
> }
>
> function written(level,cid)
> {
>
> document.location.href="wedastr.jsp?level="+level+"&CID="+cid+"&e_type=0";
>
> }
> function onlineedit(level,cid)
> {
> document.location.href="mangquest.jsp
> ?e_type=1&sel_level="+level+"&CID="+cid+"";
> }
>
> function writtenedit(level,cid)
> {
>
> document.location.href="mangquest.jsp?sel_level="+level+"&CID="+cid+"&e_type=0"
> ;
> }
>
>
> </script>
>
> <%
> int userid=0;
> if(session.getAttribute("uid")!=null){
---------------------------------------------
YOU MIXING TYPES HERE..... USE...
Integer.parseInt(""+session.getAttribute("uid")); // have to put it in a
try catch
---------------------------------------------
> userid=
> Integer.valueOf(""+session.getAttribute("uid"));
>
> }
> else {
> out.println("<script language=javascript>
> parent.location.href='expair.jsp';</script>");
> }
>
> PreparedStatement stmt = null;
> Connection conn= null;
> ResultSet resultset=null;
> ResultSet resultset1=null;
> ResultSet result=null;
> ResultSet res=null;
> ResultSet resdel=null;
> Statement statement=null;
> Statement statement1=null;
>
> String subject=new String();
> String class_name=new String();
> String noqt=new String();
>
> conn=set.getcon();
> String PID_str = request.getParameter("PID");
> int PID=0;
>
> statement = conn.createStatement();
> statement1 = conn.createStatement();
>
> String delete = request.getParameter("delete");
>
> if((request.getParameter("delete")!= null) &&
> (request.getParameter
> ("delete").equals("yes")))
> {
> ResultSet rss=null;
> int C_Id_todel = Integer.parseInt(
> request.getParameter("CID"));
> ArrayList tnoarr=new ArrayList();
> ArrayList cidarr=new ArrayList();
> if((request.getParameter("CID") != null)&&(userid != 0))
> {
> cidarr.clear();
> int avail=0;
> rss=statement.executeQuery("select CID from
> classification where PID="+C_Id_todel+" and UID="+userid+" ");
> while(rss.next())
> {
> avail=1;
> }
> if(avail==1){
> out.println("<script
> language='javascript'>alert('NOT POSSIBLE!!!!it contains a sub
> classification');</script>");
> }
> else{
> rss=statement.executeQuery("select T_No from
> questionbank where CID="+C_Id_todel+" ");
> while(rss.next())
> {
> tnoarr.add(rss.getInt(1));
> }
> statement.execute("delete from classification
> where CID="+C_Id_todel+" and UID="+userid+"");
> for(int j=0;j<tnoarr.size();j++)
> {
> statement.execute("delete from
> questionbank where T_No="+tnoarr.get(j)+" ");
> statement.execute("delete from
> options_table where T_No="+tnoarr.get(j)+" ");
> }
> }
> }
> }
>
>
> if(PID_str == null)
> {
> PID=-1;
> out.println("<input type=hidden name='PID'
> value='"+PID+"'>");
> }else{
> PID = Integer.parseInt(PID_str);
> out.println("<input type=hidden name='PID'
> value='"+PID+"'>");
> }
> if(PID != -1){
> ResultSet rs1=statement.executeQuery("select
> PID,class_name,level_disp from classification where CID="+PID+"");
> while(rs1.next())
> {
> subject=(rs1.getString(2));
> String show_level=rs1.getString(3);
> int back=rs1.getInt(1);
>
> out.println("<div align='left'><b
> class='label'>Under the heirarchy of <font color=#FF0000> "+subject+"
> </font> and Level <font color=#FF0000>"+show_level+" </font>
> </div>");
> out.println("<table
> align=right><tr><td></td><td></td><td></td><td class='label'><a
> href='http:
> classification.jsp?PID="+back+"'
> style=text-decoration:none><b> Back</b></a></td></tr>");
>
> }
> }
>
>
> %>
>
> <table align="center" ><tr><td ><b class="label">Add More
> </b></td><td><input class="input" id='clname' type="text" name="ctype"
> size="13" autocomplete=off></td>
> <td><select class="normal" size="1" name="levels">
>
> <% result=statement.executeQuery("select * from level
> ");
> while(result.next())
> {
> out.println(" <option value="+result.getInt(1)+"
>>"+result.getString(3)+"</option>");}%>
>
> </select></td><td><input class="butt" width="30"
> type="submit" name="create" value="create"/> </td></tr></table>
>
>
> <%
>
> int sel_level=0;
> String dis_level=new String();
>
>
> if(request.getParameter("levels") != null)
> {
> sel_level=Integer.parseInt(request.getParameter
> ("levels"));
> }
> result=statement.executeQuery("select level_name
> from level where levelID="+sel_level+" ");
> if(result.next())
> {
> dis_level=result.getString(1);
> }
>
> if((request.getParameter("create") != null) && (
> request.getParameter("create").equals("create")))
> {
> int available=0;
> String cltype=request.getParameter("ctype");
> int pd=Integer.parseInt(request.getParameter
> ("PID"));
> int levl=0;
> if(request.getParameter("levels") != null)
> {
> levl=Integer.parseInt(request.getParameter
> ("levels"));
> }
>
> res=statement.executeQuery("select * from
> classification where class_name='"+cltype+"' and level="+levl+"");
> if(res.next())
> {
> available=1;
> }
> if(available==1){
>
> out.println("<script
> language=javascript>alert('not possible,It have
> Sub-Classification');</script>");
> }
> else
> {
>
> stmt=conn.prepareStatement("INSERT INTO
> classification(UID,class_name,PID,level,level_disp)values(?,?,?,?,?)");
> String cctype=request.getParameter("ctype");
> //cctype=cctype.replace("#","#");
> stmt.setInt(1,userid);
> stmt.setString(2,cctype);
> stmt.setInt(3,PID);
> stmt.setInt(4,sel_level);
> stmt.setString(5,dis_level);
>
> stmt.executeUpdate();
> stmt.close();
> }
>
> }else{ }
>
> resultset=statement.executeQuery("select * from
> classification where PID="+PID+" and UID="+userid+" ");
> int i=1;
> %>
> <br><br><div align='center'><TABLE border='0' align=top
>><TR class='head'><TH class='back'
>>SrNo</TH><TH>Classification</TH><TH>Level</TH><TH width="120">Add
> Question</TH><TH width="70">no.ofquest</TH><TH>Edit
> Question</TH><th>Action</th></TR></B>
>
> <%
> while(resultset.next())
> {
> String level=resultset.getString(6);
> class_name=resultset.getString(3);
>
> String cctest=resultset.getString(3);
> // String url= "classification.jsp
> ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
> int selected=resultset.getInt(5);
> int cid=resultset.getInt(1);
> request.setAttribute("c_id",cid);%>
>
>
> <tr class="row"><td><%=i%></td><td><a class="one"
> href='classification.jsp?PID=<%=resultset.getInt(1)%>&backPID="+PID+"'><%=class_name%></a></td><td
> class="one"><%=level%></td>
>
> <%out.println("<td>");
> out.println("<a class='one' style='display: block;
> border: 1px solid black;' href='#'
> onClick=\"online('"+selected+"','"+cid+"')\">Online</a>");
>
> out.println("<a class='one' style='display: block;
> border:
> 1px solid black;' href='#settings'
> onClick=\"written('"+selected+"','"+cid+"')\">Written</a>");
> out.println("</td>");
>
>
> resultset1=statement1.executeQuery("select count(*) from
> questionbank where CID="+cid+"");
> while(resultset1.next())
> {
> noqt=resultset1.getString(1);
> }
> out.println("<td align='center'>"+noqt+"</td>");
>
>
> out.println("<td align='center'>");
> out.println("<a class='one' style='display: block;
> border: 1px solid black;' href='#'
> onClick=\"onlineedit('"+selected+"','"+cid+"')\">Online</a>");
> out.println("<a class='one' style='display: block;
> border: 1px solid black;' href='#settings'
> onClick=\"writtenedit('"+selected+"','"+cid+"')\">Written</a>");
> out.println("</td>");
> %>
>
> <%
> String url= "classification.jsp
> ?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
> %>
> <td><a class="one" href='#delete'
> onclick="ses_check('<%=url%>')">Delete</a></td>
> <%
> out.println("</tr>");
> // out.println("<td><a class='one' href='#delete'
> onclick='ses_check('+url+')'>Delete</a></td></tr>");
> out.println("</td></tr>");
> i++;
> }
> statement1.close();
> statement.close();
> conn.close();
> request.setAttribute("level",sel_level);
> %>
> </div></TABLE >
>
> <% } %>
> </p>
> </form>
> </body>
> </html>
>
> This is the Exception error
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable for
> the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> DefaultErrorHandler.java:84)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(
> ErrorDispatcher.java:328)
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> :397)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> org.apache.jasper.JspCompilationContext.compile(
> JspCompilationContext.java:556)
> org.apache.jasper.servlet.JspServletWrapper.service(
> JspServletWrapper.java:293)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/5.5.9 logs.
>
> Our development Envrnment is
>
> mysql 5.0.27
> jdk 1.5.0_06
> jre 1.5.0_06
> tomcat 5.5.20
> Apache 2
> phpMyAdmin 2.9.2
> Servlets 2.3
> JSP 1.2
>
> Our application is showing errors when deployed on tomcat 5.5.9(the
> Hosting company is using Tomcat 5.5.9.)
> so what is the solution.
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Girish Havaldar <ha...@gmail.com>.
ths is the jsp page:
<%@page import="java.sql.*,java.util.*,logcheck.settings" errorPage="
errorpage.jsp"%>
<html>
<head>
<title> classification</title> </head>
<script type="text/javascript" src="dropdown.js"></script>
<body bgcolor="#FFFFFF" >
<LINK rel="stylesheet" href="style.css" type="text/css" />
<form action="classification.jsp" method="POST" name="classif"
onSubmit="return check()">
<%
settings set=new settings();
int flag = 0;
flag = set.islogedin(request,response);
if(flag!=1){
out.println("<html><body><center><b>Your session is
invalidate..Press F5 or refresh it</b></center></body></html>");
}
else if(session.isNew()){
out.println("<script language=javascript>
parent.location.href='expair.jsp';</script>");
}
else
{
%>
<br>
<script language="javascript">
function check()
{
var id = document.getElementById("clname");
if(id.value ==''){
alert("Empty");
return false;
}
return true;
}
function ses_check(url)
{
if(confirm("It will delete all the question coming under this
Classification !!!!! DO You Want to Proceed ????")){
document.location.href=url;
}
}
function online(level,cid)
{
document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";
}
function written(level,cid)
{
document.location.href="wedastr.jsp?level="+level+"&CID="+cid+"&e_type=0";
}
function onlineedit(level,cid)
{
document.location.href="mangquest.jsp
?e_type=1&sel_level="+level+"&CID="+cid+"";
}
function writtenedit(level,cid)
{
document.location.href="mangquest.jsp?sel_level="+level+"&CID="+cid+"&e_type=0"
;
}
</script>
<%
int userid=0;
if(session.getAttribute("uid")!=null){
userid=
Integer.valueOf(""+session.getAttribute("uid"));
}
else {
out.println("<script language=javascript>
parent.location.href='expair.jsp';</script>");
}
PreparedStatement stmt = null;
Connection conn= null;
ResultSet resultset=null;
ResultSet resultset1=null;
ResultSet result=null;
ResultSet res=null;
ResultSet resdel=null;
Statement statement=null;
Statement statement1=null;
String subject=new String();
String class_name=new String();
String noqt=new String();
conn=set.getcon();
String PID_str = request.getParameter("PID");
int PID=0;
statement = conn.createStatement();
statement1 = conn.createStatement();
String delete = request.getParameter("delete");
if((request.getParameter("delete")!= null) && (request.getParameter
("delete").equals("yes")))
{
ResultSet rss=null;
int C_Id_todel = Integer.parseInt(
request.getParameter("CID"));
ArrayList tnoarr=new ArrayList();
ArrayList cidarr=new ArrayList();
if((request.getParameter("CID") != null)&&(userid != 0))
{
cidarr.clear();
int avail=0;
rss=statement.executeQuery("select CID from
classification where PID="+C_Id_todel+" and UID="+userid+" ");
while(rss.next())
{
avail=1;
}
if(avail==1){
out.println("<script
language='javascript'>alert('NOT POSSIBLE!!!!it contains a sub
classification');</script>");
}
else{
rss=statement.executeQuery("select T_No from
questionbank where CID="+C_Id_todel+" ");
while(rss.next())
{
tnoarr.add(rss.getInt(1));
}
statement.execute("delete from classification
where CID="+C_Id_todel+" and UID="+userid+"");
for(int j=0;j<tnoarr.size();j++)
{
statement.execute("delete from
questionbank where T_No="+tnoarr.get(j)+" ");
statement.execute("delete from
options_table where T_No="+tnoarr.get(j)+" ");
}
}
}
}
if(PID_str == null)
{
PID=-1;
out.println("<input type=hidden name='PID'
value='"+PID+"'>");
}else{
PID = Integer.parseInt(PID_str);
out.println("<input type=hidden name='PID'
value='"+PID+"'>");
}
if(PID != -1){
ResultSet rs1=statement.executeQuery("select
PID,class_name,level_disp from classification where CID="+PID+"");
while(rs1.next())
{
subject=(rs1.getString(2));
String show_level=rs1.getString(3);
int back=rs1.getInt(1);
out.println("<div align='left'><b
class='label'>Under the heirarchy of <font color=#FF0000> "+subject+"
</font> and Level <font color=#FF0000>"+show_level+" </font>
</div>");
out.println("<table
align=right><tr><td></td><td></td><td></td><td class='label'><a href='http:
classification.jsp?PID="+back+"'
style=text-decoration:none><b> Back</b></a></td></tr>");
}
}
%>
<table align="center" ><tr><td ><b class="label">Add More
</b></td><td><input class="input" id='clname' type="text" name="ctype"
size="13" autocomplete=off></td>
<td><select class="normal" size="1" name="levels">
<% result=statement.executeQuery("select * from level
");
while(result.next())
{
out.println(" <option value="+result.getInt(1)+"
>"+result.getString(3)+"</option>");}%>
</select></td><td><input class="butt" width="30"
type="submit" name="create" value="create"/> </td></tr></table>
<%
int sel_level=0;
String dis_level=new String();
if(request.getParameter("levels") != null)
{
sel_level=Integer.parseInt(request.getParameter
("levels"));
}
result=statement.executeQuery("select level_name
from level where levelID="+sel_level+" ");
if(result.next())
{
dis_level=result.getString(1);
}
if((request.getParameter("create") != null) && (
request.getParameter("create").equals("create")))
{
int available=0;
String cltype=request.getParameter("ctype");
int pd=Integer.parseInt(request.getParameter
("PID"));
int levl=0;
if(request.getParameter("levels") != null)
{
levl=Integer.parseInt(request.getParameter
("levels"));
}
res=statement.executeQuery("select * from
classification where class_name='"+cltype+"' and level="+levl+"");
if(res.next())
{
available=1;
}
if(available==1){
out.println("<script
language=javascript>alert('not possible,It have
Sub-Classification');</script>");
}
else
{
stmt=conn.prepareStatement("INSERT INTO
classification(UID,class_name,PID,level,level_disp)values(?,?,?,?,?)");
String cctype=request.getParameter("ctype");
//cctype=cctype.replace("#","#");
stmt.setInt(1,userid);
stmt.setString(2,cctype);
stmt.setInt(3,PID);
stmt.setInt(4,sel_level);
stmt.setString(5,dis_level);
stmt.executeUpdate();
stmt.close();
}
}else{ }
resultset=statement.executeQuery("select * from
classification where PID="+PID+" and UID="+userid+" ");
int i=1;
%>
<br><br><div align='center'><TABLE border='0' align=top
><TR class='head'><TH class='back'
>SrNo</TH><TH>Classification</TH><TH>Level</TH><TH width="120">Add
Question</TH><TH width="70">no.ofquest</TH><TH>Edit
Question</TH><th>Action</th></TR></B>
<%
while(resultset.next())
{
String level=resultset.getString(6);
class_name=resultset.getString(3);
String cctest=resultset.getString(3);
// String url= "classification.jsp
?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
int selected=resultset.getInt(5);
int cid=resultset.getInt(1);
request.setAttribute("c_id",cid);%>
<tr class="row"><td><%=i%></td><td><a class="one"
href='classification.jsp?PID=<%=resultset.getInt(1)%>&backPID="+PID+"'><%=class_name%></a></td><td
class="one"><%=level%></td>
<%out.println("<td>");
out.println("<a class='one' style='display: block;
border: 1px solid black;' href='#'
onClick=\"online('"+selected+"','"+cid+"')\">Online</a>");
out.println("<a class='one' style='display: block; border:
1px solid black;' href='#settings'
onClick=\"written('"+selected+"','"+cid+"')\">Written</a>");
out.println("</td>");
resultset1=statement1.executeQuery("select count(*) from
questionbank where CID="+cid+"");
while(resultset1.next())
{
noqt=resultset1.getString(1);
}
out.println("<td align='center'>"+noqt+"</td>");
out.println("<td align='center'>");
out.println("<a class='one' style='display: block;
border: 1px solid black;' href='#'
onClick=\"onlineedit('"+selected+"','"+cid+"')\">Online</a>");
out.println("<a class='one' style='display: block;
border: 1px solid black;' href='#settings'
onClick=\"writtenedit('"+selected+"','"+cid+"')\">Written</a>");
out.println("</td>");
%>
<%
String url= "classification.jsp
?PID="+resultset.getInt(4)+"&CID="+resultset.getInt(1)+"&delete=yes";
%>
<td><a class="one" href='#delete'
onclick="ses_check('<%=url%>')">Delete</a></td>
<%
out.println("</tr>");
// out.println("<td><a class='one' href='#delete'
onclick='ses_check('+url+')'>Delete</a></td></tr>");
out.println("</td></tr>");
i++;
}
statement1.close();
statement.close();
conn.close();
request.setAttribute("level",sel_level);
%>
</div></TABLE >
<% } %>
</p>
</form>
</body>
</html>
This is the Exception error
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
Type mismatch: cannot convert from Integer to int
An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
The method add(int, Object) in the type ArrayList is not applicable for the
arguments (int)
An error occurred at line: 226 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)
An error occurred at line: 263 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)
org.apache.jasper.compiler.DefaultErrorHandler.javacError(
DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(
ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(
JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.
Our development Envrnment is
mysql 5.0.27
jdk 1.5.0_06
jre 1.5.0_06
tomcat 5.5.20
Apache 2
phpMyAdmin 2.9.2
Servlets 2.3
JSP 1.2
Our application is showing errors when deployed on tomcat 5.5.9(the
Hosting company is using Tomcat 5.5.9.)
so what is the solution.
Re: Tomcat Version problem
Posted by Peng Tuck Kwok <pe...@gmail.com>.
Sounds like that are a lot of type mis-match in the generated servlets, I'd
have a look at the JSP's to see if there's anything like that in there and
correct it.
On 7/5/07, Gregor Schneider <rc...@googlemail.com> wrote:
>
> well, the error-log is giving you pretty good hints:
>
>
> > An error occurred at line: 67 in the jsp file: /classification.jsp
> > Generated servlet error:
> > Type mismatch: cannot convert from Integer to int
> >
> > An error occurred at line: 67 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method add(int, Object) in the type ArrayList is not applicable for
> the
> > arguments (int)
> >
> > An error occurred at line: 226 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method setAttribute(String, Object) in the type ServletRequest is
> not
> > applicable for the arguments (String, int)
> >
> > An error occurred at line: 263 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method setAttribute(String, Object) in the type ServletRequest is
> not
> > applicable for the arguments (String, int)
> >
> My guess is, that you've developed your JSPs using a different JDK
> than what your client is running, and some method-signatures seem to
> have changed between the different JDKs.
>
> Check what JDK your client is running, compare them and then fix your
> code accordingly.
>
> HTH
>
> Gregor
> --
> what's puzzlin' you, is the nature of my game
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Tomcat Version problem
Posted by Girish Havaldar <ha...@gmail.com>.
Thanks man,
On 05/07/07, Gregor Schneider <rc...@googlemail.com> wrote:
>
> well, the error-log is giving you pretty good hints:
>
>
> > An error occurred at line: 67 in the jsp file: /classification.jsp
> > Generated servlet error:
> > Type mismatch: cannot convert from Integer to int
> >
> > An error occurred at line: 67 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method add(int, Object) in the type ArrayList is not applicable for
> the
> > arguments (int)
> >
> > An error occurred at line: 226 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method setAttribute(String, Object) in the type ServletRequest is
> not
> > applicable for the arguments (String, int)
> >
> > An error occurred at line: 263 in the jsp file: /classification.jsp
> > Generated servlet error:
> > The method setAttribute(String, Object) in the type ServletRequest is
> not
> > applicable for the arguments (String, int)
> >
> My guess is, that you've developed your JSPs using a different JDK
> than what your client is running, and some method-signatures seem to
> have changed between the different JDKs.
>
> Check what JDK your client is running, compare them and then fix your
> code accordingly.
>
> HTH
>
> Gregor
> --
> what's puzzlin' you, is the nature of my game
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Tomcat Version problem
Posted by Gregor Schneider <rc...@googlemail.com>.
well, the error-log is giving you pretty good hints:
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable for the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is not
> applicable for the arguments (String, int)
>
My guess is, that you've developed your JSPs using a different JDK
than what your client is running, and some method-signatures seem to
have changed between the different JDKs.
Check what JDK your client is running, compare them and then fix your
code accordingly.
HTH
Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Version problem
Posted by Girish Havaldar <ha...@gmail.com>.
On 05/07/07, Girish Havaldar <ha...@gmail.com> wrote:
> Hi,
>
> we have an application developed using the following components as listed
below
>
> mysql 5.0.27
> jdk 1.5.0_06
> jre 1.5.0_06
> tomcat 5.5.20
> Apache 2
> phpMyAdmin 2.9.2
> Servlets 2.3
> JSP 1.2
>
> Our application is showing errors when deployed on tomcat 5.5.9(the
> Hosting company is using Tomcat 5.5.9.)
ERROR:
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
Type mismatch: cannot convert from Integer to int
An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
The method add(int, Object) in the type ArrayList is not applicable for the
arguments (int)
An error occurred at line: 226 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)
An error occurred at line: 263 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)
org.apache.jasper.compiler.DefaultErrorHandler.javacError(
DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(
ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(
JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.
> so what is the solution.
> Also plz send me info abt hosting comapny who can support the above
> specification.
>
>
> Thank you,
>
> Girish S.Havaldar.
>
Re: Tomcat Version problem
Posted by Gregor Schneider <rc...@googlemail.com>.
Sorry, my cristal ball just f'd up, therefore I'm neither able to see
the errors thrown up nor a possible solution for them.
Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org