Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » strange problem about compiling my first servlet
strange problem about compiling my first servlet [message #195194] Fri, 29 June 2007 12:35 Go to next message
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 13:41 Go to previous messageGo to next message
Angel Vera is currently offline Angel Vera
Messages: 63
Registered: July 2009
Member

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 09:00 Go to previous message
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.
Previous Topic:soap:headerFault not properly serialized?
Next Topic:Server Runtimes without J2EE tools
Goto Forum:
  


Current Time: Sat Apr 19 11:41:32 EDT 2014

Powered by FUDForum. Page generated in 0.03553 seconds