This chapter describes debugging applications as well as deploying the finished product onto one or more Netscape Application Servers.
Compiling Applications
Building EJB Stub and Skeleton Code
Testing Applications
Debugging Applications
Open or select the file.
Choose Register - File(s) from the Build menu.
Netscape Application Builder displays the following information in the output message window:
Select the desired Java code file.
Choose Compile file from the Build menu.
Messages from the compiler appear within the output message window of Netscape Application Builder, as shown in the following illustration. If the compiler finds an error, the location of the error is shown. The messages box that Netscape Application Builder displays allows you to double-click on a line giving the position of a compile error; Netscape Application Builder then displays that specific line of code.
Click Stop to stop the compile process; click Clear to reset the message window.
If the servlet contains no syntax errors, Netscape Application Builder displays the Compiled Successfully message.
From the Build menu, choose Build Project.
Messages from the compiler appear within the output message window of Netscape Application Builder. If the compiler finds an error, the location of the error is shown. The messages box that Netscape Application Builder displays allows you to double-click on a line giving the position of a compile error; Netscape Application Builder then displays that specific line of code.
Testing Queries
Testing HTML Pages and JSPs
Testing Servlets
From the File menu, choose Open to open the desired query file or double-click the query file in the project map window or within the Project window.
Click the Query Properties Results tab.
Netscape Application Builder displays the following dialog box:
To execute the associated SQL code for the specified query, click Execute SQL. Note that you can also right-click the query file from the Project window and select Test to perform this action or from the Test menu, select Test MyQuery_Name.
If you check New Login, Netscape Application Builder displays a dialog box that enables you to specify the following information:
driver
data source
user name
password
If input parameters are required for this query, Netscape Application Builder displays a dialog box for you to specify them. Note that you must place string parameters in single quotes if the query doesn't supply them.
Type the appropriate information for these fields and click OK.
To test the SQL for a new login, click New Login.
If the SQL code contains :<variables>, Netscape Application Builder displays a dialog box for you to enter the associated input parameters.
Click Finish if you are satisfied with the test results; otherwise, continue to edit the associated query SQL until you obtain the correct results. If Netscape Application Builder cannot parse your SQL, all other query editing tabs are disabled except the SQL and Results tabs.
Run your application and access the URL that causes the JSP to be called.
The code is created in the following location:
<NAS>\Apps\compiled_jsp\<appName>\<JSP_name>.java
where <NAS> is the location in which NAS is installed, <appName> is the name of your application (for example, cdx), and <JSP_name> is the name of your JSP.
Add this file to your project as you would any other Java file.
Set breakpoints or perform other debug operations on this file.
Open or select the servlet file.
Choose Test <servlet File Name> from the Test menu.
Netscape Application Builder tests the selected servlet file.