Beginners guide on PAR files
A Portal application is a collection of components and services. It is a set of files like Java Classes, HTML, JSP, etc. These files when bundled into a single file with extension *.par are known as PAR files.
Portal Archive (PAR) file is standard zip file in which portal applications are packaged. It’s a file with *.par extension.
A Par file contains the following:
- Java Classes
- Web Resources
Java classes in a par file are placed in the Portal-INF folder. The PORTAL-INF folder also contains following sub folders:
- Lib: It containts JAR files which can be referenced from other applications as well.
- Classes: It contains all classes which can be referenced from other applications.
- Private/lib: Contains JAR files to be used only by the application.
- Private/Classes: Contains classes to be used only by the application.
Web Resources in a PAR file are located outside the PORTAL-INF and META-INF folders. These are those files in a PAR file that are accessible directly through a HTTP request (HTML, .CSS, Images, etc).
Manifest is located in META-INF folder and contains the version information about the PAR file.
Fig 1. Overview of a typical PAR file
Steps to download a PAR file from Portal:
We need Portal admin rights to download a PAR file from Portal.
- Logon as a Portal administrator.
- Navigate to System Admin -> Support -> Portal Runtime -> Browse Deployment:
Fig 2. Folder to download portal installable files.
3. Click on Browse Deployment. On the top, there would be “ROOT” option, click on it. It will come up with below structure:
Fig 3. Overview of ROOT folder in Portal runtime.
4. Browse the WEB-INF folder and go to Deployment:
Fig 4. Deployment folder contains list of all PAR files in Portal.
5. Now search and select the PAR file to be downloaded and click on Downloaded. You can save the file on your local system.
Steps to export and deploy a PAR file in NWDS:
- In NWDS, activate the Enterprise Portal toolbar by navigating to Windows -> Open Perspective -> other -> and choose Enterprise Portal.
Fig 5. How to open “EP” perspective in NWDS
2. Open the toolbar, click on the icon on top to export Par files; ’Create/Export PAR’.
Fig 6. Icon/Shortcut to export PAR file in NWDS.
3. Choose the correct Project from the Package Explorer.
4. Click Next.
Fig 7. A typical PAR file export window.
5. Browse for the required PAR file from your system. Check the “Deploy PAR” checkbox.
Fig 8. How to browse Par file to be exported in NWDS.
6. A list of portal servers will appear. Select the correct portal in which you want to deploy the PAR file. If the portal is not coming up in the list, click on “Configure Server Settings” to add a portal connection to the list.
Fig 9. Establishing Portal connection by logging in corresponding
7. Choose Finish.
The PAR file is deployed successfully in the required Portal. You may need clear PCD cache for changes to get reflected.
Steps to upload a PAR file in Portal:
For this you should have System Admin rights in Portal. Portal administrators and developers can upload a PAR file using the Archive Uploader to make it available under PCD.
1. Navigate to System Admin -> Support ->Portal Runtime -> Administration Console:
Fig 10. Archive Uploader tool in Portal to upload PAR files.
2. Browse the PAR file and click UPLOAD.
The PAR file is uploaded successfully and a status message is displayed.
Fig 11. Message displayed after successful upload of PAR file.
Changes as in the uploaded PAR file will then be reflected in Portal. You may need to clear the PCD cache once.