Chris Schalk's J2EE Weblog
This Blog Discusses Tips and Tricks for building J2EE Web Applications with Oracle JDeveloper
        

Chris Schalk's J2EE Weblog

Thursday, October 30, 2003

Now that JDeveloper 10g is downlodable on OTN, I'll be posting more and more helpful tips on J2EE development with JDeveloper 10g and it's cool features..

You're of course welcome to ask questions on JDeveloper 903 as well!


5:43:28 PM    comment []

Wednesday, October 29, 2003

As Requested...

Here's a write up on how to configure Windows Explorer to work with JDeveloper's file navigator for JDeveloper 10g Preview. This is a follow-on to the original posting on how to do this with JDeveloper 903.

The following is a quick "How To" describing how to set up Windows Explorer as an "External Tool" in JDeveloper 10g Preview

  1. In JDeveloper 10g Preview, invoke the "External Tools" wizard. From the main menu: Tools->External Tools... The External Tools wizard will allow you to integrate ANY external tool to use within JDeveloper
  2. Click "Add" to create a new tool entry. Click Next to move to step 2.
  3. Set Program Executable to: <your path to your Windows Explorer>. For example: "C:\WINNT\explorer.exe"
  4. For the "Arguments" field, click "Insert" and Select the "File Directory" macro. You should see "${file.dir}".
  5. Leave the "Run Directory" blank.
  6. Click Next.
  7. You can set the "Caption for Menu Items" to "Windows Explorer".
  8. You can also add a "Tooltip".
  9. You can define an icon or accept a default one if it exists. Click Next.
  10. In Step 4, I like to check the following: Tools Menu, Navigator Context Menu, Code Editor Context Menu. (The Navigator Context Menu is a MUST!)
  11. Step 5. Availability. Check when you want to the tool to appear. For Windows explorer I prefer always. but you can also specify when you want the explorer tool to appear.. This is actually a little easier than 903...
  12. Click Ok to dismiss the initial dialog and...
  13. That's it! You should now be able to invoke Windows explorer from JDeveloper 10g Preview!

 


5:19:25 PM    comment []

Tuesday, October 21, 2003

By the way, the process for setting up external tools is slightly different in JDeveloper 10g (905). I can post this as well if people are interested..


6:10:04 PM    comment []

Question..

Have you ever been using using the JDeveloper file navigator and wishing you could immediately drill down to the filesystem so you could quickly create a new subfolder, rename or delete files etc? Is this even possible?

Yes!

You may be surprised how easy it is to configure an external file browser such as Windows Explorer to work with JDeveloper's file navigator. For example you could browse through a JDeveloper project or workspace and immediately be able to launch Windows Explorer at the location of the files you are pointing to in the navigator.

Here's how!

The following is a quick "How To" describing how to set up Windows Explorer as an "External Tool" in JDeveloper 9.0.3.

  1. In JDeveloper 9.0.3 invoke the "External Tools" wizard. From the main menu: Tools->External Tools... The External Tools wizard will allow you to integrate ANY external tool to use within JDeveloper
  2. On the first tabbed page of the wizard click "Add" to create a new tool entry.
  3. Name the tool "Windows Explorer".
  4. You can even set a Tooltip.
  5. If needed, customize the icon. You can use a JDeveloper provided icon or your own.
  6. Click on the "Details" tab.
  7. Set the "Executable:" to the location of your windows file explorer. For example: "C:\WINNT\explorer.exe"
  8. Set "Run in Directory:" to {ParentDir}.
  9. Set "Arguments:" to {ParentDir}.
  10. Click on the "Details" tab.
  11. Check where you want the tool to appear as an option. I prefer on the "Navigator Context Menu" as well as the "Tools Menu".
  12. Click on the "Enablement" tab.
  13. Check when you want to the tool to appear. For Windows explorer I prefer always. For other tools which may only work on certain filetypes, you could set up a regular expression rule which only invokes the tool for cetain files.
    Here's an example from the contextual help:
    For Java files:
    .java$
    For Java, JSP and XML files:
    .java$| .jsp$| .xml$
  14. That's it! You should now be able to invoke Windows explorer from JDeveloper!

11:50:52 AM    comment []

Monday, October 13, 2003

A while back I wrote an article for Oracle Magazine on JSTL but I started receiving some questions on how to set up JDeveloper 903 to use JSTL.
So here's a simple "how to" which shows how to get JSTL running with Oracle9i JDeveloper 903.

Before I start, here's a quick FYI about JSTL and JfDeveloper 10g. JSTL is currently integrated into JDeveloper 10g Preview which is currently downloadable at OTN.

But for those who are still using the current production version of Oracle9i JDeveloper version 9.0.3, here's how to configure JDev to use JSTL.

