...
Netbeans 5.5(.1) comes with a bundled version of Tomcat (5.5.17). This is convenient as it offers developers an easy out-of-the-box solution for developing web applications. However it is problematic with uPortal 2.6.0 GA. Netbeans includes 2 additional jars in it's the common/endorsed
directory in the bundled Tomcat (xml-apis.jar and xercesImpl.jar) that are not included with Tomcat as it is downloaded from Apache.
...
You can use Netbeans with uPortal 2.6.0 bu by following these steps:
- Download and unzip a 5.5.x version of Tomcat to a directory of your choice (say C:\tomcat\apache-tomcat-5.5.23)
- Edit the tomcat-users.xml file in the conf directory to add a manager role and a user for that role. For example, you can add the lines:
Code Block xml xml <role rolename="manager"/> <user username="uportal" password="tomcat" roles="manager"/>
- In Netbeans, add the tomcat server.
- Open the Runtime view (Window | Runtime from the main menu or Ctrl+5).
- On the Servers node, right-click and select "Add Server...". This will start the "Add Server Instance" wizard.
- In the "Add Server Instance" dialog, choose Tomcat 5.5 from the "Server:" combobox
- In the "Name:" field, enter a name for your Tomcat instance (e.g. uPortal 2.6.0GA in Tomcat 5.5.23).
- Click the "Next > " button.
- In the "Add Server Instance" dialog, enter the path to your Tomcat install in the "Catalina Home:" field.
- If you want to specify a separate directory for your Catalina Base directory, check the "Use Private Configuration Folder (Catalina Base)" checkbox.
- Enter the name of the manager you entered in your tomcat-users.xml file in the "Username:" and "Password:" fields.
- Click the "Finish" button.
- You will see your new server instance under the "Servers" node in the "Runtime" view.
- Set up uPortal as a web project in Netbeans. See Gregg Sporar's 4-part series for configuring uPortal to take advantage of Netbeans' IDE features. There are some Tomcat items that don't apply with the current version of uPortal.
- Open the Files view (Window | Files from the main menu or Ctrl+2).
- Open the
build.properties
file. - Set the
server.home
andserver.base
properties and save the file. - Run the initportal target.
- Start the new Tomcat instance in Netbeans from the Runtime view.
- Expand the Tomcat instance node and then expand the "Web Applications" node. Right-click on uPortal and select "Open in Browser"
...