Java controls that you create can provide a convenient place to store complex logic while providing a simple interface for application developers. This topic describes how you can create a new control for use in an existing application.
For a step-by-step introduction to creating Java controls, see Tutorial: Java Control.
To Create a New Custom Java Control in an Existing Project
It is not necessary to create a new folder, but you may find that it is a convenient way to keep your control souce files separate from the rest of your application's code. For example, if you were writing an application that handled internal purchasing, you might put controls that handle tax processing in a taxLogic subfolder of your project.
Note that you can simply begin typing — WebLogic Workshop will preserve the file extension.
You can now add functionality to the control. For more information, see How Do I: Begin a New Custom Java Control?.
To Use a Custom Java Control from Within a Project
For example, if you want to call the control's methods from a web service, open the JWS file in Design View. You can also use your Java control from within a Java page flow or JavaServer Pages file.
The result of adding the control will be different, depending on whether you're using it from a web service (JWS), JavaServer Pages file (JSP), or page flow (JPF). The control you added should be visible in the Data Palette.
The SamplesApp application installed with WebLogic Workshop provides several sample custom Java controls. Look for these in the WebServices project, in the localControls subfolder.