Breaking News
Showing posts with label J2ee project. Show all posts
Showing posts with label J2ee project. Show all posts

Thursday, 17 April 2014

How to get the AmazonS3 client object in java

It is very important to know and understand the API's provided from AWS.

AWS has provided some API's to connect to it's S3 bucket. We will using this to get the connection to amazon s3.

Below is direct code snippet which will give the created amazon s3 client object.


public AmazonS3 getAWSClient() {
AmazonS3 s3Client = null; 
BasicAWSCredentials awsCredential = new BasicAWSCredentials(
"ACCESS KEY", "SECRET ACCESS KEY");

ClientConfiguration clientConfig = new ClientConfiguration();
clientConfig.setProtocol(Protocol.HTTPS);
s3Client = new AmazonS3Client(awsCredential, clientConfig);
return s3Client;


Read more ...

Sunday, 23 February 2014

How to change Project Facet in Eclipse


This post is about how to change version of project facet Dynamic Web Module to 3.0 or any other in Eclipse!

 

Open web.xml from project structure

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
          http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">
    <display-name>Servlet 3.0 Web Application</display-name>
</web-app>

 

and update web.xml file

for example change version = "2.5"


Also change the org.eclipse.wst.common.project.facet.core.xml file from your project .settings file

Follow the steps

1. Window > Show View > Other > General > Navigator


2. There is a .settings folder under your project directory

 

3. Change the dynamic web module version in this line to 2.5

4.Change the Java version in this line to 1.5 or higher 

 

Now refresh your project and get set to run on your server. 






Read more ...
Designed By