Tuesday May 06, 2008

 

 
When creating Visual JSF projects in NetBeans 6.0 (and 6.1) to connect to and execute database operations from a JSF application a data source is created by dragging and dropping a database table to the Design view and right on top of a JSF component.  This creates a JSF binding to the component.  By default the data source name generated is [schema name]_[database product name].  If you're using MySQL then the table name is used instead of the schema name.  To see the name generated for your database connection, for your project in the Projects window, expand the Data Source References node.


 If you want to choose the data source name generated then an option has been added.  Open the Options dialog from the Tools main menu.  Next click the Miscellaneous icon at the top and then click the Visual Web tab.  Next, check the Prompt for Data Source Name checkbox.  



From now on when you drag and drop a database table onto the Design view, a dialog will open allowing you to enter the name of your liking. 

Note, that no error checking is performed, so names with spaces or non alphanumeric characters won't make good data source names.  It's ok to just choose the default name provided.

 


Tuesday Mar 11, 2008

 

Today, I posted the solution (a sample project) for the NetBeans 6.0/6.1 Inserts Updates Deletes tutorial using MySQL.  I'll be posting solutions for other databases on this page.

This tutorial is a JSF application that demonstrates basic CRUD (create, read, update delete) operations on a database.
 


Tuesday Nov 13, 2007


In this entry, I'll explain how to create a simple Visual Web  Java EE 5 application that displays CLOB values from an Oracle database in a Table component.  Here is the supported Oracle driver information for Visual Web


NetBeans Visual Web components support many types of converters to convert data types to String for displaying values in components (Table, StaticText, Dropdown List, ..).


There are however, these in-the-box converters do not support all types, such as database LOB fields (CLOB, BLOB (not blog), BFILE) .  For these, a custom converter is required.


Here is a sample converter that converts a CLOB to a String.    To use this converter with a JSF component, a bean property along with an accessor method must be created to instantiate the converter class*. 


    private Converter myClob = new ClobConverter();

    public Converter getMyClob() {

        return myClob;

    }  

Next, in the JSP source where the component is defined, the converter is set using JSF Expression Language statement to retrieve the value from the property of the bean class, myClob.




 <webuijsf:staticText binding="#{Page1.staticText7}" converter="#{Page1.myClob}" id="staticText7" text="#{currentRow.value['CLOB_COL']}"/> 


Next, converter must be registered in the faces-config.xml file:


 <faces-config version="1.2" 
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">

<converter>
<converter-id>ClobConverter</converter-id>
<converter-class>
webapplication8.ClobConverter
</converter-class>
</converter>
<managed-bean>
<managed-bean-name>SessionBean1</managed-bean-name>
<managed-bean-class>webapplication8.SessionBean1</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>Page1</managed-bean-name>
<managed-bean-class>webapplication8.Page1</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>

...

</faces-config>


Next setup the database.  You can use the pre-registered Derby connection, travel on TRAVEL.


Select this connection, right-click and choose Connect... then again, right-click then choose Execute Command...  and paste the following SQL into the SQL Editor, then click the smaller Green arrow in the toolbar of the SQL Editor.  Note the SQL below is for Oracle.  I can provide the SQL for other databases at the end of this blog entry.


CREATE TABLE clob_table (
id NUMBER PRIMARY KEY,
text VARCHAR(30),
clob_col CLOB
);

INSERT INTO clob_Table VALUES (0, 'RECORD 0', 'COMMENT FOR RECORD 0');
INSERT INTO clob_Table VALUES (1, 'RECORD 1', 'COMMENT FOR RECORD 1');
INSERT INTO clob_Table VALUES (2, 'RECORD 2', 'COMMENT FOR RECORD 2');
INSERT INTO clob_Table VALUES (3, 'RECORD 3', 'COMMENT FOR RECORD 3');



Create a new Web Application using the Visual JSF Framework.  Then, from the Palette, drag and drop a Table component onto the Designer surface.  Next, from the Services tab, expand the travel on TRAVEL connection and drag and drop a CLOB_TABLE onto the Table component (the outline of the component will turn blue)


In order to use this project, modify the setup/sun-resources.xml file for your environment.
Also add the Oracle JDBC driver to the project.