1. First of all download JSTL 1.0 from Jakarta.apache.com. Save and extract this file to a subdirectory such as: d:\jstl104. (I'll be referring to this directory later on!)

2.Now launch JDeveloper 903. You will now add JSTL tag libraries to the Component Palette.

3. To test your work, create a new Workspace and a new Project. In the project create a new JSP. As the JSP appears in the editor so will the JSP Component Palette. (On the right side..)

4. If you're not familiar with the Component Palette, Get familiar with it! The Component Palette is the JSP developer's best friend! Notice the drop down list at the top of the Component Palette (CP)? This allows you to select different "Pages" of the palette and each page can contain tags from JSP tag libraries. (The CP also supports other components as well..)

5. Now let's add the "JSTL Core" tag library to JDeveloper. On the main menu select Tools->Manage Libraries. There you'll see all the libraries that JDev has configured. Click on the tab "JSP Libraries".

5. Now Click "New". Enter a location for the TLD. Click on the "Browse" button and locate the JSTL Core library's TLD file: "D:\jstl104\jakarta-taglibs-standard-1.0.4\tld\c.tld".

6. If all goes well the URI should automatically be filled in:"http://java.sun.com/jstl/core".

7. Now locate the taglib Archive. This is the Jar file that contains the JSTL tag handler classes: jstl.jar or: "D:\jstl104\jakarta-taglibs-standard-1.0.4\lib\jstl.jar".

8. Now set the prefix to "c" and click "Ok" to dismiss the wizard. Now JDeveloper is aware of this tag library. Our next step is to add a new Component Palette "page" and add this tag library to it.

9. On the Component Palette right-click and select "Properties". You can also use Tool->Configure Palette... on the menu. A dialog will appear which allows you to configure the Component Palette. First we'll add a new "Page" to the Palette. On the left side of the dialog click on "Add". Name the page "JSTL Core" and select a "jsp" page type.

10. On the right side of the same dialog click "Add..". You should see a new dialog asking to "Select a Tag..". You should see a tree with all of the JSP tag libraries. Locate the new JSTL tag library "c". Click on the tag library and click "Ok". Note: You don't need to drill down inside of the tag library, just click on "c" and click "Ok". You should see a confirmation message: "Install Tag(s)?", click "Yes". What this means is that it will install the entire JSTL Core tag library onto the Component Palette.

11. From now on when you edit a JSP you will have access to the JSTL Core tag library on the Component Palette.

Creating the JSTL System Library

Now that we've added the JSTL Core tag library we'll still need to make sure that we can compile a project with JSTL tags. For this we'll create a new JDeveloper library called "JSTL 1.0.4". This library will contain references to all of the required jar files for a JSTL application.

1. To create a new JDev Library, select Tools->Manage Libraries from the menu. This time we'll be creating a new "System Library". In the dialog click on the "System Library" node and click "New".

2. Name the library "JSTL 1.0.4".

3. For the Classpath, click on "Edit" and then "Add Entry".

4. Now locate the JSTL Home directory and find the required jar files.
D:\jstl104\jakarta-taglibs-standard-1.0.4\libdom.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libjaxen-full.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libjaxp-api.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libjdbc2_0-stdext.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libjstl.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libsax.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libsaxpath.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libstandard.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libxalan.jar;
D:\jstl104\jakarta-taglibs-standard-1.0.4\libxercesImpl.jar

Select all of these jar files and add them to this library. This single library will now contain all of these jar files. Click "Ok" twice to continue.

5. Our next step is to add our new "JSTL 1.0.4" library to our current project. This is done by double-clicking on the current project to edit it's project properties. In the "Available Libraries" locate "JSTL 1.0.4" and shuttle it over to the "Selected Libraries". This project should now compile when JSTL tag are added to any JSP page.

6. As a homework assignment, you can add the other JSTL libraries to the Palette.(fmt, XML ..)

7. A note on deployment. When you construct your deployment profile, be sure to include the JSTL jar files in the WEB-INF/lib sub directory so the app will still run in the deployed environment!

Well that about does it for getting JSTL to work with JDeveloper 9.0.3! Hope this help!

 


3:41:08 PM    comment []

Hello!
Welcome to my new Blog!

This blog will focus on visual Web development with Oracle JDeveloper.
Specifically I'll be sharing tips and tricks on how to build J2EE Web apps with the latest versions of JDeveloper. Some of the features I'll be providing help with are the upcoming visual JSP editor, Visual page flow designer, Struts, BC4J etc..

A little background on me...

My name is Chris Schalk and I am a product manager for Oracle JDeveloper. I happen to manage the Thin client development feature team which basically covers all of the thin client or Web development features..
In previous years I've been in software development and technical marketing roles at Oracle and IBM..

Thanks for looking me up! :)
I'll be posting as many Web development tips and tricks as I can....

Thanks,
-Chris
3:39:38 PM    comment []



© Copyright 2005 Chris Schalk. Click here to send an email to the editor of this weblog.
Last update: 2/23/2005; 1:45:15 PM.