My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Wednesday, November 23, 2016

Where/How to create web.xml : Eclipse project - (Example using Jersey in Java)


Tip: Dynamic Web Project - - > RightClick - - > Java EE Tools - - > Generate Deployment Descriptor Stub. This would create Web.xml

Starting all over again from the question:
If you are doing Java programming to create some Service using Jersey or any other framework, you will many times land into situation where you need Web.xml to be created. I had once wondered where this file would be present. Or, better say, how should i create the Web.xml file.

Note that the web.xml file should be listed right below the last line in your screenshot and resides in WebContent/WEB-INF. 


If it is missing you might have missed to check the "Generate web.xml deployment descriptor" option on the third page of the Dynamic web project wizard.


Tip: Dynamic Web Project - - > RightClick - - > Java EE Tools - - > Generate Deployment Descriptor Stub. This would create Web.xml


A sample content of Web.xml can be as follows:



<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://java.sun.com/xml/ns/javaee"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
   id="WebApp_ID" version="3.0">
   <display-name>User Management</display-name>
   <servlet>
      <servlet-name>Jersey RESTful Application</servlet-name>
      <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
         <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>com.tutorialspoint</param-value>
         </init-param>
      </servlet>
   <servlet-mapping>
   <servlet-name>Jersey RESTful Application</servlet-name>
      <url-pattern>/rest/*</url-pattern>
   </servlet-mapping>
</web-app>


Take Care.
- Mohd Anwar Jamal Faiz

Friday, November 11, 2016

Install and Launch Postman API Testing App in Chrome

The Postman is a post-apocalyptic science fiction novel by David Brin. Oh! come on! I am talking about Postman - The tool for Web API Testing. Postman is a Google Chrome app for interacting with HTTP APIs. It presents you with a friendly GUI for constructing requests and reading responses.

This post is related to the installation steps and way to launch the app in your browser.



1. How to Install Postman API Testing Tool. Where to get it:

Steps:
Search Google "Postman Tool". You will get the link. Or dircetly go to Chrome store at https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en

On the RHS there is Install button. You can click that. And, it will add 'Postman' App in your browser. Once done, the button will become Green saying 'Launch App'

See below:





2. Verify if the Postman App is installed on Chrome

Steps:
Launch the extension Manager in chrome
Shortcut URL: chrome://extensions/
You can check that Postman is there.

See below:





3. How to launch Postman App in Chrome

Steps:
Launch the App launcher. You can separately install another app which acts as launcher to App
But here is a short way too. Which i personally prefer:
Go to Chrome App:
URL: chrome://apps/

See below:



Click Postman to launch it.
The App will open up.

See below:



Now enjoy ;)