Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Monday, June 2, 2014

Installing JSF in Eclipse

File--> New--> Dynamic Web Project




Select Download Library (The floppy Disk icon)





Installing Glassfish 4.0 from Eclipse IDE




Since Glassfish is not found, select "Download Additional server adapters" on top-right.




The error on the top indicates that Glassfish doesn't recognize the jdk installed on the system. Therefore, go to Window-->Preferences--> Java-->Installed JREs

Now Add the jdk as shown below

Make sure the jdk checkbox is selected


Now follow the above steps again and the error won't appear as shown below

and select "Install Server"










Once the installation is complete


Open a browser


Thursday, March 13, 2014

How to resolve javax.servlet.http.HTTPServlet Error in eclipse

When trying to execute a JSP program, javax.servlet.http.HTTPServlet error can be encountered, if eclipse is not connected with the Tomcat server. This can be due to the eclipse not recognizing the server or that eclipse has not been configured with Tomcat.

The error can be as below:





Sorry I had to blur out part of the images to hide the details.

The solution is to first add Tomcat to eclipse and then to configure the build configuration of the project from the package explorer. If Tomcat has been added then skip to point 2 below

1) Adding Tomcat configuration to eclipse:

 In eclipse, click Window --> Preferences

collapse Server and select Runtime Environment



click Add on the right side and select Apache Tomcat (with the version currently being installed) and click Next.

In the Tomcat installation directory, enter the location where Tomcat is being installed



And then click Finish.

Now Tomcat is being configured with eclipse.

2) Resolving the error:

In the Project Explorer pane, right click on the project name, and select Build Path --> Configure Build Path



On the left side select Targeted Runtimes and select Apache Tomcat on the right side. Click OK.

You will see the error disappear!!!

Way to go to code the project....