Building and Running atom-feed in NetBeans IDE 5.5.1
- Select File→Open Project in NetBeans IDE 5.5.1.
- Navigate to swdp.tutorial.home/examples/atom, select atom-feed, and click OK.
- Right click on the atom-feed application in
the Projects pane and select Run Project.
This will compile the classes, package the files into a WAR file, deploy the WAR to your Application Server 9.1 instance, and open a web browser to the following URL:
http://server:server port/atom-feed/faces/index.jsp
This page has an HTML form for creating users
Note - On subsequent deployment of the atom-feed example, or if you have deployed an application that uses the Java Persistence API's automatic primary key generation, you may see warnings on deployment about the SEQUENCE table already existing. These may be safely ignored.
- Enter the login ID and password for the new Atom user and click
Submit.
The user will be added to the database, and you'll be sent to the logon page.
- Enter the login ID and password and click Submit.
After authenticating your username and password against the Atom feed URI, you'll then be sent to a page displaying the current blog entries. The first time you log in, there are no entries, so the table will be empty.
- Click Add Entry.
- Enter the title and content of the blog entry and click Submit.
The entry will be created and added to the collection, and you'll be sent to a page that shows all the entries in the Atom feed's collection.
Building and Running atom-feed with
Ant
- Make sure your JavaDB instance is running.
- Open a terminal prompt and navigate to swdp.tutorial.home/examples/atom/atom-feed.
- Right click on the atom-feed application in the Projects pane and select Run Project.
- Enter ant and press Enter.
This will build and package the atom-feed.war web application.
- Enter ant deploy and press Enter.
This will deploy atom-feed.war to Application Server 9.1.
On deployment, the database tables will be created in the default JavaDB database.
Note - On subsequent deployment of the atom-feed example, or if you have deployed an application that uses the Java Persistence API's automatic primary key generation, you may see warnings on deployment about the SEQUENCE table already existing. These may be safely ignored.
- In a web browser navigate to:
http://server:server port/atom-feed/faces/index.jsp
This page has an HTML form for creating Atom users.
- Enter the login ID and password for the new Atom user and click
Submit.
The user will be added to the database, and you'll be sent to the logon page.
- Enter the login ID and password and click Submit.
After authenticating your username and password against the Atom feed URI, you'll then be sent to a page displaying the current blog entries. The first time you log in, there are no entries, so the table will be empty.
- Click Add Entry.
- Enter the title and content of the blog entry and click Submit.
The entry will be created and added to the collection, and you'll be sent to a page that shows all the entries in the Atom feed's collection.