1) Create a new Library in NetBeans (Tools->Libraries) I created a new library named Oracle
add odbc14.jar

2) In the web application, right-click on the project node and select Properties then select Libraries
and add the Oracle library









Next, change from the Design view to the JSP source view and if you haven't already, add the converter option to the StaticText component that is bound to CLOB_COL


    <webuijsf:tableColumn binding="#{Page1.tableColumn6}" headerText="CLOB_COL" id="tableColumn6" sort="CLOB_COL">

       <webuijsf:staticText binding="#{Page1.staticText7}" converter="#{Page1.myClob}" id="staticText7" text="#{currentRow.value['CLOB_COL']}"/>

    </webuijsf:tableColumn> 


And make sure the converter is registered in the faces-config as above.


Finally, you can execute the application.  Your browser should render the Table component as shown in the screenshot.  If the page is blank then in NetBeans, click on the the Output tab at the bottom and then the Glassfish tab.  Scroll to the bottom to check the error.



I'll attach a sample project for reference.


Sample project that connects to Oracle.
To resolve project errors, edit the sun-resources.xml and replace the database settings with your Oracle settings.




Wednesday Dec 06, 2006

NetBeans 5.5 Visual Web Pack released

Available free download is the Visual Web Pack.

After installing NetBeans 5.5 then this pack can be installed for visual drag and drop JavaServer Faces
components with support for binding to Databases, Web Services, Data Providers and Java Persistence
Entity Classes.

Links

* Jim and I gave a brief introduction to Simplifying Data Access using NetBeans 5.5 and Visual Web
Pack. We were still busy fixing bugs so we didn't have much time to prepare, but still there's some
useful info.

** Craig gave a demo on how to create Java Persistence Architecture (JPA) web applications
using Visual Web Pack

Check it out and let us know what you think, by posting to the NetBeans UserForum.
Thanks!

Sunday Nov 26, 2006

Background


In Java Studio Creator 2, to connect a Creator 2 web application to a database, a data source must be created first using the Add Data Source feature in the Server Navigator. Visual Web Pack (VWP) also uses data sources, however, data sources are generated automatically and unfortunately, there is no convenient way to name or rename a data source. See Renaming a Data Source entry.

In VWP, data sources are generated when a database table is dragged and dropped onto a VWP Page or component in a VWP Page (e.g. Page1 that is created when creating a new Visual Web application)

The name of the data source is generated automatically. To see the name of the data source generated, in the Outline, expand the SessionBean (or the bean in which the database table was dropped) and select a rowset node.  Then check the Properties window for the data source property for the name.

Also, JDBC resources are created in the project under the setup folder. To view the resources for a project, with the project opened, switch to the Files tab and expand the setup folder then open the resources file. Resource files will have "extra properties" such as the connection info - username, driver name, database port number, etc.

The data source name must match the JNDI name created in the Application Server JDBC Resources, otherwise,
when executing an application an HTTP 500 error will occur.

A missing data connection means that the data source was not found in the IDE's context.xml and/or no NetBeans database connection and corresponding JDBC Driver reference exists.

Here, I'll describe how to import a project from Creator 2, another Visual Web Pack installation or restored the userdir. For users of the Technology Preview release, see the notes below. Also for more info,
there is a migration document available

VWP Final Release Information

Changes in the final release

  • There is a new Help topic for Data Source References. When the Data Source References node is selected, type the F1 key, or search Help
  • The project node is no longer badged and project name label does not change to red if there are
    unresolved data source references. This change helps some with open-project-performance

  • There is a new Data Source References node and a child node for each Data Source . Expand the project's node to view.

  • The Resolve Database Problems context menu has been replaced by Resolve Data Sources context menu located on the Data Source References node.

  • If a data source is missing then a badge is pinned to the node representing the data source that is missing

Importing a Creator 2 database project


1. User has a database project developed in Java Studio Creator 2 Update 1 and wants to import this project in VWP, or


2. User has developed a new Visual Web database application that contains a rowsets. (if another user wants to use this project or the developer has restored the userdir, then the data sources will not be found)


Here's the steps required for both use cases to resolve missing data connections.

  • Open the project

  • (VWP Technology Preview Only)Project node icon will be badged, in the Projects window

  • missing_datasource_badge.GIF

  • Right-click and select Resolve Database Problem to open a dialog listing the missing database connection(s)

  • missing_datasources.GIF
  • By selecting a Data Source name then clicking the Add connection button, the Add Database Connection dialog will open. Note, a connection has been preconfigured for Java DB, presuming Glassfish has been registered and the IDE has been restarted. If the IDE was not restarted then the user is required to navigate to the location of derbyclient.jar (%GLASSFISH_INSTALL_PATH%\javadb\lib),select the jar and continue with the following steps

  • If the data source to resolve is to a Java DB database then fill in the username, password, JDBC URL and select a validation table.
  • example: parameters for connecting to the Travel database
    • User ID = travel

    • Password = travel

    • Database URL = jdbc:derby://localhost:1527/travel

  • Next, click the Add button and you're done

    add_connection_travel.GIF
  • To resolve a database connection to another database server, the user can either click the Edit New
    button or from the Server Type dropdown select item
    to add a new server type and make the driver jar available. This will open the Edit Database Server Types dialog

missing_database_type.GIF
  • Click the New button to locate the JDBC Driver jar file then click OK

  • This will return you to the Add Connection dialog

  • Fill in the name for the server type, such as the name of the database server plus the parameters for connecting to the desired database.

  • Lastly, click the Add button and you're done.

  • After a successful setup, a new Driver node is added to the Runtime|Databases|Drivers node and a new connection is added to the Runtime|Databases|Connections node

  • add_connection_travel.GIF
  • If the page containing the components bound to rowset(s) is open, refreshing the page will restore the connections (or clicking the Continue button in the Component Error window)

  • For databases used besides Java DB then JDBC drivers must be copied to the Glassfish lib directory in order to execute the application

  • If resources (JNDI/connection pool) haven't been generated on the App Server and JNDI resources have not been added to a project (in the setup folder)
  • Refresh action - new Context menu also on the Data Source References node. Choosing this action will check the status of the Data Sources in the project. This is useful if a Page hadn't been opened and data sources are missing then a badge will be added to the Data Source References node.

    3. A project is opened and data sources have not been created in the context. Choosing to Resolve Data Source(s) adds data sources to the context, plus connection resources. If another project that uses the same data source is opened then previously, then select the Data Source References node, right-click and choose Resolve Data Source(s) . After a few seconds the data sources will be resolved and the project can be deployed

    4. If a user cleans up the App Server by deleting domain1 or removing connections then by choosing to Resolve Data Sources, the connection resources are added to the project so it can be deployed successfully. After removing domain1 folder, use the command

    ant -f setup.xml
    to restore the user domain.

    Notes



    • Since Java DB is not bundled with VWP, when adding a new Connection, the user can navigate to the Derby installation diretory under Glassfish (javadb\lib) to add derbyclient.jar

    • Technology Preview Information

      Importing a Creator 2 database project


      1. User has a database project developed in Java Studio Creator 2 Update 1 and wants to import this project in VWP, or


      2. User has developed a new Visual Web database application that contains a rowsets. (if another user wants to use this project or the developer has restored the userdir, then the data connections will not be found)


      Here's the steps required for both use cases to resolve missing data connections.

      • Open the project

      • (VWP Technology Preview Only)Project node icon will be badged, in the Projects window

      • missing_datasource_badge.GIF
      • Right-click and select Resolve Database Problem to open a dialog listing the missing database connection(s)

      • missing_datasources.GIF
      • By selecting a Data Source name then clicking the Add connection button, the Add Database Connection dialog will open. Note, a connection has been preconfigured for Java DB, presuming Glassfish has been registered and the IDE has been restarted. If the IDE was not restarted then the user is required to navigate to the location of derbyclient.jar (%GLASSFISH_INSTALL_PATH%\javadb\lib),select the jar and continue with the following steps

      • If the data connection to resolve is to a Java DB database then fill in the username, password, JDBC URL and select a validation table.
      • example: parameters for connecting to the Travel database
        • User ID = travel

        • Password = travel

        • Database URL = jdbc:derby://localhost:1527/travel

      • Next, click the Add button and you're done

      add_connection_travel.GIF
    • To resolve a database connection to another database server, the user can either click the Edit New
      button or from the Server Type dropdown select item
      to add a new server type and make the driver jar available. This will open the Edit Database Server Types dialog

    missing_database_type.GIF
  • Click the New button to locate the JDBC Driver jar file then click OK

  • This will return you to the Add Connection dialog

  • Fill in the name for the server type, such as the name of the database server plus the parameters for connecting to the desired database.

  • Lastly, click the Add button and you're done.

  • After a successful setup, a new Driver node is added to the Runtime|Databases|Drivers node and a new connection is added to the Runtime|Databases|Connections node

  • add_connection_travel.GIF
  • If the page containing the components bound to rowset(s) is open, refreshing the page will restore the connections (or clicking the Continue button in the Component Error window)

  • For databases used besides Java DB then JDBC drivers must be copied to the Glassfish lib directory in order to execute the application

  • If resources (JNDI/connection pool) haven't been generated on the App Server and JNDI resources have not been added to a project (in the setup folder)
    3. A project is opened and data sources have not been created in the context. Choosing to Resolve Database Problems adds data sources to the context, plus connection resources. If another project that uses the same data source is opened then previously, Resolve Database Problems won't add the connection resources to the project (this is fixed in the Final Release) *
    4. If a user cleans up the App Server by deleting domain1 or removing connections then by choosing to Resolve Database Problems, the connection resources are added to the project so it can be deployed successfully. After removing domain1 folder, use the command
    ant -f setup.xml
    to restore the user domain.

    Notes



    • Since Java DB is not bundled with VWP, when adding a new Connection, the user can navigate to the Derby installation diretory under Glassfish (javadb\lib) to add derbyclient.jar

    • * Bug (this is fixed in the Final Release)- if more than one project is opened and they use the same data source then data sources can be resolved for only the first project.

      • To resolve data sources for each project


        1. Exit NetBeans

        2. Edit the context.xml file in the userdir (e.g. C:\Documents and Settings\< user >\.netbeans\5.5\context.xml and remove the entry surrounded by <object> </object> corresponding to the data source just added

        3. Restart NetBeans and then resolve the data sources for the other project






    To rename a data source and JNDI name. The Data Source created in Visual Web Pack (VWP) corresponds to
    the JNDI setting on the application server:

    Tomcat workaround
    Glassfish workaround


    Tomcat workaround
    (Workaround provided by a Customer, much appreciated)

    How to rename a datasource to Ciyela.

    1. Define the connection in Runtime > database > New Connection.
    2. Stop IDE.
    3. Edit context.xml, change


    from:
    <object name="dataSource" class="com.sun.rave.sql.DesignTimeDataSource">
    To:
    <object name="Ciyela" class="com.sun.rave.sql.DesignTimeDataSource">

    4. Restart IDE and add the reference to the project.

    At this point I can add RowSets and providers but VWP don't deploy
    connection, just adds the resource reference. The steps to run the
    application on bundled Tomcat are:

    1. Stop Tomcat.
    2. Edit the "ide" user password in $USER_HOME/.netbeans/5.5/apache-tomcat-5.5.17_base/conf/tomcat-users.xml
    3. Edit the password used by IDE to connect to Tomcat: Runtime > Servers > Bundled Tomcat > Properties > Connection > Password.
    4. Copy database's jar (Firebird in my case) to $NET_BEANS_HOME/enterprise3/apache-tomcat-5.5.17/common/lib
    5. Start Tomcat.
    6. Open admin console: Runtime > Servers > Bundled Tomcat > View Admin Console.
    7. Define the data source.
    8. Run the application.


    Glassfish workaround
    1) Switch to the Runtime tab, expand the Servers and delete the JDBC Resources and Connection pools.

    sjsas_resources.GIF

    (Steps 2-5 below apply to a single project and must be done for each project
    that is to use a new JNDI name)

    2) In the project's directory, edit SessionBean1.java and rename the data source name in the _init() method

    e.g. edit

    tripRowSet.setDataSourceName("java:comp/env/jdbc/cpsDataSource");

    3) Open the

    setup/jdbc_dataSource.sun-resource 
    file and change the JNDI setting

    4) Edit

    web/WEB-INF/web.xml 
    and change the setting

    5) Edit

    web/WEB-INF/sun-web.xml 
    and change the and settings

    6) Choose Help->About - Detail to find the User Dir setting

    7) In a text editor, open context.xml (located in the User Dir) and change the name set in the

    object name ... 
    setting

    8) In a text editor, open var/attributes.xml (located in the User Dir) and change the
    attr name="datasource-names" stringvalue= ... setting

    9) Start IDE, then for the project (set as the Main project) choose Build->Clean and Build Main Project

    10) Redeploy the application

    Wednesday Nov 22, 2006

    Sample Database support in Visual Web Pack for NetBeans 5.5

    Visual Web Pack includes a sample database, named Travel

    Travel is installed automatically after Java DB is registered in the IDE.
    Once Java DB is registered, a restart of the IDE is required.

    If the NetBeans userdir is deleted then the same as above applies.

    Java DB can be registered by either installing Sun Java System Application Server 9 (Glassfish)
    or installing manually.

    Java DB (Derby) can be registered by opening Tools->Options - Advanced - IDE Configuration - Server and External Tool Settings - Java DB Database
    Here the installation of Derby is specified along with the path where databases are created (default location is $HOME/.netbeans-derby)





    Before

    After restarting NetBeans, in the Runtime tab there will be a new connection for Travel.





    Before

    More info:

    To use the Travel database in a Visual Web Pack application, in the Runtime tab, open the context menu for the connection
    jdbc:derby://localhost:1527/travel [travel on TRAVEL] then choose connect.
    A login dialog will open - travel is the password

    After the connection is successful, create a new Visual Web Pack project and back in the Runtime tab, expand the Travel connection node, Table
    then click on a table and drag and drop the table to the Design view or on top of a JSF component in the Design view.

    When a table is dropped, a dataprovider instance is created in the Page1 bean class and a JSF binding expression is generated in the JSP source.
    To see bindings, either select a component and the Properties window will reflect the bindings. Alternatively, right-click on the component
    and choose Property Bindings context menu.

    Note, that when exiting NetBeans, Java DB and SJSAS are shut down. After restarting NetBeans, also
    start Java DB, otherwise, the Component Error page will open. If this page opens then start Java DB
    then click the Refresh button located at the top of the Design page (the button with 2 squiggly
    arrows pointing in opposite directions)





    Before

    If the tables and or data are lost for Travel, to restore the databases, a SQL script is included.
    Choose File->Open and navigate to the installation directory of NetBeans 5.5 and open rave2.0/startup/samples/create-Travel-derby.sql
    The SQL editor will open. Then make sure to select the Travel connection from the dropdown in the editor (maximize NetBeans if the dropdown is not
    visible) then click the small green arrow adjacent to the connection dropdown. The Travel tables and data will be restored.

    Look for VWP tutorials coming soon or see the Creator 2 Tutorials, some are still applicable to the Visual Web Pack.
    For more info on Creator 2 to Visual Web Pack, see Winston Prakash's blog

    Thursday Aug 17, 2006

    "More Fun with AJAX




    ferris wheel


    http://developers.sun.com/ajax/

    Get all the info you need to AJAX-enable your web applications on the newly redesigned AJAX website. You'll find more downloads, sample code, and documentation, and more info on surrounding technologies like jMaki, DynaFaces and Phobos. Sign up for free online classes, see demos, and get timely tips from our bloggers. Check out Sun's AJAX site !

    Wednesday Jun 21, 2006

    Just like to pass on this tidbit of info on Java EE 5:


    • FCS version of the Java EE 5 SDK, Sun's Application Server, a SOA Starter Kit Preview, and Tools Bundle. All of these binaries are free and do not require registration.

    • Additionally, there is a Java EE 5 tutorial available

    • Sun has released a new AJAX-enabled Java Pet Store that runs on the Java EE 5 SDK.

    Sunday Apr 09, 2006

    It's been awhile, been busy making sure new Articles and Tutorials are tested and ready
    for the web. Also, testing bug fixes and some changes, TBD. And developing new testcases
    to help identify performance issues.

    Since there hasn't been much documentation on Java Studio Creator's lifecycle, I'll mention
    a couple of common questions about the lifecycle.


    1) (For a Java Studio Creator Web Page) why is backing bean function like bean's constructor, init() ,prerender and others called twice for every page. First when loading the page(which is normal) and second time when leaving the page, e.g clicking a link?


    Here's the order described:

    Use case: Page1 processes a postback and navigates to Page2:
    ------------------------------------------------------------------------------- ----------
    * JSF executes Restore View on Page1

    * Framework calls Page1.init()

    * If the application calls isPostBack() from here through destroy(), it will return true

    * Framework calls Page1.preprocess()

    * JSF executes Apply Request Values, Process Validations, Update Model Values, and Invoke Application on Page1

    * NOTE - Update Model Values is when model data is updated through value bindings

    * JSF creates new view for Page2

    ----------------------------------------------------------------


    To resolve this for code not to be reexecuted when clicking a link (such as
    executing database queries using the CachedRowSet DataProvider, place the code in prerender()

    Here is the expected order of lifecycle methods called for a Page1 to Page2 navigation:


    Page1:init() called
    Page1::beforeApplyRequestValues() called
    Page1::preprocess() called
    Page1::afterApplyRequestValues() called
    Page1::beforeProcessValidations() called
    Page1::afterProcessValidations() called
    Page1::beforeUpdateModelValues() called
    Page1::afterUpdateModelValues() called
    Page1::next button action called
    Page1::beforeRenderResponse() called
    Page2:init() called
    Page2::beforeRenderResponse() called
    Page2::prerender() called
    Page1::afterRenderResponse() called
    Page2::afterRenderResponse() called
    Page1:destroy() called

    2) Same question as #1 except in this case, the code not to execute twice is in a Page Fragment:


    Note: in Creator 2, Page Fragments do not contain a prerender() method.


    Answer from Craig :


    Not having prerender() callbacks in a fragment is a current limitation. In the past, I have worked around this by defining a public method in the fragment's class, and then calling that method from the prerender() method of the surrounding page bean(s). The call would look something like this:


    Fragment1 fragment1 = (Fragment1) getBean("Fragment1");
    fragment1.fakePrerender();


    There are several examples of this technique in the JumpStart Cycles sample application, where it is used to keep the calculations in the price table up to date.


    For more examples and discussion on using the Java Studio Creator lifecycle, see the
    recently revised Tutorial, Understanding Scope and Managed Beans and also see the
    article, Understanding Event Processing Lifecyle

    Thursday Mar 02, 2006

    Well, the Sun Java Studio Creator Forum been brewing for over 2 years...

    Today, March 1, there were 89 posts. Doesn't sound like much of a forum.

    However, to this date, there have been nearly 18,000 posts. This number does include posts made by Sun employees, subtract 300 and counting for me.

    The great thing about the Forum is that there are developers all over the world using our productand the Forum is a resource to help solve a programming puzzle or report defects and suggest usability enhancements for Java Studio Creator.

    We're getting a lot of help from our Community so big pat on the back. I hope we can continue to improve Java Studio Creator and help the developer community produce productive real-world applications. I know of a few developers who have developed applications
    which contain over 50 web pages. This leads to an issue, we are working on to improve - performance.

    The more pages and components an application contains, unfortunately, the more weight on the IDE.

    Back to the Forum, for the first release of Creator, I posted a survey,
    "Survey: Top 3 Usability Issues I" This generated 19 replies and consequently we tried to implement these bugs/enhancements in update releases. I filed bug reports and enhancement requests and also make sure Customer bugs are included in Quality Dashboards. Moving on to the second release of Creator, I decided to
    post the survey again "Survey: Top 3 Usability Issues II" If you check this out, you'll never guess what the issue is "Performance"

    We're doing the best we can to identify areas to be improved. What really helps is if a Developer
    has a project which exhibits performance problems then please email to my alias cfqa-testapps AT sun DOT com

    Don't get me wrong, we do have a few projects, just not many large 50 page projects.

    Thanks to the community again !

    Friday Jan 27, 2006

    Using Sun Java Studio Creator , and executing an application, how could HTTP Status 500 error occur when the server is up and running ???

    The bundled application server is still running, so what's wrong?

    Well, here's a couple of reasons
    1) Database or SQL syntax error
    2) Null pointer exception in your application.

    To find out exactly what went wrong, check the bunder Server log file

    Open Servers window, select the Deployment Server node , right-click and
    choose Server log

    hope this helps

    Update: To retrieve the server log file for Visual WebPack and NetBeans, click on the Runtime tab, select Tomcat, Sun Java System Application Server or JBoss and choose View Server Log. The server log file will appear in the Output window. In the Output window, type Ctrl-A to select all then Ctrl-C to copy. Then the contents can be pasted in an editor or email

    Some of you may have heard of the Sun J2EE application, Adventure Builder Blueprint. To show the types of applications which can be built using Sun Java Studio Creator work was started just
    before EA for JavaOne. Architecturely, the applications are different, but the look and feel is similar.


    Originally AdventureBuilder was developed for Java One by
    Chris Kutler (see the Divas blog) then somehow control of the application changed hands and ended up with another group.


    I didn't hear about for awhile until I started attending the Creator Content meetings. Content is responsible for the Sun Java Studio Creator website, Tutorials, Technical Articles, ... I'm involved with Content since I was assigned the Quality Assurance rep just after the EA2 release of Creator.

    Anyways, Adventure Builder development started in EA. Never never develop production quality software using Beta. Duh! Well lack of time/resources to redo from scratch, I tested, made some enhancements and fixes to the code.

    Since just a couple of Engineers were working on this application and it wasn't a full-time job, the application is not perfect, but I think it's a decent example of how to build an application using Creator.

    Please send me any feedback on this sample application. Thanks!



    Note: if anyone has a Creator-built application which they started in EA, you'll need replace those Buttons with the final-release-version buttons. Best yet, to redevelop from scratch. Some components have really been improved since EA, such as Calendar, Tree and a few others.

    Wednesday Jan 25, 2006

    Top Ten List (new features plus) for Sun Java Studio Creator 2

    It's about time - here it is -
    an awesome, serious Web and Portlet Development Tool

    Search Sun's blogs for lots of talk about the latest Development
    Environment from Sun Microsystems, keyword = Creator

    Taking a page from David Letterman ...

    10. Improved platform - Updated Development Environment UI plus source code Version Control and Task Management

    9. Data Provider

    8. Content Not really a feature but helps users get up-to-speed

    7. Improved Lifecycle

    6. Portlet Support

    5. Asynchronous JavaScript And XML (AJAX) Sample components

    4. EJB client support

    3. CSS Editor

    2. Virtual Forms

    1. New Useful Components

    Friday Oct 14, 2005

    Cool I received some feedback for my new blog ! As requested - here's some screenshots of Dashboards I've created using Sun Java Studio Creator (1.0 and 2.0 EA)

    These applications are used by the Engineering team to help gauge progress. Most have been developed using Creator 1.0, but I have started moving and developing new applications in 2.0 pre-release, which also, in turn helps flush out bugs in 2.0.
    I'll explain in detail later how to create these applications. At a high-level, in 1.0, I stuffed data into an ArrayList which I bound to a JSF Standard DataTable. In 2.0, I stuff data into an Option array which is bound to an ObjectArrayDataProvider and in turn is bound to a new Basic Table component. See the screenshot of the nice looking Table component in 2.0, below.



    Quality Dashboard - dummy data which shows how close we are to meeting our Quality Criteria (fixing Priority 1 defects, Customer defects, etc.)


    1.0 DataTable used to
show data against Quality Criteria


    1.0 DataTable showing dummy defect data for a module of Creator

    1.0 DataTable showing dummy defect data for a module of Creator


    1.0 DataTable showing a Creator metrics scheme I came up with

    1.0 DataTable showing a Creator metrics scheme I came up with


    2.0 EA start page for retrieving Fix/Find defect data

    2.0 EA start page for retrieving Fix/Find defect data


    2.0 Table component showing Fix Find dummy data for the datacomponent module of Creator

    2.0 Table component showing Fix Find dummy data for the datacomponent module of Creator


    Here's a graph produced using JFreeChart from jfree.org produced from dummy data for the datacomponent module of Creator

    Basically JFreeChart is a library added to the Web Application.

    JFreeChart Graph produced from dummy data for the datacomponent module of Creator


    Weekly Defect Fix / Find Rates

    Weekly Defect Fix Find Rates