• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to use Eclipse ee

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,
I am new to eclipse...
I have downloaded the latest version of eclipse 3.3 (Enterprise Edition)
Created a Web dynamic project and added a servlet to test it.
Now it is giving me error that the following imports cannot be resolved:
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

This servlet is under Demo ( my app name) ->Java Resources:src -> default package -> ServletOne.java
I know I am making some stupid mistake but I have tried everything ( checking installed jre... and other settings) and still I cannot figure out the problem!
By the way I have netbeans 5.5 installed and there I can run servlets and jsp without problems. I have Sun App server 9 installed too and jre 1.6.
Please advise what I should do so that I can start using eclipse.
Thanks in advance,
Danveer
 
Dushyant Danveer
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Further to the above query should I add some .jar to the lib for it to work?
Any advise would be appreciated I have googled and checked eclipse but it looks like this is too trivial a problem to be mentioned anywhere.
 
Dushyant Danveer
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok! made some progress... I created a new project and this time it does not give me errors which is great. so now my servlet is compiled and there is no cross sign next to it.
But...
I created a WelcomeAll.html file:

html
head
title Insert title here /title
/head
body
a href="FirstServlet" click me!
/body
/html
Note: the above html is with legal '<>' unable to insert it there....
This file is located under WebContent. Now I am trying to run this by right clicking on it and selecting 'Run As' and then 'Run on Server' then J2EE preview and the output I get is:
HTTP ERROR: 200
OK
RequestURI=/Demo//WelcomeAll.html
How do i get the html page so that I can check the servlet.
Please help on this one!
Thanks in advance,
Danveer
 
Dushyant Danveer
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help my fellow JavaRanchers....
For those who might stumble this issue...
I fixed this problem by
1. Click on Windows -> Preferences -> Installed JRE's --> Here make sure the jdk is selected instead of jre.
2. Make sure you do a clean build: Project -> Clean and then Build Project.
3. If it is not working with the first 2 steps then run eclipse with -clean and that should make it work

- Danveer
 
I was born with webbed fish toes. This tiny ad is my only friend:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic