strange problem about compiling my first servlet [message #195194] |
Fri, 29 June 2007 16:35 |
Eclipse User |
|
|
|
Originally posted by: haoniukun.gmail.com
Dear all,
I followed all the steps creating a jsp website with eclipse.
But when compiling under eclipse, I've got the following problem:
javax.servlet.jsp.PageContext cannot be resolved to a type
JSPBook/WebContent easy.jsp line 1 1183131748222 39
javax.servlet.ServletException cannot be resolved to a type
JSPBook/WebContent easy.jsp line 1 1183131748220 38
I wonder where these classes locate.
I've had servlet-api.jar and jsp-api.jar installed in my project's build
path.
My tomcat version is 5.5.
Any help would be appreciated.
Thanks in advance.
|
|
|
Re: strange problem about compiling my first servlet [message #195210 is a reply to message #195194] |
Fri, 29 June 2007 17:41 |
|
Tomcat requires a Java SDK in order to compile JSP files. Ensure that the
JRE preference settings point to an SDK install location.
Niu Kun <haoniukun@gmail.com> wrote in news:f63fsh$1jc$1@build.eclipse.org:
> Dear all,
> I followed all the steps creating a jsp website with eclipse.
> But when compiling under eclipse, I've got the following problem:
> javax.servlet.jsp.PageContext cannot be resolved to a type
> JSPBook/WebContent easy.jsp line 1 1183131748222 39
> javax.servlet.ServletException cannot be resolved to a type
> JSPBook/WebContent easy.jsp line 1 1183131748220 38
> I wonder where these classes locate.
> I've had servlet-api.jar and jsp-api.jar installed in my project's build
> path.
> My tomcat version is 5.5.
> Any help would be appreciated.
> Thanks in advance.
>
Regards,
--
Angel Vera
WTP Server Tools Developer
|
|
|
Re: strange problem about compiling my first servlet [message #195270 is a reply to message #195210] |
Sat, 30 June 2007 13:00 |
Eclipse User |
|
|
|
Originally posted by: haoniukun.gmail.com
Angel Vera 写道:
> Tomcat requires a Java SDK in order to compile JSP files. Ensure that the
> JRE preference settings point to an SDK install location.
>
>
> Niu Kun <haoniukun@gmail.com> wrote in news:f63fsh$1jc$1@build.eclipse.org:
>
>> Dear all,
>> I followed all the steps creating a jsp website with eclipse.
>> But when compiling under eclipse, I've got the following problem:
>> javax.servlet.jsp.PageContext cannot be resolved to a type
>> JSPBook/WebContent easy.jsp line 1 1183131748222 39
>> javax.servlet.ServletException cannot be resolved to a type
>> JSPBook/WebContent easy.jsp line 1 1183131748220 38
>> I wonder where these classes locate.
>> I've had servlet-api.jar and jsp-api.jar installed in my project's build
>> path.
>> My tomcat version is 5.5.
>> Any help would be appreciated.
>> Thanks in advance.
>>
>
Thank you for your advice.
It's true that I pointed my jdk location to the right place from eclipse.
Now, I can build my jsp project from scratch.
It's working fine.
Just import the old project.
Strange behaviour.
|
|
|
Powered by
FUDForum. Page generated in 0.02888 seconds