programming guide - intra-mart · 1.5.1.2 javaee development framework 10 1.5.1.3 advantage in...

166
ii Programming Guide JavaEE Development Model Ver 6.1

Upload: others

Post on 27-Feb-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

ii

Programming Guide JavaEE Development Model

Ver 6.1

Page 2: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

iii

Revision History

Revised Date Revised Content

2007/07/31 Ver6.1 First Edition

2007/08/31 Ver6.1 Second Edition API List Storage Location has been corrected in ”1.3.1 API List Storage Location” Storage Location of documents has been corrected in “1.6.1 JavaEE Framework Programming Storage Location of Sample Resuorce has been corrected in ”3.1.3.1 Creating Link to Display “Download”

Page 3: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

iv

Chapter 1 Introduction 1

1.1 Starting up and Exiting intra-mart 2 1.1.1 Login to intra-mart 2 1.1.2 Logout from intra-mart 3

1.2 Menu Structure of intra-mart 4 1.2.1 Displaying Menu 4 1.2.2 intra-mart Home Page 5

1.3 Viewing API List 6 1.3.1 API List Storage Location 6 1.3.2 API Operation 6

1.4 2 Web Application Models 7 1.4.1 Script Development Model 7 1.4.2 JavaEE Development Model 7 1.4.3 Mixing of Applications Developed by 2 Models 7 1.4.4 File Storage Location 8

1.4.4.1 intra-mart WebPlatform 8 1.4.4.2 intra-mart AppFramework 8

1.5 intra-mart Application Development Guideline 9 1.5.1 Application Development using JavaEE Development Model 9

1.5.1.1 Various Java Component Group (im-BizAPI) 9 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11

1.6 JavaEE Development 12 1.6.1 JavaEE Framework Programming 12 1.6.2 Using Various Java Component Group (im-BizAPI) 13

Chapter 2 im-JavaEE Framework Programming 15

2.1 Framework Producer 16 2.2 Initial Setting 17

2.2.1 Debug Server Installation 17 2.2.2 Licsence Installation 18 2.2.3 Project Initial data Setting 18 2.2.4 Displaying Perspective 19

2.2.4.1 Changing Perspective 19 2.2.4.2 Displaying Button to Change Perspective 20

2.3 Creating Web Project 21 2.3.1 Creating New Project 21 2.3.2 Environment Creating for Framework Producer 24 2.3.3 Importing Configuration Files 26 2.3.4 Setting Dynamic Parameter 28 2.3.5 Saving Files and Exporting Configuration Files 29

2.4 Directory Structure 30 2.4.1 Package Explorer Directory Structure 30 2.4.2 Filter 31

2.4.2.1 Setting 31 2.5 Creating Components 33

2.5.1 Creating Files for im-JavaEE Framework 33 2.5.2 Service Framework 35

2.5.2.1 Setting Page Transition 35 2.5.2.2 Editing JSP Program 38 2.5.2.3 Adding Service 50 2.5.2.4 Creating ServiceController 51 2.5.2.5 Adding Connection 52 2.5.2.6 Editing java Program 53 2.5.2.7 Setting Service Result 54

Page 4: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

v

2.5.2.8 Wizard to Create ServiceController Class 56 2.5.3 Event Framework 59

2.5.3.1 Setting Event ID 59 2.5.3.2 Creating Event 60 2.5.3.3 Creating Event Result 62 2.5.3.4 Setting Event Listner Factory 64 2.5.3.5 Creating Event Listner Class ―Skeleton ― 65 2.5.3.6 Creating Event Listner Class ― New ― 67

2.5.4 Data Framework 71 2.5.4.1 Setting DAO Group 71 2.5.4.2 Creating Group Model 72 2.5.4.3 Creating DAO Interface 76 2.5.4.4 Creating DAO 77

2.6 Execution 83 2.7 Debug 85 2.8 Other Functions 88

2.8.1 Displaying Line No. of Java Program 88 2.8.2 Changing Name of Java Program 90 2.8.3 Changing Location of Java Program Package 91 2.8.4 Java Compiler Option 91 2.8.5 Changing Screen Size to Edit Service Framework 93 2.8.6 Setting im-JSP Editter 95

Chapter 3 Using Various Java Component Groups(im-BizAPI) 98

3.1 Using the Storage Service 99 3.1.1 File Upload 99 3.1.2 Displaying File List 102 3.1.3 File Download 104

3.1.3.1 Creating Link to Display “Download” 105 3.1.4 Deleting Files 106

3.2 Sending E-Mails 108 3.2.1 Creating Form for Sending E-Mail 108 3.2.2 Sending E-mail with Attachment File 110

3.3 Calling External Processes 113 3.3.1 Sample 113

3.4 Handling XML Data 114 3.4.1 XML Parser and Retrieving Data 114

3.5 Debugging Process 115 3.6 Linkages with Script Development Model 117

3.6.1 Displaying Framework Pages without Using Menu 117 3.6.2 Transiting from Script Development Model Page to Framework Page 117

3.7 Embedding & Operating the Modules 118 3.7.1 User Interface Tier 119

3.7.1.1 Screen Common Module 119 3.7.1.2 Graph Drawing Module (Presentation Page) 122 3.7.1.3 Access Controler Module 124

3.7.2 Business Logic Tier 125 3.7.2.1 Application Common Module 125 3.7.2.2 E-mail Related Modules 125 3.7.2.3 External Software Connection Module 126 3.7.2.4 ERP Access Module 127

3.7.3 Business Fundamental Tool 127 3.7.3.1 Access Security Module 127 3.7.3.2 Workflow Module 128 3.7.3.3 Business Process Workflow Module 128 3.7.3.4 Batch Control Module 129

Page 5: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

vi

3.7.3.5 Portal Module 129 3.7.3.6 ViewCreator 130

3.8 Embedding & Operating the Units 132 3.8.1 Application Common Master Unit 132 3.8.2 Calendar Unit 132

3.8.2.1 Calling the Calendar Unit 133 3.8.2.2 Receiving Calendar Data 133 3.8.2.3 Calendar Master Maintenance 133

3.8.3 Tree View Unit 134 3.8.4 i-mode unit 134

3.8.4.1 i-mode Setting in Page Management Master Maintenance 134 3.8.4.2 Setting i-mode Address and Password 135 3.8.4.3 Out-of-Office Setting for i-mode 136

3.9 Embedding & Operating the Extension Modules 137 3.9.1 Screen Common Module Extension 137

3.9.1.1 IM-Curl 137 3.9.2 Printing Form Module Extension 139

3.9.2.1 IM-PDF Designer 139 3.9.2.2 IM-X Server 141

3.9.3 Access Security Module Extension 142 3.9.3.1 IM-SecureSignOn (Secure Sign On) 142 3.9.3.2 IM-SecureBlocker 144

3.9.4 Workflow Module Extension 145 3.9.4.1 IM-Workflow Designer (Bundled with Advanced Version) 145 3.9.4.2 IM- FormatCreator 145 3.9.4.3 IM-EX Application System 145 3.9.4.4 IM-SonicESB 146

3.9.5 Solution to Link Up with External Software 147 3.9.5.1 Integrated Search Solution 147 3.9.5.2 Multi Device Solutions 147

3.10 Other Functions 148 3.10.1 Source Security Function 148 3.10.2 Application Lock Function 148 3.10.3 Unique Information Retrieval Function 148 3.10.4 File Operation 148 3.10.5 SQL Query 149 3.10.6 Calling the Trigger Function upon Database Error 149 3.10.7 Linkage with LDAP 149 3.10.8 Internationalization 150 3.10.9 Creating Standard Screen (Common Screen Design) 150 3.10.10 Using Portal Page 150 3.10.11 Shortcut Access Function 151

Chapter 4 Appendix 153

4.1 Message Settings 154 4.2 Reserved Word List 155 4.3 Restrictions 156

4.3.1 File Name 156 4.3.2 ID, Code 156 4.3.3 JS Function 156

Page 6: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

vii

Page 7: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE
Page 8: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.1 Starting up and Exiting intra-mart

Programming Guide - JavaEE Development Model Version 1

Chapter 1 Introduction

Page 9: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

2 intra-mart WebPlatform/AppFramework

1.1 Starting up and Exiting

intra-mart Since intra-mart is a Web-based development tool, the activation and termination methods are different from those of

normal applications. With a Web-based application, the users use a web-browser to “log in” to use the system and “log

out” to terminate the system.

1.1.1 Login to intra-mart The login URL of intra-mart varies for the System Administrators, Login Group Administrators, and General Users. The

following is the login procedure for Login Group Administrator. For the System Administrators and Users, please refer

to the “Administrator Guide”.

1 Start up a browser and type in the intra-mart URL as shown below. The intra-mart’s login screen will be displayed on the screen page.

intra-mart WebPlatform (Standalone) :http://machineaddress/imart/(login group name).manager (Distributed System) :URL matched to the registered content of the web server connector

intra-mart AppFramework :URL matched to the registered content of intra-mart at the web application server

If intra-mart WebPlatform is operated in stand-alone mode, the port number of URL (port of the web server) can be specified at the time of installation.

It is recommended to bookmark the URL for convenience. There is also “Auto Authentication without Login Screen” (→ refer to the column on the P.3).

2 Enter user code and password on the login screen, and click on the [Login] button.

<intra-mart’s Login screen>

Page 10: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.1 Starting up and Exiting intra-mart

Programming Guide - JavaEE Development Model Version 3

The source file of the Login screen and Login default page can be found at the following location. %ResourceService%/pages/platform/src/system/securty

<intra-mart’s default page>

The main page of the default page (in the right frame) is a portal screen. By creating new portlets and registering to the portal function, various kinds of information can be displayed by default.

1.1.2 Logout from intra-mart Go back to login screen to log out from the intra-mart to terminate the session. Click on the [LOGOUT] button at the top of

the menu of the left side of the screen to go back to the login screen.

If a browser was closed without clicking on the [LOGOUT] button, or the user left the intra-mart screen by going to another page, the user is considered logged onto the intra-mart server until the session time out. Please make sure to click on the menu’s [LOGOUT] button.

Automatic Authentication without Login Screen

You can automatically make authentication without going through the login screen by including the user code and password in the login URL of intra-mart as shown below. ■System Administrator http:/intra-mart/imart/system.admin?im_user=usercode&im_password=password ■Login Group Administrator http:/intra-mart/imart/logingroupname.manager?im_user=usercode&im_password=password ■Users

http://intramart/imart/logingroupname.portal?im_user=usercode&im_password=password

Page 11: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

4 intra-mart WebPlatform/AppFramework

1.2 Menu Structure of

intra-mart intra-mart’s menu display format consists of “Folder” and “Page”, and specific page will be displayed when it is selected.

The folders can be registered to any tier, and used to consolidate all the pages that are under its scope.

Since the availability of folders and pages is dependent on the access rights of each login user, the actual page view may

differ from those shown in this manual.

<Relationship between Folders and Pages>

1.2.1 Displaying Menu intra-mart’s menu is displayed in tree structure on the left frame of the screen. If you click on the “Folder”, a main item, all

the “Pages” under the folder will be displayed on the tree. Then, select a “Page” to display the corresponding page

content.

< Example of Menu Display Page >

Page 12: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.2 Menu Structure of intra-mart

Programming Guide - JavaEE Development Model Version 5

1.2.2 intra-mart Home Page Home page is the default page displayed when you log onto intra-mart. If the user had navigated to other screens

through selection of the menu items, clicking on the [HOME] button in the upper left corner of the screen will bring the

user back to the Home page.

The user can switch over to the intra-mart’s portal screen from the home page, by using the tab located at the upper-left

of the right frame screen.

[HOME] Button To return to the Home page. The Home page is the default page that is displayed when the user login into intra-mart. He/she can also switch to a portal screen (if there are any) from the Home page.

[LOGOUT] Button Terminate intra-mart session and return to the Login screen.

[MENU ON/OFF] Button Turn ON/OFF the menu on the left-hand side. Once the menu is OFF, the

working screen becomes more spacious and easier to work on. You can

configure On/Off status of the menu directly after login in [Attribute Setting]

menu.

[Portal Switching] Tab You can switch the portal screens using this tab. Please refer to “2.9 Portal Settings and Operations” and “3.4 Using Portal” of the “Administrator Guide” on the details of portal screens.

My Menu You can register your frequently used menu as “My Menu”. You can

configure the menu in the top of the screen page or the top of the left menu.

Page 13: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

6 intra-mart WebPlatform/AppFramework

1.3 Viewing API List The API List contains the descriptions of the specifications of various functions and APIs which are available on the

intra-mart WebPlatform/Framework. It can be used as reference material during development. The API List comes in

both HTML file as well as Windows default Help file formats. The user can either select it from the category menu of the

left, or implement a full-text search using the [Search] tab.

1.3.1 API List Storage Location API List is stored at the following location in the Installation CD.

apilist_v61.zip

The following menu will appear if choosing to display the “API” list.

<API List>

1.3.2 API Operation Click on a module name of any category from the [Content] tab on the left-hand side to display the contents of the module.

The users can use the [Search] tab to run a search of any object. The [Keyword] tab is not in use at the present point.

Page 14: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.4 2 Web Application Models

Programming Guide - JavaEE Development Model Version 7

1.4 2 Web Application Models intra-mart comes with 2 development models, the “Script Development Model” and the “JavaEE Development Model”.

They have unique characteristics and can be used for different purposes. Web applications developed using two different

models can also be mixed together in a single system. Since both development models are able to utilize intra-mart’s

default frameworks such as Access Security module and Workflow module, they are highly productive.

1.4.1 Script Development Model This is a script development model like ColdFusion and Microsoft ActiveServerPage. In intra-mart, it becomes possible to

develop web system using HTML (that are used normally for creating web pages) and Server Side Java Script that

interacts with database. As it is easy and simple even for a beginner, staff education/training cost can be considerably

reduced by implementing this model. Even for those who do not have sufficient experience in creating web pages, the

web operation pages creation process can be mastered in 2 weeks to 1 month time period. Another advantage is that

because the development is as easy as creating web pages, it can flexibly cater to complex web system that needs to be

updated frequently. Furthermore, depending on the Developer’s technical skill level, he/she can also call Java

(Class/EJB), C++ or Stored Procedure without hassle from JavaScript.

Please refer to “Programming Guide: Script Development Model” for script development model.

1.4.2 JavaEE Development Model JavaEE (Java EnterpriseEdition) is a platform released in September 1999, by Sun Microsystems Inc. It consists of

Servlet, JSP (JavaServerPages), and EJB (EnterpriseJavaBeans), and use MVC model (Model-View-Controller) for the

system architecture. It is especially suitable for systems that have high transaction concentration.

This guidebook has description on JavaEE Development Model.

1.4.3 Mixing of Applications Developed by 2 Models intra-mart WebPlatform/AppFramework allows web applications developed by these 2 development models to be used

together in one system. For instance, the development of web system with low-budget and short time line can use the

Script Model primarily, and then part of the system where intensive transaction is expected can be separated out to utilize

JavaEE Model. Indeed, this practical and flexible development style will complement each other’s deficiencies; enormous

development cost due to the need of highly skilled Developers for class design and Java experts for JavaEE

Development Model and slow speed for large scale transaction process for Script Development Model.

Please also refer to the Administrator Guide on the program development as well as this document.

Page 15: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

8 intra-mart WebPlatform/AppFramework

1.4.4 File Storage Location The files of intra-mart WebPlatform/AppFramework are stored at the following locations.

1.4.4.1 intra-mart WebPlatform

Static Contents (e.g. HTML files and image files, etc.) Under the Installation Directory of the Web Server Connector (For standalone system, under the directory right under an installation directory of the Server Module)

Script Development Model Program (Presentation Page (.html), Function Container (.js) ) Under “%Resrouce Service%/pages/” directory

JavaEE Development Model Program(JSP)(JSP files(.jsp, .xtp)) Under “%Application Runtime%(For standalone system, server module)/doc/” directory

JavaEE Development Model Program(Servlet)(JAVA Class files(.class)) Under “WEB-INF/classes/” within the relevant directory under “%Application Runtime%(For standalone system, server module)/doc/” directory.(or, within the directory set as a class path)

Files to be managed centrally by Storage Service Within “%Storage Service%/storage/” directory

1.4.4.2 intra-mart AppFramework

Static Contents (e.g. HTML files and image files, etc.) Under the “doc/” directory immediately beneath the Installation Directory of the Framework Server (For standalone system, under the directory right under an installation directory of the Server Module)

Script Development Model Program (Presentation Page(.html), Function Container(.js))

Under “%Resrouce Service%/pages/” directory

JavaEE Development Model Program(JSP)(JSP files(.jsp)) Under “%Application Runtime%(For standalone system, server module)/doc/” directory

JavaEE Development Model Program(Servlet)(JAVA Class files(.class)) Under “WEB-INF/classes/” within the relevant directory under “%Application Runtime%( For standalone system, server module)/doc/” directory or within the directory set as a class path)

Files to be managed centrally by Storage Service Under “%Storage Service%/storage/” directory

Page 16: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.5 intra-mart Application Development Guideline

Programming Guide - JavaEE Development Model Version 9

1.5 intra-mart Application

Development Guideline JavaEE Development Model utilizes JSP files, Servlet, and EJB components to develop the system. With the use of

JavaEE Framework, it is possible to improve the productivity substantially.

1.5.1 Application Development using ScriptJavaEE Development Model As a common platform that is independent from OS or web application server, JavaEE is becoming popular for web

system development. However, since development with JavaEE is Java-based, there are some difficulties such as the

need of advanced knowledge and experiences in dealing with object oriented programming, and strong preliminary

knowledge on JavaEE. Furthermore, JavaEE allows for freedom to program as long as the programs conform to JavaEE

development standards, which might turn out to be even a burden for beginners, and lead to varying development style

by different system engineers. intra-mart WebPlatform/AppFramework solves these problems by using the JavaEE

Framework (im-JavaEE Framework), which substantially improves the productivity of JavaEE Development Model.

1.5.1.1 Various Java Component Group (im-BizAPI)

IntraMart WebPlatform/AppFramework features wide selection of functions often used in web system development as

“Java Components” and they are reusable as JavaClass or EJB components (such as “Access Security Module”,

“Printing Form Module”, “Workflow Module” and “Portal Module”). Using these “Java Components” in framework

enables the building of large-scale high quality sophisticated web system in significantly short period of time without

having to code the complicated functions from scratch.

(For JavaEE Development Model)

Page 17: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

10 intra-mart WebPlatform/AppFramework

1.5.1.2 JavaEE Development Framework

JavaEE Web system development tends to have many structural repetitions. By making full use of these characteristics,

it is possible to improve the development productivity greatly.

With intra-mart, all common processes required by JavaEE development are available as framework, and developers are

only required to create components for the system.

As shown in the framework section above, the framework can be generally classified into “Java Business Component Group (im-BizAPI)” and “JavaEE Framework (im-JavaEE Framework)”. Java Component Module groups (such as Workflow module and Access Security module, etc.) of intra-mart WebPlatform are all placed in “Java Business Component Group (im-BizAPI)”. The common processes required by JavaEE development are all placed in “JavaEE Framework (im-JavaEE Framework)”.

For the components using this framework, the productivity is further improved by the available “skeletons”, which are like

templates (as common processes are embedded, you can copy the skeleton first and fill up the rest to complete the

component). Created components are activated by fitting them into the framework using the property settings.

Page 18: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.5 intra-mart Application Development Guideline

Programming Guide - JavaEE Development Model Version 11

Framework uses a common structure that utilize 4 tiers (Client tier, Web tier, EJB tier, and EIS tier), as defined in JavaEE

(compliance with Sun Micro system’s BluePrint), but developers do not need to be aware of the fact (it is possible to

change the structure later to accommodate with the system size by simply modifying the configuration file).

1.5.1.3 Advantage in using Framework with JavaEE Development

Model

Below is a summary of the advantages of using JavaEE Framework for JavaEE development.

JavaEE Development Model Platform

Keeps away portions of the development where advanced knowledge and skill are required, the developer merely needs to embed application logic into the skeleton.

Even without strong prior knowledge, the system developed will remain a JavaEE standard complying model, and MVC model can be realized easily. (Program structure is standard and can be maintained easily.)

Does not need to worry about server architecture

Adjustable from outside through the setting files, etc. even if the server architecture has been changed.

Improves productivity With all the common components available in the framework, provides for a higher re-usability of components and improves productivity and maintainability.

Easy Customization There is no need to modify the original application when adding a new component. Furthermore, only affected components needs to be modified when the functions are changed, other parts will not be affected.

Reduce system testing time Eliminates the needs to check the Framework portions during the tests. This will facilitates the problem identification by segmentation for faster problem solving.

Page 19: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

12 intra-mart WebPlatform/AppFramework

1.6 JavaEE Development Please read from Chapter 2 in the following order for development using the JavaEE development model.

1.6.1 JavaEE Framework Programming JavaEE Web system development tends to have many structural common repetitions. By making full use of these

characteristics, it is possible to improve the development productivity greatly. In intra-mart WebPlatform, all the

common processes required by JavaEE development are available as framework, and developers only need to create

components for the system.

1 Application Development with JavaEE Development Model 4 Application Layer 2 Framework 5 Tutorial 3 JavaEE Framework(im-JavaEE Framework) 6 Sample Program

There is a simple and easy-to-follow “JavaEE Framework Programming Guide Tutorial Plus (For Beginners)” for those using JavaEE Framework for the first time. Reading this guide before Chapter 3 should make it easier to follow this manual (It can be retrieved from Windows menu. As the guide is in PDF format, it can also be printed as necessary).

There i s a l so an “ im-JavaEE Framework Spec i f i ca t i ons ” i n the document CD. The file can be found at apilist_v61.zip(specification/im-javaee_framework-spec_v61.pdf) on in the document CD

Instead of Web-tier service framework, now an open source framework called “struts” is available for use. EJB-tier event framework and EIS-tier data framework can be called up in linkage from “struts”. Please refer to “intra-mart im-JavaEE Framework Struts Cooperation Guide” on how to achieve the linkages.

Page 20: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.6 JavaEE Development

Programming Guide - JavaEE Development Model Version 13

1.6.2 Using Various Java Component Group (im-BizAPI) Here is also a list of descriptions how to use the various Java component group (module, unit, and extension module,

etc.) of intra-mart with the JavaEE development model.

1 E-mail Sending 9 JavaScript Compiler Function 2 Example on Using Extension <IMART> Tag Function 10 Sample Application 3 Registering and Using User-Defined Functions 11 Embedding and Operating Modules 4 Linkage with JavaClass 12 Embedding and Operating Units 5 Linkage with EJB 13 Embedding and Operating Extension Modules 6 Calling up External Processes 14 Prototype Wizard 7 Handling XML Data 15 Other Functions 8 Debugging Procedure

Page 21: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 1 Introduction

14 intra-mart WebPlatform/AppFramework

Page 22: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

1.6 JavaEE Development

Programming Guide - JavaEE Development Model Version 15

Chapter 2 im-JavaEE Framework Programming

Page 23: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

16 intra-mart WebPlatform/AppFramework

2.1 Framework Producer This section introduces an example about how to use intra-mart e Builder Framework Producer in programming in

im-JavaEE Framework. intra-mart e Builder Framework Producer has a convenient Java development function of

Eclipse. In addition, you can automatically create setting files (property file group) used in im-JavaEE Framework by

GUI tools.

Restrictions

Im-JSP Editor uses IE (Internet Explorer) control. Before activating intra-mart e Builder Framework Producer, configure the IE encode as other encode than auto-select and Japanese (auto select).

In case of auto-select encoding, garbled characters might be displayed in im-JSP Designer. After activating intra-mart e Builder Framework Producer, you can return the IE encoding to auto-select without any problems.

Page 24: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.2 Initial Setting

Programming Guide - JavaEE Development Model Version 17

2.2 Initial Setting In order to use intra-mart e Builder Framework Producer, you have to configure the following settings.

Install a debug servers of intra-mart Register the license Configure the default values of the project Display a perspective

2.2.1 Debug Server Installation Activate intra-mart installer to install the debug server in preferred directory. You have to specify the debug server when

creating a Framework Producer Web project.

Page 25: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

18 intra-mart WebPlatform/AppFramework

2.2.2 License Installation After installing Framework Producer, you have to register the license. Until the license is registered completely, you can

use this product only as a trial version for 30 days. After 30 days, some use restrictions will occur. For example, you

cannot save the setting file then.

2.2.3 Project Initial data Setting You can configure default values of the project(default encoding and character set when creating Framework Producer

Web project).

Page 26: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.2 Initial Setting

Programming Guide - JavaEE Development Model Version 19

This setting will be default values when creating a new project.

2.2.4 Displaying Perspective In perspective, editor, view and other layouts are configured in order to efficiently make each process. It is

recommended to switch the perspective, corresponding to the process. Framework Producer has two perspectives.

Framework Producer

Perspective

It is recommended to use this when developing each framework. *This is

used as usual.

im-JSP Designer

Perspective

It is recommended to use this when developing pages such as

JSP/HTML/CSJS.

2.2.4.1 Changing Perspective

You can switch on/off the perspectives by buttons on the right-top of the screen page.

Page 27: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

20 intra-mart WebPlatform/AppFramework

2.2.4.2 Displaying Button to Change Perspective

If the Framework Producer perspective or im-JSP Designer perspective is not displayed on the screen, you can display

them by the following steps.

Page 28: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.3 Creating Web Project

Programming Guide - JavaEE Development Model Version 21

2.3 Creating Web Project This section describes the operation steps to create Web project by Framework Producer.

2.3.1 Creating New Project Creating a project using Framework Producer will enable you to configure the required settings in GUI by using

im-JavaEE Framework function. The setting items are as follows.

Creating common.ipx (Common files for im-JavaEE Framework) Creating xxxxxx.iax (Files for im-JavaEE Framework of each application) Editing web.xml Setting a path to javaee_framework.jar.

Page 29: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

22 intra-mart WebPlatform/AppFramework

When entering a project name

If an error message, “the same name project has already existed in work space”, is displayed, open a project in [Project] – [Open a project], select the corresponding project by “Packaged explorer”, [right-click] and [Delete]. After these processes, you can create a project.

Debug Server Path Enter a path in which a debug server is installed.

Default Encoding Select or enter (Windows-31J).

Page 30: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.3 Creating Web Project

Programming Guide - JavaEE Development Model Version 23

Default Character Sets Select or enter (Windows-31J).

Establish the environment of

Framework Producer

Check this.

JavaEE framework Select ”intra-mart JavaEE Framework V5.1”.

Default encoding and default character sets are used when creating a JSP page.

Page 31: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

24 intra-mart WebPlatform/AppFramework

2.3.2 Environment Creating for Framework Producer Establish Framework Producer environment on the existing Java project. The followings are the steps to establish it.

Framework Producer environment is configured to be established as an addition of the existing project. In order to establish Framework Producer environment, you have to create Java project which has source folder in advance.

Page 32: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.3 Creating Web Project

Programming Guide - JavaEE Development Model Version 25

Framework Producer environment is established.

Page 33: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

26 intra-mart WebPlatform/AppFramework

2.3.3 Importing Configuration Files

Page 34: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.3 Creating Web Project

Programming Guide - JavaEE Development Model Version 27

Page 35: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

28 intra-mart WebPlatform/AppFramework

2.3.4 Setting Dynamic Parameter This part describes how to configure the dynamic parameters which read setting files. You can reflect updates of the

setting files without restarting the server by this setting. It is recommended to use this at the development. The steps

are as follows.

Page 36: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.3 Creating Web Project

Programming Guide - JavaEE Development Model Version 29

2.3.5 Saving Files and Exporting Configuration Files If you save a file which you edit, a setting file of im-JavaEE Framework will be created in “src” folder.

The created files are copied to webapp/WEB-INF/classes.

Page 37: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

30 intra-mart WebPlatform/AppFramework

2.4 Directory Structure This section describes directory structure of Framework Producer. The former sections describe the basic setting of

Framework Producer. Directory structure of package and explorer are explained as follows.

2.4.1 Package Explorer Directory Structure tutorial

├ src ・・・ java Program Storage Directory

├ tutorial.sample.service.controller ・・・ Package Directory

├ tutorial.sample.model.data

├ XXX.java ・・・ java Program

├ XXX-config.xml ・・・ JavaEE Framework Setting File

├ JRE System Library ・・・ File Group of Java Library

├ Debug Server Library ・・・ Located in /bin/httpd/ of Debug Server

├ intra-mart Library ・ ・ ・ Library file group saved in /doc/imart/WEB-INF/libs/ in debugserver

├ conf ・・・ Storage Directory of Setting Files of Debug Server

├ webapp ・・・ WEB Root Folder

├ javaee ・・・ Storage Directory of intra-mart standard JS program

├ WEB-INF ・・・ WEB-INF Directory

├ lib ・・・ Class Library Folder

├ tld ・・・ Tag Library Folder

├ web.xml ・・・ Web Application Setting File

├ common.ipx ・・・ Development Definition File of Common im-JavaEE-Framework

├ xxxxxx.iax ・・・ Each Application

Page 38: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.4 Directory Structure

Programming Guide - JavaEE Development Model Version 31

2.4.2 Filter This is a function to control items displayed in a package or explorer. The following is to hide a library file (debug

server library) referred by project (tutorial).

<Before setting>

2.4.2.1 Setting

Page 39: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

32 intra-mart WebPlatform/AppFramework

You can complete the configuration with above-mentioned steps. After setting, the page will be displayed as follows.

<After setting>

Page 40: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 33

2.5 Creating Components This describes how to create a component with using Framework Producer.

2.5.1 Creating Files for im-JavaEE Framework You have to create a development definition file of im-JavaEE Framework for each application.

Page 41: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

34 intra-mart WebPlatform/AppFramework

Page 42: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 35

2.5.2 Service Framework This section describes how to configure a service framework on Framework Producer.

2.5.2.1 Setting Page Transition

The operational procedures of page transition from menu of “JavaEE Framework Programming Guide” are described as

follows.

Page 43: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

36 intra-mart WebPlatform/AppFramework

Page 44: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 37

If you save an editor, “service-config-tutorial.xml” (Service Framework setting file) is created in tutorial/src directory

under “Package-Explorer”. The following information will be added to the file and reflected in intra-mart system

[service-config-tutorial.xml] <service> <display-name>menu_index</display-name> <service-id>menu_index</service-id> <next-page> <page-path>/framework/index.jsp</page-path> </next-page> </service>

If you change the setting of tutorial.iax, please make sure to save it.

Page 45: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

38 intra-mart WebPlatform/AppFramework

2.5.2.2 Editing JSP Program

The operational procedures to edit a JSP program with using im-JSP editor as follows.

Creating JSP file

Page 46: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 39

Switching the editorial mode - Design or Source - You can make editing in Design page or Source page in im-JSP editor. In order to switch the editorial mode, click a

Design tab or Source tab in the bottom of the editor.

Page 47: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

40 intra-mart WebPlatform/AppFramework

However, if you make editing in Design mode, a part of source code will be changed. For example, the tag name of HTML is converted to lower case.

Inserting a tag with using a pallet By using a pallet, you can efficiently add JSP tag, intra-mart tag library and HTML tag.

Page 48: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 41

<Design Page> This part describes an example to add the recent displayed link in the right side of tool bar.

Page 49: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

42 intra-mart WebPlatform/AppFramework

<Source Page> This part describes an example to add the search condition link in the left side of the tool bar.

Page 50: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 43

Editing attribute values in the property view You can edit the attribute values of the tags selected in Design page or Source page in property view. “Basic” includes

necessary attributes or frequently used attributes. “Advanced” includes the specifiable.

Editing a tag from outline view Hierarchy structure of tags is displayed in outline view. If you right-click on the selected tag, you can find a function to

delete a tag, add an attribute, and add a tag in the vicinity.

Page 51: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

44 intra-mart WebPlatform/AppFramework

Data Bind Data bind is a function to select the parameters or the methods’ return values in the declared JSP parameters, JavaBean,

and HelperBean and to obtain them as reference value. HelperBean can be created from a service defined in Service

Framework. You can also edit this HelperBean. In addition, you can create a service according to the wizard from

data framework or event framework.

Each input items of the dialog includes [Data Bind] button, although not all the input items include.

The followings are steps to create HelperBean from Services.

Page 52: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 45

Page 53: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

46 intra-mart WebPlatform/AppFramework

Page 54: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 47

Service Reference This is a function to select a service defined in Service Framework. In addition, you can create a service according to

the wizard from data framework or event framework.

Dialog of the following [imart javaee tag]tag in the pallet includes [Service Reference] button.

Form Link Submit SubmitLink

The followings are steps to create a service from data framework and select the service.

Page 55: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

48 intra-mart WebPlatform/AppFramework

At this point, you complete the setting of Event Framework.

Page 56: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 49

If clicking on this, source code will be automatically created as well as Service Framework and Event Framework.

Page 57: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

50 intra-mart WebPlatform/AppFramework

2.5.2.3 Adding Service

This part explains the operational procedures with an example of requirement processing (Service Framework) in

“JavaEE Framework Programming Guide” as follows.

Page 58: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 51

2.5.2.4 Creating ServiceController

This part describes the operational procedures about how to create ServiceController.

Source Folder tutorial/src Package tutorial.sample.controller.service Name FormTestServiceController

Page 59: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

52 intra-mart WebPlatform/AppFramework

2.5.2.5 Adding Connection

Add a connection to [Service]index_next_push from[page]index.jsp.

If the connection condition is as the following figures, you can complete the configuration.

If completed, save the editor.

If you save an editor, “service-config-tutorial.xml” (Service Framework setting file) is created in

tutorial/webapp/WEB-INF/classes under “Package-Explorer”. The following information will be added to the file and

reflected in intra-mart system

[service-config-tutorial.xml] <service> <display-name>index_next_push</display-name> <service-id>index_next_push</service-id> <controller-class> tutorial.sample.controller.service.FormTestServiceController </controller-class> <next-page> <page-path>/framework/next.jsp</page-path> </next-page> </service>

If you change the setting of tutorial.iax, please make sure to save it.

Page 60: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 53

2.5.2.6 Editing java Program

This part describes how to edit the created FormTestServiceController.

Click on FormTestServiceController.java under “tutorial/src/tutorial.sample.controller.service“ in “Package/Explorer” to

display the source in main frame.

In case of selecting [Creating from Skelton], the developers should implement only the required parts since the contents

of the Skelton are copied in advance.

After completing the implementation of the components, please do [Storage] in [File Menu]. With this process, java files

which you are editing can be automatically compiled.

If a compile error occurs, an error message will be displayed in its source code. You can modify the information with referring the message.

If you [Build Project] – [Project Menu], you can also compile.

In this case, all the java files in the project (under tutorial/src) are targeted to be compiled.

Page 61: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

54 intra-mart WebPlatform/AppFramework

2.5.2.7 Setting Service Result

This section describes the operational procedures with an example of page processing in “JavaEE Framework

Programming Guide”.

Page 62: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 55

Source Folder tutorial/src Package tutorial.sample.controller.service Name FormTestServiceResult

After completing the implementation of the components, please do [Storage] in [File Menu].With this process, java files

which you are editing can be automatically compiled.

If a compile error occurs, an error message will be displayed in its source code. You can modify the information with referring the message.

Page 63: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

56 intra-mart WebPlatform/AppFramework

2.5.2.8 Wizard to Create Service Controller Class

You can create a class with adding a required method when creating a service controller class.

This section describes the operational procedures with an example of page processing in “JavaEE Framework

Programming Guide”.

Page 64: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 57

Source Folder tutorial/src Package tutorial.sample.controller.service Name InputTextServiceController

Page 65: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

58 intra-mart WebPlatform/AppFramework

Page 66: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 59

z

2.5.3 Event Framework This section describes how to configure Event Framework on Framework Producer.

2.5.3.1 Setting Event ID

Page 67: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

60 intra-mart WebPlatform/AppFramework

2.5.3.2 Creating Event

Page 68: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 61

Source Folder tutorial/src Package tutorial.sample.model.event Name InputTextEvent

Page 69: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

62 intra-mart WebPlatform/AppFramework

2.5.3.3 Creating Event Result

Page 70: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 63

Source Folder tutorial/src Package tutorial.sample.model.event Name InputTextEventResult

Page 71: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

64 intra-mart WebPlatform/AppFramework

2.5.3.4 Setting Event Listner Factory

Page 72: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 65

2.5.3.5 Creating Event Listner Class ―Skeleton ―

Page 73: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

66 intra-mart WebPlatform/AppFramework

Source folder tutorial/src Package tutorial.sample.model.event Name InputTextEventListener

After configuring tutorial.iax, please make sure to save it. Setting file will be created.

Page 74: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 67

2.5.3.6 Creating Event Listner Class ― New ―

You can create a class with adding a required method when creating an event listener class.

This section describes the operational procedures with an example of requirement processing (Event Framework) or

data processing (Data Framework) in “JavaEE Framework Programming Guide”.

Page 75: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

68 intra-mart WebPlatform/AppFramework

Source Folder tutorial/src Package tutorial.sample.model.event Name InputTextEventListener

Page 76: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 69

Page 77: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

70 intra-mart WebPlatform/AppFramework

Page 78: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 71

2.5.4 Data Framework This section describes how to configure the data framework on Framework Producer.

2.5.4.1 Setting DAO Group

Page 79: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

72 intra-mart WebPlatform/AppFramework

Package tutorial.sample.model.data Model Name InputDataModel

2.5.4.2 Creating Group Model

Page 80: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 73

Column Name TEXT Column Type String Cplumn Size 50 Number of decimals None

Page 81: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

74 intra-mart WebPlatform/AppFramework

Page 82: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 75

Page 83: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

76 intra-mart WebPlatform/AppFramework

2.5.4.3 Creating DAO Interface

Function Name select Function Return Type tutorial.sample.model.data.InputDataModel[]

Page 84: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 77

2.5.4.4 Creating DAO

DAO Display Name Input Text DAO DAO Class Name tutorial.sample.model.data.InputTextIntramartDBDaoImpl “Selection” of Connector Select [intra-mart Login Group DB Connector (logingroup_db)] Connection Name None

Page 85: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

78 intra-mart WebPlatform/AppFramework

Page 86: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 79

Page 87: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

80 intra-mart WebPlatform/AppFramework

Click on “Mapping of returned value” of the added column (TEXT).

Select “text” in the displayed combo box.

(The selected “text” becomes a text property of InputDataModel.

The column obtained in “SELECT” is substituted to the text property of “InputDataModel”.)

Page 88: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.5 Creating Components

Programming Guide - JavaEE Development Model Version 81

Page 89: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

82 intra-mart WebPlatform/AppFramework

After configuring tutorial.iax completely, please make sure to save it. Setting file will be created.

Page 90: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.6 Execution

Programming Guide - JavaEE Development Model Version 83

2.6 Execution After creating components, the next step is to execute an application.

Page 91: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

84 intra-mart WebPlatform/AppFramework

An install directory of the intra-mart debug server has already been configured in “2.2.1 Installing a Debug Server”.

You can make debugging and tracing in the next section by activating intra-mart in Framework Producer.

http://localhost:8080/imart/default.manager http://localhost:8080/imart/default.portal

Terminating intra-mart Click on the in order to terminate running intra-mart.

If you do not terminate running intra-mart and start it again, java process will be left in OS.

Before you restart the system, please make sure to terminate it.

Page 92: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.7 Debug

Programming Guide - JavaEE Development Model Version 85

2.7 Debug You can implement and debug created classes of each framework in Framework Producer.

The followings are the processes.

You have to configure this part and debugging only at the first time. After the second time, you can click an arrow ▼ at the right side of to start it from menu.

Page 93: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

86 intra-mart WebPlatform/AppFramework

Debug server will be activated.

Screen page will be switched to a debug mode. The server activation log will be displayed on the console.

Page 94: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.7 Debug

Programming Guide - JavaEE Development Model Version 87

Programs will stop at the line previously configured as a breakpoint in Eclipse page (stop at the greenly highlighted part).

In the right-side parameter window, a list of stopping class parameters will be displayed. You can refer to the values of

each class here.

You can operate debugging by the buttons on the top of debug window. The followings show the functions of each

button.

Restart Execute to the next break point.

Shut down Shut down the server.

Stop Stop the execution.

Step in Execute one line.

If the execution line is a function, the program will transfer to the function.

Step over Execute one line.

Even if the execution line is a function, the program will not transfer to the function.

Step Return If it transfers to the other function, return to the original function.

Page 95: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

88 intra-mart WebPlatform/AppFramework

2.8 Other Functions This section introduces other functions.

2.8.1 Displaying Line No. of Java Program The following is how to display a line number when opening a Java program.

Page 96: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.8 Other Functions

Programming Guide - JavaEE Development Model Version 89

Page 97: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

90 intra-mart WebPlatform/AppFramework

2.8.2 Changing Name of Java Program The followings are the steps to change a Java program name.

Page 98: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.8 Other Functions

Programming Guide - JavaEE Development Model Version 91

2.8.3 Changing Location of Java Program Package The followings are steps to move a Java program package.

2.8.4 Java Compiler Option This part describes how to configure a Java compiler option.

Page 99: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

92 intra-mart WebPlatform/AppFramework

Page 100: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.8 Other Functions

Programming Guide - JavaEE Development Model Version 93

2.8.5 Changing Screen Size to Edit Service Framework You can change a display size in an editorial page of Service Framework displayed as xxxxx.iax.

Example 1 – Configuring the display size as “75”

Page 101: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

94 intra-mart WebPlatform/AppFramework

Example 2 – Configuring the display size as “100”

Example 3 – Configure the display size as “200”

Page 102: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.8 Other Functions

Programming Guide - JavaEE Development Model Version 95

2.8.6 Setting im-JSP Editor The following shows how to configure im-JSP editor.

Page 103: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 2 im-JavaEE Framework Programming

96 intra-mart WebPlatform/AppFramework

Page 104: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

2.8 Other Functions

Programming Guide - JavaEE Development Model Version 97

Page 105: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

98 intra-mart WebPlatform/AppFramework

Chapter 3 Using Various Java Component Groups(im-BizAPI)

Page 106: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.1 Using the Storage Service

Programming Guide - JavaEE Development Model Version 99

3.1 Using the Storage

Service With the use of Storage Service, intra-mart can share files easily even if distributed system architecture is developed.

This section describes how to create pages that can save files uploaded from a browser in the Storage Service or to

download files that has been saved by the Storage Service.

3.1.1 File Upload First of all, you have to create a form that uploads and save files into Storage Service.

< Send Data Form ”filebox.html”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>File Center</TITLE> </HEAD> <BODY bgcolor=”WhiteSmoke”> <H2>Upload</H2> <FORM action=”upload.jsp” method=”POST” enctype=”multipart/form-data”> <INPUT type=”file” name=”local_file”> <INPUT type=”submit” value=” send “> </FORM> </BODY> </HTML> <!-- End of File -->

Code the JSP to save the received file data into Storage Service.

The sample JSP file contains function calling codes to make it easier for the readers to understand. When using JavaEE Framework, please add this code in the appropriate location, such as within the service controller or the event listener. DAO is used to link up with Storage server especially in shopping cart sample for im-JavaEE Framework. The particular DAO is as follows for your reference. sample.shopping.model.data.SampleOrderIntramartFileServerDAO

Page 107: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

100 intra-mart WebPlatform/AppFramework

<JSP file to receive files (upload.jsp> <%@ page import=”jp.co.intra_mart.foundation.http.*” %> <%@ page import=”jp.co.intra_mart.foundation.server.file.*” %> <% String msg = new String(“Upload succeeded.”); try{ MultipartFormData data = new MultipartFormData(request); MultipartFormData.Entity entity = data.getEntity(“local_file”); String header = entity.getHeader(“Content-Disposition”); String file_name = header.substring(header.lastIndexOf(“¥¥”) + 1, header.length() - 1); NetworkFile file = new NetworkFile(“filebox/” + file_name); file.save(entity.getBytes(); }catch(Exception e){ msg = “Upload failed.”; } %> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>Staff List.</TITLE> </HEAD> <BODY> <H2><%= msg %></H2> <A href=”filebox.html”>return</A> </BODY> </HTML>

This page will operate in the following manner. 1:The selected file data will be sent to the server by file control. 2:The data will be interpreted. 3:The name of the received file will be retrieved. 4:The file data with original file name will be output to Storage Service.

It is possible to create a file on a server with the same name as the uploaded file.

<Execution screen>

Page 108: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.1 Using the Storage Service

Programming Guide - JavaEE Development Model Version 101

<INPUT type="file">

Additional description of <INPUT type=”file”> used in a HTML form is as follows. With the use of form control <INPUT type=”file>, files can be uploaded directly from a browser to a server. For the purpose, the form needs the following description. <FORM method=”POST” enctype=”multipart/form-data”>

This description encodes the file information into MIME format and sends request to the server in POST mode.

Class MultipartFormData/Interface MultipartFormData.Entity This is an API that allows easy handling of form data in multipart format (To use this class, the “jp.co.intra_mart.foundation.http” package needs to be imported). --- upload.jsp --- MultipartFormData data = new MultipartFormData(request); MultipartFormData.Entity entity = data.getEntity(“local_file”); String header = entity.getHeader(“Content-Disposition”); String file_name = header.substring(header.lastIndexOf(“¥¥”) + 1, header.length() - 1); By passing “HttpServletRequest” to the "MultipartFormData” constructor, each of the parts can be extracted to conduct the desired operations. Specify the name of a parameter using the “getEntity” method to extract each part. The “MultipartFormData.Entity” interface will be returned.

By using “MultipartFormData.Entity” interface, parameter acquisition and header analysis can be easily carried

out.

Class NetworkFile

This is an API to control files on the intra-mart File Server (To use this class, the “jp.co.intra_mart.foundation.server.file” package needs to be imported). By using this API, files can be controlled centrally even if they are distributed among multiple numbers of servers. In this section, a new file is created using the save() method. --- upload.jsp --- NetworkFile file = new NetworkFile(“filebox/” + file_name); file.save(entity.getBytes());

Various operations can be conducted on the files or directory specified in the NetworkFile constructor.

Page 109: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

102 intra-mart WebPlatform/AppFramework

3.1.2 Displaying File List In this section, the page created in previous section will be improved by modifying the source to display a list of uploaded

files. To display the list of uploaded files, the saved files list must first be retrieved. You have to add codes in order to

connect to the Storage Service and obtain the file list.

<JSP (filebox.jsp) to display the list> <%@ page import=”jp.co.intra_mart.foundation.http.*” %> <%@ page import=”jp.co.intra_mart.foundation.server.file.*” %> <%@ page import=”java.util.*” %> <% NetworkFile file = new NetworkFile(“filebox/”); if(!file.isDirectory()){ file.makeDirectories(); } List list = file.files(); Iterator view = list.iterator(); String file_name; %> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>File Center</TITLE> </HEAD> <BODY bgcolor=”WhiteSmoke”> <H2>Upload</H2> <FORM action=”upload.jsp” method=”POST” enctype=”multipart/form-data”> <INPUT type=”file” name=”local_file”> <INPUT type=”submit” value=” send “> </FORM> <HR> <H2>File List</H2> <TABLE border> <TR> <TH>File Name</TH> </TR> <% while(view.hasNext()){ file_name = (String)view.next(); %> <TR> <TD><%= file_name %></TD> </TR> <% } %> </TABLE> </BODY> </HTML> <!-- End of File -->

Page 110: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.1 Using the Storage Service

Programming Guide - JavaEE Development Model Version 103

<Execution screen>

On this execution screen, you can check whether the files have been uploaded.

New NetworkFile (Directory Name)

NetworkFile class can create instances of not only files, but also directories by specifying their names. These instances can conduct various operations on the directories. isDirctory() Checking presence makeDirctories() Creating a directory files(); Retrieving a file list

Please refer to the API List for further details.

Page 111: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

104 intra-mart WebPlatform/AppFramework

3.1.3 File Download After the functions to upload files and checking their presence in the Storage Service has been completed, next add

functions to download the saved files to a browser. For the next step, the source code of the page created above is

modified to allow file downloading.

To download files, a download link is added to the JSP. In addition, the logic has to be added to transmit the files when

the link is clicked.

<JSP file with file download link(filebox.jsp)> <%@ page import=”jp.co.intra_mart.foundation.server.file.*” %> <%@ page import=”java.util.*” %> <% NetworkFile file = new NetworkFile(“filebox/”); if(!file.isDirectory()){ file.makeDirectories(); } List list = file.files(); Iterator view = list.iterator(); String file_name; %> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>File Center</TITLE> </HEAD> <BODY bgcolor=”WhiteSmoke”> <H2>Upload</H2> <FORM action=”upload.jsp” method=”POST” enctype=”multipart/form-data”> <INPUT type=”file” name=”local_file”> <INPUT type=”submit” value=” send “> </FORM> <HR> <H2>File List</H2> <TABLE border> <TR> <TH>File Name</TH> </TR> <% while(view.hasNext()){ file_name = (String)view.next(); %> <TR> <TD><%= file_name %></TD> <TD><A href=”download.jsp?file_name=<%= file_name %>”>download</A></TD> </TR> <% } %> </TABLE> </BODY> </HTML> <!-- End of File -->

Page 112: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.1 Using the Storage Service

Programming Guide - JavaEE Development Model Version 105

3.1.3.1 Creating Link to Display “Download”

This link points to a JSP page (download.jsp) to process download when clicked. You have to create the download.jsp

first here.

< JSP file for downloading (download.jsp)> <%@ page import=”jp.co.intra_mart.foundation.server.file.*” %><% String file_name = request.getParameter(“file_name”); NetworkFile file = new NetworkFile(“filebox/” + file_name); OutputStream os = response.getOutputStream(); response.setContentType(“application/octet-stream”); response.setHeader(“Content-Disposition”, “attachment; filename=” + file_name); os.write(file.load()); %>

A JSP download sample was introduced above to simplify the explanation. Usually, Servlet is used for downloading instead. There is a sample of Servlet download file at the following location

im_sample/src/main/java/jp/co/intra_mart/sample/servlet/Download.java in im_sample.zip

< Execution window>

setContentType()

When downloading a file, the content type must be specified according to the file type. Although

“application/octet-stream” is specified in this sample (referring to unknown data) to let the browser detect and

verify, an appropriate MIME type should be specified according to the contents of the download file in practice.

Page 113: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

106 intra-mart WebPlatform/AppFramework

3.1.4 Deleting Files The process to upload and download files had been described and demonstrated in the previous sections. If these files

were left there, the Storage Service will be full after a while. This section describes how to add a function that delete

files saved on the Storage Service.

<JSP file with an added Delete Link (filebox.jsp)> <%@ page import=”jp.co.intra_mart.foundation.server.file.*” %> <%@ page import=”java.util.*” %> <% NetworkFile file = new NetworkFile(“filebox/”); if(!file.isDirectory()){ file.makeDirectories(); } List list = file.files(); Iterator view = list.iterator(); String file_name; %> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>File Center</TITLE> </HEAD> <BODY bgcolor=”WhiteSmoke”> <H2>Upload</H2> <FORM action=”upload.jsp” method=”POST” enctype=”multipart/form-data”> <INPUT type=”file” name=”local_file”> <INPUT type=”submit” value=” send “> </FORM> <HR> <H2>File List</H2> <TABLE border> <TR> <TH>File Name</TH> </TR> <% while(view.hasNext()){ file_name = (String)view.next(); %> <TR> <TD><%= file_name %></TD> <TD><A href=”download.jsp?file_name=<%= file_name %>”>download</A></TD> <TD><A href=”remove.jsp?file_name=<%= file_name %>”>remove</A> </TD> </TR> <% } %> </TABLE> </BODY> </HTML> <!-- End of File -->

Page 114: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.1 Using the Storage Service

Programming Guide - JavaEE Development Model Version 107

<JSP file to delete files (remove.jsp)> <%@ page import=”jp.co.intra_mart.foundation.server.file.*” %> <%@ page import=”java.util.*” %> <% String msg = new String(“Remove succeeded.”); String file_name = request.getParameter(“file_name”); NetworkFile file = new NetworkFile(“filebox/” + file_name); boolean result = file.remove(); if(result == false){ msg = “Remove failed.”; } %> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>File Remove</TITLE> </HEAD> <BODY bgcolor=”WhiteSmoke”> <H2><%= msg %><H2> <A href=”filebox.jsp”>return</A> </BODY> </HTML>

<Execution screen (Result)>

If clicking the delete link, you can delete the file selected.

Page 115: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

108 intra-mart WebPlatform/AppFramework

3.2 Sending E-Mails This section describes how to create a page to send e-mails. Please adequately configure SMTP server of

“conf/imart.xml” in order to send e-mails.

3.2.1 Creating Form for Sending E-Mail In this section, a form for sending e-mail will be created. The form needs to have a control to register recipient’s address,

sender’s address, e-mail title, and e-mail message. In addition, a function that sends an e-mail using Mail API based on

the received information also needs to be defined.

<HTML file with form for sending E-mail (sender.html)> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN"> <HTML> <HEAD> <TITLE>Mail Sender</TITLE> </HEAD> <BODY> <FORM method="POST" action="mail.jsp"> To: <INPUT type="text" name="mail_to"><BR> From: <INPUT type="text" name="mail_from"><BR> Subject: <INPUT type="text" name="mail_subject"><BR> Message: <TEXTAREA name="mail_body" cols=40" rows="8"></TEXTAREA><BR> <INPUT type="submit" value="send"> </FORM> </BODY> </HTML>

<JSP file with E-mail sending logic (mail.jsp)> <%@ page contentType="text/html; charset=Shift_JIS" pageEncoding="Windows-31J" %> <%@ page import="jp.co.intra_mart.foundation.mail.*" %> <%@ page import="jp.co.intra_mart.foundation.mail.javamail.*" %> <% String msg = new String("Succeeded."); StandardMail mail = new StandardMail(); mail.addTo(request.getParameter("mail_to")); mail.setFrom(request.getParameter("mail_from")); mail.setSubject(request.getParameter("mail subject")); mail.setText(request.getParameter("mail_body")); MailSender sender = new JavaMailSender(mail); try { sender.send(); } catch (MailSenderException e) { msg = "Failed."; } %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 //EN"> <HTML> <HEAD> <TITLE>Send mail</TITLE> </HEAD> <BODY> <H2><%= msg %><H2>

Page 116: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.2 Sending E-Mails

Programming Guide - JavaEE Development Model Version 109

<A href="sender.html">return</A> </BODY> </HTML>>

In order to make it easier to understand this sample, the codes are written to be called from within a JSP file. When using JavaEE Framework, these codes must be added to the appropriate location, such as Event Listener or DAO.

<Execution screen>

Click on the [send] button after entering all the necessary details in the form in order to send an e-mail.

Mail API

MailSender API

This is a class that sends e-mails.

--- mail.jsp ---

StandardMail mail = new StandardMail();

mail.addTo(request.getParameter("mail_to"));

mail.setFrom(request.getParameter("mail_from"));

mail.setSubject(request.getParameter("mail_subject"));

mail.setText(request.getParameter("mail_body"));

MailSender sender = new JavaMailSender(mail);

sender.send();

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

boolean result = mail.send(); If you give no arguments to the constructor (like the sample program), the SMTP server set in the intra-mart’s default configuration file (conf/jp.co.intra_mart.foundation.conf) is used. By specifying the SMTP server address and port to the constructor, any SMTP sever can be used. The e-mail is actually sent out when send() method is executed.

Please refer to the API List on the details of MailSender class.

Page 117: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

110 intra-mart WebPlatform/AppFramework

Note When Configuring To and From.

If invalid characters (other than e-mail addresses) were included in the setting data, e-mail sending error may

occur.

E-mail Delivery and Server Processing Speed

intra-mart Application Server and SMTP sever must be linked up to send an e-mail.

It may take a longer processing time to send an e-mail depending on the volume of information of the e-mail, as

well as network environment or network traffic condition.

3.2.2 Sending E-mail with Attachment File

In this section, the e-mail delivery form created earlier will be completed such that an attachment file can be sent together with the e-mail. First of all, a form control will be added in the HTML page to enable uploading of attachment file, and the form attribute will also be changed.

JSP file will be modified so that the e-mail delivery function can accept attachment files.

<HTML page with added File uploading control (sender.html)> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN"> <HTML> <HEAD> <TITLE>Mail Sender</TITLE> </HEAD> <BODY> <FORM method="POST" enctype="multipart/form-data" action="mail.jsp"> To: <INPUT type="text" name="mail_to"><BR> From: <INPUT type="text" name="mail_from"><BR> Subject: <INPUT type="text" name="mail_subject"><BR> Message: <TEXTAREA name="mail_body" cols=40" rows="8"></TEXTAREA><BR> Attachment: <INPUT type="file" name="mail_file"><BR> <INPUT type="submit" value="send"> </FORM> </BODY> </HTML>

Form to Upload Files

The following form must be coded to upload a file. <FORM method=”POST” enctype=”multipart/form-data”>

With this form codes, the form control <INPUT type="file"> can receive a local file on the server.

Page 118: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.2 Sending E-Mails

Programming Guide - JavaEE Development Model Version 111

Incoming Information & Character Encoding

The information obtained from the form during file uploading is all in binary format.

Since the function container receives values in binary format via request object, the information must be handled

with care.

<JSP file that handles attachment file e-mail sending (mail.jsp)> <%@ page contentType="text/html; charset=Shift_JIS" pageEncoding="Windows-31J" %> <%@ page import="java.io.*" %> <%@ page import="jp.co.intra_mart.foundation.mail.*" %> <%@ page import="jp.co.intra_mart.foundation.mail.javamail.*" %> <%@ page import="jp.co.intra_mart.foundation.http.*" %> <% String msg = new String("Succeeded."); StandardMail mail = new StandardMail(); mail.addTo(request.getParameter("mail_to")); mail.setFrom(request.getParameter("mail_from")); mail.setSubject(request.getParameter("mail_subject")); mail.setText(request.getParameter("mail_body")); MultipartFormData data = new MultipartFormData(request); MultipartFormData.Entity entity = data.getEntity("mail_file"); if(entity.getContentLength() > 0){ String header = entity.getHeader("Content-Disposition"); String file_name = header.substring(header.lastIndexOf("¥¥") + 1, header.length() - 1); ByteArrayOutputStream out = new ByteArrayOutputStream(); out.write(entity.getBytes()); mail.addAttachment(file_name, out.toString("8859_1")); } MailSender sender = new JavaMailSender(mail); try { sender.send(); } catch (MailSenderException e) { msg = "Failed."; } %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 //EN"> <HTML> <HEAD> <TITLE>Send mail</TITLE> </HEAD> <BODY> <H2><%= msg %><H2> <A href="sender.html">return</A> </BODY> </HTML>

Page 119: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

112 intra-mart WebPlatform/AppFramework

<Execution screen (Result)>

Attachment File

When an e-mail is sent out with file attachment, according to the regulations set by RFC, the file data must be

first encoded, and then the entire e-mail information, including the e-mail’s main body, has to be encoded before

sending out to the SMTP server.

Attachment File and Processing Speed

When an attachment file is send out, a browser will send the file data to the Web server, and then the application server that receives the file data will conduct e-mail delivery processing.

Since e-mail delivery must go through multiple numbers of networks, an e-mail with large-sized file attachment is

likely to take much longer processing time.

Page 120: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.3 Calling External Processes

Programming Guide - JavaEE Development Model Version 113

3.3 Calling External

Processes To execute a program from a running intra-mart application, the exec() method of java.lang.Runtime class is used. This

function will execute a specified character string command as a new process.

3.3.1 Sample

java.lang.Runtime runtime = java.lang.Runtime.getRuntime(); java.lang.Process process = runtime.exec(command) process.waitFor();

Send “command” to OS as a command to execute the process. On the java program side, the waitFor() method of the

instance process (of java.lang.Process) will wait for the completion of the newly executed process.

The process triggered by command will be executed in an environment where Application Runtime is operating. It cannot be executed in other server environment.

The command to execute the process will vary by each OS. Please specify the command depending on the execution environment.

Please refer to the JAVA API specifications for details.

Page 121: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

114 intra-mart WebPlatform/AppFramework

3.4 Handling XML Data You can retrieve your aiming data by using XML parser to analyze the XML format data.

XML (Extensible Markup Language) is a commonly used, easy to understand and highly flexible language for use with

any type of environment. As a result, data can be exchanged easily and smoothly between intra-mart and other

applications using a XML file.

3.4.1 XML Parser and Retrieving Data The XML parser provided by intra-mart API can interpret and convert XML data into DOM (Document Object Model) tree

format, and subsequently extract the XML tags and their contained data information from the DOM tree object.

W3C regulates the standard for XML and DOM tree. Please refer to the W3C web site for the latest information.

As for XML parser, the latest technical information is available on the W3C and SAX web sites.

Please refer to the “java.xml.parsers Package” under “Appilication Common Modules” in the API List for details.

Page 122: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.5 Debugging Process

Programming Guide - JavaEE Development Model Version 115

3.5 Debugging Process By embedding “System.out.println” function within a JSP file (created by a developer) with JSP tags <% %>, information

of variables can be displayed on DOS console screen for debugging.

Example <% System.out.println(debug); %> <Example of Debugging Code> <%@ page contentType=”text/html; charset=Shift_JIS” %> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 //EN”> <HTML> <HEAD> <TITLE>Hello intra-mart.</TITLE> </HEAD> <%! String debug = “Debugging Information”; %> <%! String msg = “Hello. This is intra-mart”; %> <% System.out.println(debug); %> <%=msg %> </BODY> <HTML>

<Debugging Result Display Page>

In this section, only a simple JSP debugging process is explained. In practice, the actual development involves advanced debugging functions such as syntax checking and also debugging processes with eBuilder. Please explore using eBuilder’s Trial version bundled with the package.

Page 123: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

116 intra-mart WebPlatform/AppFramework

“eBuilder 6.0” Supporting Program Development

Environment (will be released on 8/31/2006)

With the use of intra-mart “eBuilder 6.0” (optional), it is possible to develop user applications more efficiently. intra-mart “eBuilder Ver6.0” comes with two form: “intra-mart eBuilder Page Producer” for script development model, consisting of presentation page and function container; and “eBuilder Framework Producer” consisting consist of JSP and Servlet that can be used as a plug-in for “Eclipse” (an open-sourced integrated development environment for JavaEE development model). Please refer to the Tutorial Guide “1.8 intra-mart eBuilder Ver6.0” for further details.

Page 124: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.6 Linkages with Script Development Model

Programming Guide - JavaEE Development Model Version 117

3.6 Linkages with Script

Development Model This section describes the transition from a Script Development Model page to a Framework page. The following method allows a transition from a Script Development Model page to an im-JavaEE Framework page. By customizing the login screen transition using this method, it is possible to develop a system with no standard menu display.

Please note that the descriptions are on the prerequisite of having logged onto the intra-mart.

3.6.1 Displaying Framework Pages without Using Menu A Framework page can be displayed with the following request, under the default installation and if no modifications have

been done to anything related to URL mapping of “/ServiceServlet” in web.xml.

http://<Server IP Address>[:<Server Port>]/<Context Path>/[Application ID]-[Service ID].service

3.6.2 Transiting from Script Development Model Page to

Framework Page Put in the same request as above.

The following is an example of screen transitions to im-JavaEE Framework with using a form submit on the page-based

screen page.

sample.html ・・・ <FORM name="frmInfo" method="POST" action="<Application ID>-<Service ID>.service"> </FORM> ・・・

Page 125: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

118 intra-mart WebPlatform/AppFramework

3.7 Embedding & Operating

the Modules im-BizAPI can be divided into “User Interface Tier (Tag Library Collection)", “Business Logic Tier (Java Component

Collection)”, and “Business Fundamental Tool”. Each of these modules is described as follows.

Page 126: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 119

3.7.1 User Interface Tier This section describes the 3 modules that belong to the User Interface Tier.

3.7.1.1 Screen Common Module

This is a page component module commonly used for a Web-based GUI development. A user interface that is linked up with the database can be easily created by setting the appropriate properties and of the module and invoking the module. In addition, intra-mart Tag Library that can be used by JSP, is being used for the JavaEE Development Model. Please refer to the “Tag Library" column in the following page on the details of the tag library.

In addition to the Screen Common Modules (available in standard package) introduced here, there are also extension

modules, such as the “IM-Curl (optional)” which realizes a client GUI environment.

Examples of Screen Common Modules Provided

General Input Control Modules Include general input controls that are necessary for user interface development (such as text field, password box, radio button, check box, and text area, etc). These control groups can interact with server-side scripts and data.

Layout Control Modules These modules can change the display values or display contents based on specified conditions, i.e. provide a programming element (which usually cannot be represented in HTML) within a presentation page.

Examples of Screen Common Modules Developed By editing the above-mentioned objects/function groups on HTML, it is possible to develop user interfaces with much

finer details, creating a Web system with a user interface equivalent to those created with the conventional VisualBasic.

The following is an example of page creation.

<Example of Page Creation>

Screen Common Module that realizes client GUI environment : IM-Curl

This is a rich client-side Web programming language that can develop an advanced and complex user interface.

Page 127: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

120 intra-mart WebPlatform/AppFramework

Please refer to “Screen Common Module” under “JavaEE Development Model” of API List for the details of Screen Common Modules.

Please refer to the following on the details of IM-Curl. ・ “IM-Curl Interaction API Tutorial Guide” (im_curl_api_tutorial.pdf), a tutorial guide for creating applications that allows intercommunication between Curl Applets.

・ “jp.co.intra_mart.foundation.im_curl” class within “Application Common Module” under “JavaEE Development Model” of API List.

Tag Library

To call up from the JSP, use the intra-mart Tag Library. Please refer to the “Screen Common Module” of the JavaEE Development Model of API List for further details. Example of Usage <imart:imartDateFormat value="<%= date%>" format="yyyy/MM/dd"/> Insert a specific date data as character strings. ・Tag Library List calendar Create a page HTML source for calendar module condition Conditional branching for executing statements between tags (true/false) decision Conditional branching for execution statements between tags (Specify value) imartDateFormat Insert a specific date data as strings in a location specified by tags. imartEvent Configure the event processing logic that operates on a browser. imartNumberFormat Insert a specific numeric data as strings in a location specified by tags. loop Repeating the process repeat Repeat processing a section nested within tags select Create a combo-box (list box) drawer Create an image file and display it on HTML <Spread Sheet> CellDataSelector Select a cell on spread sheet (sample) <imtag:ColumnDataSelector bgColor="white" fgColor="red"> ... <imtag:SelectionSubmitter formName="myform" application="taglib" service="testform" /> </imtag:ColumnDataSelector> At the time of selection, bgColor is “white”, and fgColor is “red”. By clicking the Submit button below, the content of the selected cell will be sent to the server.

Page 128: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 121

ColumnDataSelector Select a column on spread sheet RowDataSelector Select a row on spread sheet SelectionSubmitter Highlight the line of the spread sheet of the cursor LineHighLight Highlight the line of the spread sheet of the cursor Sorting Sort any line of the spread sheet DynamicTable Create a table of database data DBListPaging Refer to the database set by intra-mart WebPlatform (or Framework) database

settings (or multi-database settings), read the data, and create a table dynamically. (Sample) Nest sample of “DBListPaging/Column and ColumnSelector” tag

<imtag:ColumnDataSelector bgColor="red" fgColor="white">

<imtag:DBListPaging tableID="unit_table" tableName="b_m_unit" styleClass="test"

pageSize="10" indexLocation="both" indexSize="10">

<imtag:Column attribute="unit_cd" title="Code" headerClass="header" styleClass="test"/>

<imtag:Column attribute="unit_name" title="Name" headerClass="header"/>

<imtag:Column attribute="notes" title="Note" headerClass="header"/>

</imtag:DBListPaging>

</imtag:ColumnDataSelector>

<Input Control> Validate Input control of date, alphanumeric characters, and numbers DblClickForbidden Controlling buttons BackForbidden Disable “Back” button of a browser <Menu> PopMenu Control pop-up menu <Message Push> Push This is a component that pushes message input by the sender to the client side. The

recipient JSP uses this tag to get and display the message dynamically, without having to reload the page.

Page 129: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

122 intra-mart WebPlatform/AppFramework

3.7.1.2 Graph Drawing Module (Presentation Page)

This module creates a graph image file on the server-side, and display the graph on the browser.

The following 5 types of graphs can be used

Line graph Bar graph Pie graph Radar chart Portfolio

Graph Plotting Settings Drawer tag of intra-mart Tag Library will be used.

The graph’s image file can be displayed on a HTML, by passing an instance of super class

“jp.co.intra_mart.foundation.drawer.AbstractDrawer” to the attribute data of Drawer tag

There are 5 types of Graph Drawing classes with AbstractDrawer as super class.

Class Graph Type

jp.co.intra_mart.foundation.graph.BarGraphDrawer Line graph

jp.co.intra_mart.foundation.graph.CircleGraphDrawer Bar graph

jp.co.intra_mart.foundation.graph.LineGraphDrawer Pie graph

jp.co.intra_mart.foundation.graph.PortFolioDrawer Radar chart

jp.co.intra_mart.foundation.graph.RadarChartDrawer Portfolio

The coding example of a bar graph drawing is as follows.

<%@ page contentType="text/html; charset=Windows-31J" pageEncoding="Windows-31J" %> <%@ taglib prefix="imarttag" uri="http://www.intra-mart.co.jp/taglib/core/standard" %> <%@ page import="jp.co.intra_mart.foundation.graph.*" %> <%@ page import="java.awt.Color" %> <% // Creating bar graph BarGraphDrawer drawerBar = new BarGraphDrawer(0, 60, 10); drawerBar.setWidth(300); drawerBar.setHeight(300); drawerBar.setCaption(new String[]{"January", "February", "March"}); BarGraphObject objBar = new BarGraphObject(Color.black); objBar.addData(50); objBar.addData(10); objBar.addData(30); drawerBar.addData(objBar); %> <HTML> <BODY> <imarttag:Drawer data="<%= drawerBar %>" /> </BODY> </HTML>

Page 130: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 123

Creating New Graph AstractDrawer is used to create a new graph.

Create a class that inherits AbstractDrawer, and overwrite the “createImage” method.

public class MyGraphDrawer extends AbstractDrawer { public MyGraphDrawer( super(); } protected void createImage(Graphics g) { g.setColor(Color.red); g.drawLine(0, 0, getWidth() - 1, getHeight() - 1); g.setColor(Color.blue); g.drawRect(0, 0, getWidth() - 1, getHeight() - 1); . . . . } }

The execution part of image drawing is coded within the “createImage” method. Draw a graphic image based on the

graphic context of the argument.

The program source code of graph is stored in the “installation directory/source”. Please refer to the program source for

actual coding method.

Page 131: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

124 intra-mart WebPlatform/AppFramework

3.7.1.3 Access Controller Module

You can control to display or hide the information between access condoler tags.

The area between access controller tags is controlled by the access controller. You can control access right for roles, organization, affiliation and public group. The area controlled by the access controller is hidden to the users who do not have the access right.

Access Controller Tag You can controlee displaying or hiding by describing an access controller tag in JSP page.

//Control the display by the access right configured in Access Controller ID(controller1). // If access right information of controller1 does not exist, the contents will not be displayed. <imartTag:accessCtrl controller="controller1"> Contents between Access Controller Tag:controller1 </imartTag:accessCtrl> // Control the display by the access right configured in Access Controller ID(controller2). // If access right information of controller2 does not exist, the contents will be displayed. <imartTag:accessCtrl controller="controller2" defaultShow="true"> Contents between Access Controller Tag:controller2 </imartTag:accessCtrl> // Control the display by the access right configured in Access Controller ID(controller3). // If access right information of controller3 does not exist, the contents will not be displayed. <imartTag:accessCtrl controller="controller3" defaultShow="false"> Contents between Access Controller Tag:controller3 </imartTag:accessCtrl>

Configuring access right of access controller This is done in “Access Controller Setting” page of login group administrator.

You have to configure the right to display (role, organization, affiliation and public group) for each access controller

(access controller ID).

Page 132: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 125

3.7.2 Business Logic Tier This section describes the modules that belong to the Business Logic Tier.

3.7.2.1 Application Common Module

Logic processing modules which are necessary for the development of the various applications are converted into

objects for convenience. By embedding and editing these objects into business logics, it is possible to develop a Web

system with multi-tier architecture in much shorter period of time, without needing to create the logics again.

Summary of Application Common Module Objects Logic processing modules that are vital for application development (session control or DB access) are converted into

objects and provided for convenience. With these objects, it is possible to realize inter-page session control. In addition,

footer information such as company name, or login user names to various databases can also be accessed from these

objects. By embedding these objects into the application logics and editing them, it is possible to develop a complex Web

system in much shorter period of time, without needing to create additional logics. In addition, there are also objects to

gain access to various setting values including the application's environment variable, object to access section codes,

database-related general object, date-related object, debugging-related object, and URL management objects, etc. By

using all these objects, it is possible to gain access to various types of information, such as the employee codes of those

currently logged onto the system, or the name of HTML page they viewed immediately before.

There are also much more advanced functions, such as methods that gain simultaneous access to multiple numbers of

DBs, or search streaming that displays a specific number of search results each time when there is a large volume of

search data, application lock function, XML-compatible module, etc.

Please refer to the “Application Common Module” under “JavaEE Development Model” of the API List for the further details of application common modules.

3.7.2.2 E-mail Related Modules

You can make delivery processing of e-mail toward SMTP/POP3 compatible mail server by

using this module.

Page 133: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

126 intra-mart WebPlatform/AppFramework

Mail Server Setting Mail server setting is done using the “conf/imart.xml” file. The following is the coding example.

<smtp-server host="localhost" port="25" mailbox-check="false" />

Introduction of Sample Programs

There is a sample program for e-mail related modules at the following location. sample/jsp/extra/sendmail/section2/mail2-2.jsp

As for how to send e-mails, please refer to "3.2 E-mail Delivery” under “3. Using Various Java Component Groups (im-BizAPI)”.

The sample is coded with a function call-out from within the JSP file to make it easier to understand. Please

insert the codes at appropriate location when using JavaEE Framework.

3.7.2.3 External Software Connection Module

This is a module that enables the linkage and connection between intra-mart and external software by directly invoking various API of im-BizAPI from off-the-shelf application packages. There are 2 methods to establish the linkage and connection.

Firstly, since the “Interacting API connector” is provided as a Java-based API, user can link any process and im-BizAPI

as long as the external software supports Java Runtime Environment. For instance, displaying intra-mart view within a

portal by incorporating off-the-shelf portal server products or by interacting with other applications and operating user

account information from Java processes running batch operations is possible.

The other way is to call up various API of im-BizAPI from external software via Web service.

As for the details on the external software connection modules, please refer to “External Software Connection Modules” under “Developer’s Guide” of API List.

Page 134: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 127

3.7.2.4 ERP Access Module

SAP API has been converted into library using SAP Co technology. By using standard Java technology, add-ons can

be developed at a smaller cost. This function is only available with intra-mart WebPlatform/AppFramework Enterprise

Edition.

The EPR Access Module currently supplied comes with various API that can be linked up with SAP. Other ERP

Access Modules are scheduled to be added in future.

Please refer to the following references for detailed information. ・ Tutorial Guide for real-time link up with SAP R3 (attached with the product)

“ERP Linkage Module Tutorial Guide”(im_sap_api_tutorial.pdf) ・ API List’s “JavaEE Development Model" – “Business Logic Tier” – “ERP Access Module”.

SAP, SAP R/3, SAP JCO, and other SAP product/service names written within products are trademarks or registered trademarks of SAP AG in Germany and other countries.

3.7.3 Business Fundamental Tool This section describes about the modules related to Business Fundamental Tool.

3.7.3.1 Access Security Module

In addition to the basic authentication function of login users, it can also control the display of specific Web pages

according to the access control of each user. For example, if a regular employee accesses the system, the menu will

not display the pages to which he/she does not have access rights. As a result, the user is not even aware of the

existence of such pages. However, when an administrator accesses the system, the same menu page will show all the

pages that the manager have access rights. By utilizing the Access Security Module, it is possible to customize different

page contents for different login user. As for the setting-up, please refer to the Administrator Guide “2.5 Access Security

Control” and “2.7 Application Registration”.

Page 135: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

128 intra-mart WebPlatform/AppFramework

For intra-mart Ver5.0 and newer version, it is possible for each user to switch default language and select the screen

theme color. Previously all user information setting has have to be done by the System Administrator, but intra-mart

Ver5.0 (and newer version) allows assignment of Login Group Administrators under the System Administrator, so that the

Login Group Administrators can manage the user information.

In addition, all the Access Security functions are now converted into API, making it possible to create a unique and

original menu page. intra-mart can also support a complete Secure Sockets Layer (SSL). With SSL, it is possible to

ensure security by encrypting all the contents to be sent.

In addition to the standard intra-mart Access Security Module introduced above, there is also an optional Extension Module called “IM-SecureSignOn”. “IM-SecureSignOn” uses an independent agent-type reverse proxy method that allows easy to implement single sign-on over a wide scope of application. Please refer to the “3.9 Embedding and Operating the Extension Modules” under the “3. Using Various Java Component Group (im-BizAPI)” for details.

Please refer to the separate volume “Access Security Specification Manual” about the details of access security.

3.7.3.2 Workflow Module

This module allows the efficient development of a Web browser-based workflow. By simply registering a created

application to the document workflow as “Task”, it can be used as an application compatible with the workflow. The

standard package workflow includes the regular workflow, as well as the “Applicant Route Creation Workflow” which

allows the applicant to select the approver when creating the application. Please refer to the separate volume “Workflow

Guide” for the details of workflow function

3.7.3.3 Business Process Workflow Module

Unlike document workflow, which centers on applications and approvals (the workflow module of standard package and

IM-Workflow Designer, etc.), business process workflow module can automate business processes by registering the

business processes in advance. As a result, it is possible to verify the correctness of office processes and improve work

efficiency drastically. Please refer to the separate volume “Workflow Guide” on the details of business process workflow

function.

Page 136: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 129

3.7.3.4 Batch Control Module

intra-mart comes with a scheduling function allowing for program execution scheduling by the batch server. First, a

batch program that contains logic to be batch-executed is created, and then set the execution date on the batch setting

page.

Since a batch program does not have any view (page), it cannot be created using JavaEE Framework. It also does not allow any functions related to page or Web mechanism. (such as file download).

For the detailed information and setting of Batch Control Module, please refer to the Administrator Guide, “2.11 Batch Control Operations”.

Batch Program Written in Java

To write batch-execution logics in Java language, the intra-mart’s interface class

“jp.co.intra_mart.foundation.server.batch.ProcedureComponent” must be implemented. For the detailed

specification of interface, please refer to the API List’s “JavaEE Development Model” – “Tools” – “Batch Control

Module”

3.7.3.5 Portal Module

This module displays a preset page (called “portlet” in portal applications) as the login default page. By displaying a list of

commonly used application and prompter pages for user at the initial default page would improve the work efficiency.

Various pages created with the applications can be registered as portlets, and users can freely design and layout these

portlets at the portal screen. There is no restriction on the number of portal screen combinations; user can use the tabs to

switch the portal screens. By allowing the switching of portal screens for different organization, role, or user, the system

can provide the most suitable page to support the business operations.

<Portals for Company/Organization, User>

Page 137: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

130 intra-mart WebPlatform/AppFramework

Creating Portlet Page Create a portlet page to be displayed on the portal screen of Script Development Model, JavaEE Development Model,

Framework Development Model and External URL. intra-mart is pre-installed with sample portlet pages in advance.

To display a page as a portal, it must be changed according to the terms of the portal module. To create a portal screen, refer to the API List’s [JavaEE Development Model] – [Tools] – [Portal Module] – [Portal] – [Development Guide].

For the details on portlet registration and various portal screens, please refer to the Administrator Guide “2.9 Portal Setting and Operation”.

3.7.3.6 ViewCreator

ViewCreator is a tool to create various tables or charts by using data in database from the pages of the intra-mart.

Usable database are login group database and system database. ViewCreator has two main functions; query

maintenance and data reference maintenance.

Query Maintenance This combines the table and view on the database and creates the table

which is referred by the data reference maintenance. In addition, this

can display the created query and preview of the table, and create a

view.

Data Reference Maintenance This configures the way to display the data created in the query

maintenance (chart or table) and to refine data. In addition, this can

also configure the reference authorization by each data reference.

In terms of created data reference, you can search data, refine the displayed items and change the listing order in the

screen display. In addition, you can add data reference as a portlet, output it as a CSV/HTML file or a program file of

script development model. Output program source can be freely customized and reused.

Page 138: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.7 Embedding & Operating the Modules

Programming Guide - JavaEE Development Model Version 131

Thus, it is an important feature of ViewCreator to easily operate creation/display of the various tables and chart based on

the database data on the Web browser.

For the details of the operation of ViewCreator, please refer to the Administrator “2.13 ViewCreator”.

<ViewCreator>

Page 139: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

132 intra-mart WebPlatform/AppFramework

3.8 Embedding & Operating

the Units intra-mart WebPlatform/AppFramework comes with units as reusable software parts. You can use them by simply

embedding them into user applications. In addition, they can be customized freely as the source codes are open and

public.

3.8.1 Application Common Master Unit Commonly used masters for system development, such as company data, organization data, group data, customer data, client data, and product data comes together with the standard package. It is possible to design and develop a system in a short period of time by utilizing these masters. There are default APIs that helps to develop systems that can be linked with different intra-mart application series, and also the accessing of the masters. Please refer to “2.8 Application Common Master Unit” and “2.9 Application Common Master Unit -2” of the Administrator Guide, as well as the separate volume of “Application Common Master Reference” for details. As for API, please refer to the Application Common Module “jp.co.intra_mart.foundation.appcomn” package.

intra-mart Ver5.0 onwards the archive management of the master can be carried out by the date stamp.

3.8.2 Calendar Unit By embedding Calendar Unit, it is possible to display a calendar page that is linked with the data set on the Calendar

Maintenance page. Date input with considering the company’s non-working and working days can be done on the

Calendar page.

Page 140: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.8 Embedding & Operating the Units

Programming Guide - JavaEE Development Model Version 133

3.8.2.1 Calling the Calendar Unit

By using the “calendar” tag of the intra-mart’s standard package extension tag library, a calendar can be pasted on a

page.

<imtag:calendar year="2003" month="6"/>

Although the tag above only shows how to display the calendar, it is also possible to change the display format of the

calendar or define responses to the user’s click actions by applying the various other options.

Please refer to the attached API List on the tag library specifications.

3.8.2.2 Receiving Calendar Data

By specifying the name of function (written in client-side JavaScript) at the tag’s “click_action” option, it is possible to get

data information on the date selected (clicked) by the user.

<SCRIPT language="JavaScript"> function click_date(nDate, sName, bHoliday) { var dClick = new Date(parseFloat(nDate)); var sStr = dClick.toString(); sStr += " [ " + sName + " ]"; sStr += " [ " + bHoliday + " ]"; window.alert(sStr); } </SCRIPT> <imtag:calendar year="2006" month="6" click_action="click_date"/>

3.8.2.3 Calendar Master Maintenance

Calendar Master Maintenance has functions to manage days of the week, and the company’s specific non-working or

working days.

Please refer to the Administrator Guide about Calendar Master Maintenance.

Calendar Unit can be found in the following folder. installation directory/pages/unit/almanac Calendar unit is created by Script Development Model.

Page 141: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

134 intra-mart WebPlatform/AppFramework

3.8.3 Tree View Unit By embedding Tree View Unit, the hierarchized data can be displayed in tree view, making it easier to understand the

tiered structure and select from the menu. It is used to display organization tree view of [Page Setting] page under the

[Page] menu. For the detailed information on Tree View Unit, please refer to the API List’s [Unit] – [Tree View].

<Example of Tree View Unit >

3.8.4 i-mode unit By embedding i-mode Unit, it is possible to view the pages created and registered under [Menu Setting] – [Login Group

Control], corresponding to the screens of i-mode mobile phones. To create an i-mode-compatible page, first create a

page that can be displayed within the i-mode’s display area, then select either “Use only as mobile page” or “Use as

PC/mobile page” in the “PC/Mobile” when registering the page at the [Menu Setting] – [Login Group Administration]. For

the users, several items setting must be carried out under [User Setting] – [Mobile Password Setting] in advance.

Please refer to the next section “i-mode Setting in Page Management Master Maintenance” for setting details.

3.8.4.1 i-mode Setting in Page Management Master Maintenance

When a Login Group Administrator registers i-mode compatible page under [Login group Control] – [Menu Settings], you

have to select “Mobile” in the “Client Type” option. As for the operation of [Menu Settings], please refer to the

Administrator “2.7 Application Registration”.

<[Login Group Control] – [Menu Settings]>

Page 142: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.8 Embedding & Operating the Units

Programming Guide - JavaEE Development Model Version 135

3.8.4.2 Setting i-mode Address and Password

In order to use the i-mode-compatible pages on an i-mode mobile phone, the Login Group Administrator must set a

mobile e-mail address and mobile password for each user under the [Login Group Settings] – [Account Settings]. The

individual user can log in to change the default mobile password under [User Settings] – [Mobile Password Setting].

<[Login Group Settings] – [Account Settings] of the Login Group Administrator>

<[Mobile Settings] under [User Settings] folder>

Page 143: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

136 intra-mart WebPlatform/AppFramework

3.8.4.3 Out-of-Office Setting for i-mode

All the e-mails sent from intra-mart are usually sent to the e-mail addresses registered under [Login Group Settings] –

[Account Settings]. If a user sets an [Out-of-Office] setting in [User Settings] – [Out-of-Office Setting], all the e-mails will

be sent to the i-mode e-mail address of the user in addition to his/her regular registered e-mail address.

The setting can be done under the user’s [User Settings] – [Out-of-Office Setting]. However, in order to utilize this

function, the Login Group Administrator must have first setup the [Mobile Address] under [Login Group Settings] –

[Account Settings].

<Out-of-Office Setting>

By utilizing the extension module “IM-Contents Translation”, it is possible to convert contents into various types of mobile devices other than i-mode. Please refer to the following section “IM-Contents Translation” for details.

Page 144: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.9 Embedding & Operating the Extension Modules

Programming Guide - JavaEE Development Model Version 137

3.9 Embedding & Operating

the Extension Modules Extension modules are module groups that are available separately from the standard modules of intra-mart

WebPlatform/AppFramework. These extension modules are meant for the users who need much more advanced

modules, which can be embedded as required just like the standard ones. This section describes the extension modules

currently available.

3.9.1 Screen Common Module Extension In addition to the standard Screen Common Modules, there are “IM-Curl (optional)” and “IM-FComponents (optional)”,

which can drastically improve usability.

3.9.1.1 IM-Curl

This is an extension module that realizes a visual client GUI environment that can link up with intra-mart. It gives a drastic

improvement in usability and provides efficient development.

IM-Curl is a rich client-side Web programming language that can develop advanced and complex user interfaces. IM-Curl

is available only with JavaEE Development Model.

IM-Curl provide quick operability and rich GUI Recent Web business applications require clients to have expressiveness and operability.

IM-Curl has a wide range of development coding capabilities, from HTML-like text format to high-performance 3D

graphics.

<Example of IM-Curl Page>

Page 145: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

138 intra-mart WebPlatform/AppFramework

IM-Curl reduces server load. Usually, advanced Web applications add more burden to the server loads. However, with IM-Curl, it can reduce the

server load and maximize the effective use of communication bandwidth by implementing practical application processes

on the client side.

IM-Curl realizes high-speed and smooth processing with little server load by distributing application processes between

the server and client side (each PC).

Please refer to the following on the details of IM-Curl. ・“IM-Curl Interaction API Tutorial Guide” (im_curl_api_tutorial.pdf), a tutorial guide for creating applications that allows intercommunication between Curl Applets. ・“jp.co.intra_mart.foundation.im_curl” class within “Application Common Module” under “Business Logic Tier” in “JavaEE Development Model” of API List

Page 146: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.9 Embedding & Operating the Extension Modules

Programming Guide - JavaEE Development Model Version 139

3.9.2 Printing Form Module Extension In addition to the standard printing form module, there are also optional extension modules that can carry out more

detailed form printing or mass form printings.

3.9.2.1 IM-PDF Designer

This is a module that can handle more complex form format by using PDF, and can also handle single form as well as

multiple forms. Visual form designing tool “IOWebDoc” is used to create the form formats. It creates a PDF file based on

the data and layout definition file from a user application, and then activates Acrobat to print it out.

Example with Embedded IM-PDF Designer

<Form Sample Page created with Embedded IM-PDF Designer>

Page 147: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

140 intra-mart WebPlatform/AppFramework

Operation Overview of IM-PDF Designer Embed the IM-PDF Designer and operate it as one of the intra-mart modules.

By utilizing the API supplied by IM-PDF Designer as a Java program operating in intra-mart, It is possible to create a PDF

file based on a form format and using form data obtained from a database (possible to accommodate various types of

simple to complex forms).

The following is an example of implementation on the Script Development Model: the Work Attendance Manager sample

demonstrates how a PDF form can be created based on an existing form design by simply clicking on the [PDF Printing]

button. Once created, the Acrobat for PDF display will be automatically activated to display the form on the screen.

Printing is carried out in Acrobat.

(The same function can be realized on the JavaEE Development Model)

Using IM-PDF Designer in Multiple Application Server Environment To use IM-PDF Designer in an environment where multiple numbers of applications servers are installed, IM-PDF

Designer must be activated on Storage Service. You can manage all the created PDF files by the Storage Service in this

way.

<Using IM-PDF Designer in a multiple application server environment>

Please refer to the “Programmer’s Guide” that comes together with the PDF Designer on coding examples.

Page 148: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.9 Embedding & Operating the Extension Modules

Programming Guide - JavaEE Development Model Version 141

3.9.2.2 IM-X Server

This is a printing module to output a lot of ledger sheets, directly output to the printer, and support electronic signature

and time stamp. This provides diverse functions such as on-demand printing or direct output with advanced business

ledger sheet solution corresponding to XML.

Creating, outputting and delivering various types of ledger sheets Since creation of ledger sheets by IM-X-Server is defined as XML, you can reduce the development processes with

making computerization (PDF, HTML, CSV, CPR), printing (direct printing, FAX delivering), searching and input form in

one source multi-format. This provides a total solution to create not only main ledger sheets but also business reports

required to daily work.

Also providing a design tool enabling to create a ledger sheet in detail This corresponds to Japan-specific complicated design such as ruled line, report per page, consolidate or single ledger

sheets, sub-report, label, customer size or etc. This also supports various business ledger sheets in flexible expression

such as creating dynamic graph, electric signature, table calculation, column setting by grouping multiple objects or etc.

Page 149: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

142 intra-mart WebPlatform/AppFramework

3.9.3 Access Security Module Extension In addition to the standard Access Security Module, there is an optional Extension Modules to enable single sign-on.

3.9.3.1 IM-SecureSignOn (Secure Sign On)

IM-SecureSignOn is a tool that enables single sign-on. All the logins to various types of Web systems in the company can

be achieved with a single login to this SecureSignOn. This system is based on a proprietary agent-type reverse proxy

method and is easy to introduce and implement with a wide scope of application. This system has already been utilized

by NTT Data for its employees of more than 10,000.

Characteristics of IM-SecureSignOn It is possible to use in a large-scale, multi-environment condition. The agent installation-type reverse proxy method has both characteristics of agent plug-in and reverse proxy method, such as “not requiring to have client setting”, “possible to implement by stages in a large-scale environment”, and “compatible with any Web servers or OS”. It is possible to implement in incremental stages when multiple number of Web servers are already in operation. (Not necessary to have a proxy server where all accesses consolidate at) ACL carries out distributed management over the servers (central control unction is currently under construction). It is compatible with almost all Web servers. The operation of the authentication module has been verified on WindowsNT, Solaris and Linux. The name, e-mail address, and department information can be retrieved using CGI. Backend User Database supports LDAP and NT domains. It is possible to support proprietary data using plugging. It is not possible to tamper access ticket due to the use of electronic signature.

Page 150: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.9 Embedding & Operating the Extension Modules

Programming Guide - JavaEE Development Model Version 143

3 Methods to Achieve Single Sign On Usually the reverse proxy method and the agent module method are used to achieve single sign-on. IM-SecureSignOn

uses a proprietary agent installation-type reverse proxy method that has the advantages of both methods mentioned

above.

For details please refer to the manual that comes with IM-SecureSignOn.

Page 151: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

144 intra-mart WebPlatform/AppFramework

3.9.3.2 IM-SecureBlocker

This can realize security measures of Web applications opened in internet with low cost. You can apply this to

vulnerable points to minimize the influence by the application to the whole Web application.

SecureBlocker is a Java class library to inspect input parameters and automatically render it harmless.

The followings are the advantages by introducing IM-SecureBlocker.

Reduces verification and implementation costs for checking function of the parameters’ input values. Implements vulnerability countermeasures of Web applications regardless of the developers’ skill. Controls checking each parameter used in Web site. Check cross-site scripting, OS command injection, directory traversal and SQL injection.

Page 152: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.9 Embedding & Operating the Extension Modules

Programming Guide - JavaEE Development Model Version 145

3.9.4 Workflow Module Extension In addition to the standard workflow module, there are 3 optional extension modules, the “IM-Workflow Designer

(optional)”, “IM-FormatCreator (optional)”, and “IM-ΣServ (optional)”.

3.9.4.1 IM-Workflow Designer (Bundled with Advanced Version)

This is a workflow function that can accomodate complicated conditions, such as parallel processes, fusions, or with

conditional branches. They can be configured and executed for fusiing or branching processes

Please refer to the supplementary volume of “Workflow Guide” for the details on IM-Workflow Designer.

3.9.4.2 IM- FormatCreator

IM-Format Creator is a solution that automatically generates application forms for electronic application. The applications

can be easily generated by following the built-in generation wizard, so you need not to have knowledge about Web page

creation language such as HYML, JavaScript or XML and database. The created application documents can be easily

associated with intra-mart workflow in the special screen page. In addition, it can efficiently issue a ledger sheet by

re-using the previous ledger sheets.

Please refer to “IM-FormatCreator” on details.

3.9.4.3 IM-EX Application System

This is a solution to use Excel sheets into application format page for electric application. By using this with intra-mart

workflow, you can create application workflow with only configuration but without programming. You can use document

format or macro of Excel functions to check the input. It is possible to save the input information in the specified table in

the database.

Page 153: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

146 intra-mart WebPlatform/AppFramework

You can make the application document into web resource only by preparing Excel format. You can coordinate this with intra-mart workflow by utilizing the used Excel format as input page. You can configure check the input from the client side by setting Excel format or provided macros. Information input to Excel can be saved in the specified table in the database. You can output the information saved in the database in Excel format.

You do not need knowledge about programming language for registering Excel format or input setting.

3.9.4.4 IM-SonicESB

IM-SonicESB is a back-end system integrated platform (ESB) linking up multiple numbers of existing systems. It also

comes with functions that guarantee the consistency of data between systems, making the development of high-reliability

application linked up between the Web services easily.

It can realize dynamic and mission-critical system integration with inclusive of the backend by linking up with the

Business Process Workflow Module.

Page 154: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.9 Embedding & Operating the Extension Modules

Programming Guide - JavaEE Development Model Version 147

3.9.5 Solution to Link Up with External Software intra-mart comes with a solution to link up with external software applied by other companies.

3.9.5.1 Integrated Search Solution

IM-Integrated Search Solution is a document search system that can do knowledge search using natural language on

various file types such as MS-Word, Ichitaro, MS-Excel, and PDF, a result of cooperation with “ConceptBase” by

Justsystem Corporation.

By providing a linkage module between ConceptBase server and Storage Service, it is possible to develop a system that

utilizes the powerful document search function of ConceptBase. In addition, it is also possible to retrieved document

summary and content of the document search in text format.

Concept Base Search can handle document file search, while CB RDB Gateway can handle RDB-related information

search. Finally, CB Gateway for Lotus Notes can handle Notes DB search.

3.9.5.2 Multi Device Solutions

Using X-Servlet (Flexfirm) enables contents distribution to multi devices. Please refer to the attached manual of X-Servlet

for details.

<<Main Features>> Single URL When a URL is accessed, automatically recognize the accessed system model. Single Source One code accords to access methods of all domestic mobile communication companies. Auto Layout According to the accessed model, automatically convert images or divide pages.

Page 155: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

148 intra-mart WebPlatform/AppFramework

3.10 Other Functions intra-mart also comes with the following functions.

3.10.1 Source Security Function Source Security Function is a function that prevents any illegal file downloading via the Web, by placing only the bare

minimum number of files on the Web server that must be directly referred by HTML, such as image files (e.g. if files),

CSJS, and applets, while keeping major program data on an application server or information server. Since intra-mart’s

can run on a multiple number of hardware independently via the servers’ network connection, the program files on

application servers or information servers that are operating on other independent machine, and the data files stored on

Storage Service, all cannot be illegally downloaded via the Web.

3.10.2 Application Lock Function Application Lock Function (process transaction) can be realized. By using the Lock API, serial processing of programs

can be achieved. In addition, this API can also lock all the servers in a distributed application server environment.

Please refer to “API List” for details.

3.10.3 Unique Information Retrieval Function This API allows the retrieval of unique information from all the Application Runtime, even in a distributed Application

Runtime environment. (This function control Application Runtime uniquely based on the administration information of

Server Manger). Please refer to the following page in “API List” for details

jp.co.intra_mart.foundation.service.client.information.Identifier

3.10.4 File Operation This application is a utility that operate files and directories under the system root of Storage Service. It can create new

directory or file, delete or upload files, change their names, or edit texts. All the uploaded files will be stored in Storage

Service.

<File Operation Page>

Page 156: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.10 Other Functions

Programming Guide - JavaEE Development Model Version 149

3.10.5 SQL Query Database operation is a simple tool that directly executes a SQL statement on a database. Select a connection

destination, key-in the SQL statement in the text area and click on the [Execute] button.

<SQL Query Page>

3.10.6 Calling the Trigger Function upon Database Error When a database error occurs, the init function in the dberr.js file under the im information server root will be called up.

At this point, the reconnection procedure in the event of database connection break can be coded.

3.10.7 Linkage with LDAP Using Java JNDI, information on LDAP can be searched, updated, or deleted.

Login users can also be linked between intra-mart and LDAP. Please refer to “1.11 Usage with LDAP” in the

Administrator Guide.

Page 157: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

150 intra-mart WebPlatform/AppFramework

3.10.8 Internationalization The following functions are designed and implemented in consideration of internationalization (i18n).

Script Development Model im-JavaEE Framework(only Service Framework) Application Common Master Access Security Module

You can develop internationalized applications or localize each application by using these.

Please determine the type of the locales to use before the operation.

If adding a locale when the system runs, it might give some impacts on the application operation with occurring data disorder especially in application common master.

Please refer to the following documents about the details of the functions. ・API list ・im-JavaEE Framework specification document ・Application Common Master Materials ・Access Security specification document

3.10.9 Creating Standard Screen (Common Screen

Design) The following documents are prepared.

Page design guideline Style sheet specification document

APIs according to the page design guideline are also prepared. API specifications are included in the documents of

Page design guideline.

By creating a screen page by using common API based on this, you can develop applications in the same screen page

design as the product standard page. If the designs are standardized, the appearance and operability will be unified.

This is an advantage for users to handle an application without uncomfortable feelings when they are called from the

menu. Thus, please consider using this guideline as a method to unify the design at the application development.

Each page source of intra-mart WebPlatform/AppFramework is installed in the plain status. Please use these as

application methods of Page Design Guideline or an example to use API.

3.10.10 Using Portal Page You can create and display a specific portlet in intra-mart portal page when creating intra-mart application.

You have to configure the page displayed as a portal according to the rules of portal modules but not of the normal screen page. Please refer to [ J ava E E Development Model]-[Business Fundamental Tools]-[Portal Module]-[Portal]-[Development Guide] and [Script Development Model]-[Business Fundamental Tools]- -[Portal Module]-[Portal]-[Development Guide] in API list about creating a page for a portal.

Please also refer to “2.10 Portal Setting and Operation” in Chapter 2, “Login Group Administrator” in Administrator Guide.

Page 158: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.10 Other Functions

Programming Guide - JavaEE Development Model Version 151

3.10.11 Shortcut Access Function This is a function to switch the screen page after login to the arbitrary page by specifying URL parameters for short cut

access as initial access URL.

In addition, you can configure the security about the display.

Please refer to “Access Security Specification Documents” for details.

Security functions which can be used when using short cut access functions are as follows.

Specifying users to display a specific page (you can select multiple users) Specifying an expiration date to display a specific page. Selecting the following functions about the login control.

Accessing directly to the specified page after entering user ID and password in login screen. Accessing directly to the page without specifying user ID and password

(This can be used only if specifying one user allowed to display.)

Shortcut access URL This is a URL added as a parameter to the normal initial access URL.

http://<server>/<context-path>/<login-group>.portal?im_shortcut=<Shortcut ID> Example: http://localhost/imart/default.portal?im_shortcut=xazh03nbe43wd

Creating a shortcut ID Shortcut ID is tied with displayed page and security information.

This is created with using API by specifying displayed page and security information.

In the main areas, there is an explanation of the creation steps of ID shortcut in case of specifying

“pages/src/sample/shortcut.js” and “shortcut.html”.

// Creating a shortcut manager ShortCutManager manager = new ShortCutManager(“default”); // Creating shortcut information ShortCutInfo shortCutInfo = new ShotCutInfo(); // Displayed URL shortCutInfo.setU("sample/shortcut.jssp"); //Parameter setting given to the displayed URL(arbitrary specification) shortCutInfo.setUrlParam("arg1","value1"); shortCutInfo.setUrlParam("arg2","value2"); // User who can display shortCutInfo.setAllowsUsers(new Sring[]{"guest","ueda"}); // Whetehr login authentication is necessary or not (authentication is required) shortCutInfo.setAuth(true); // Expiration date of this information (valid for 10 days after creating) Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DATE,10);

Page 159: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 3 Using Various Java Component Groups(im-BizAPI)

152 intra-mart WebPlatform/AppFramework

shortCutInfo.setValidEndDate(calendar.getTime()); // Creating shortcut ID var shortCutId = manager.createShortCut(shortCutInfo);

Page 160: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

3.10 Other Functions

Programming Guide - JavaEE Development Model Version 153

Chapter 4 Appendix

Page 161: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 4 Appendix

154 intra-mart WebPlatform/AppFramework

4.1 Message Settings The message setting can be carried out in Java property file format under the “%Server Manager%/conf/message”

directory.

Please refer to “Administrator Guide” for further details on message setting.

Use “MessageManager” class to retrieve the configured message. MessageManager is equipped with the

“getMessage()” method to obtain message character strings from a message ID. This method will retrieve the message

based on the locale at the time of login.

Please refer to the description of “jp.co.intra_mart.foundation.security.message.MessageManager” class.

Page 162: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

4.2 Reserved Word List

Programming Guide - JavaEE Development Model Version 155

4.2 Reserved Word List The following terms are intra-mart's reserved words and cannot be used for other purposes.

IMXXX (prefix is “IM(im)”) XXX(prefix is “ (underscore)”) Classes used by intra-mart API, and global function names (intra-mart API using capital letters as prefix) All the reserved words in JavaScript and Java

Page 163: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Chapter 4 Appendix

156 intra-mart WebPlatform/AppFramework

4.3 Restrictions The followings are restrictions on the application file names and JavaScript function names.

4.3.1 File Name The following characters cannot be used for a file name.

¥ / : ; * ? ” < > | & # [ ] ( ) { } (space) (tab) (Two-byte Japanese characters cannot be used)

File name refers to the presentation pages (.html files) and file containers (.js files). Data files are not included.

4.3.2 ID, Code The following characters cannot be used for any of the ID or code (e.g. User code) in intra-mart functions.

¥ / : , ; * ? ' " < > | & # + [ ] ( ) { } (space) (tab) (Two-byte Japanese characters cannot be used)

4.3.3 JS Function The following characters cannot be used for a function name

* < > [ ] (Two-byte Japanese characters cannot be used) (Other restrictions include those based on JavaScript specifications)

These are constraints for the functions operating on servers. They are not applicable to the functions that operate on client side (within HTML). In addition, these constraints are applicable not only to the functions, but also to the registered names and method names of the functions.

Page 164: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

• 2 2 Web Application Models ........................................7

• A API List ..................................................................6

• E EJB Component ......................................................9

• I IM- FormatCreator ............................................... 144 IM-Curl ............................................................... 136 IM-EXApplication System ..................................... 144 i-mode unit ......................................................... 133 IM-PDF Designer ................................................. 138 IM-SecureSignOn .........................................141, 143 IM-SonicESB....................................................... 145 IM-X Server ........................................................ 140 IM-Business Process Workflow............................. 127 IM-Workflow Designer.......................................... 144

• J JavaEE Development Model ................................. 7, 9 JSP File ..................................................................9

• L Linkage with LDAP .............................................. 148

• M MultipartFormData ............................................... 101

• N new NetworkFile.................................................. 103

• S Servlet(Java component) .........................................9 SQL query .......................................................... 148

• V ViewCreator ........................................................ 129

• X XML parser ......................................................... 114 XML Mode........................................................... 114

• あ Access Security Module ....................................... 126 Application Lock Function .................................... 147

Application Development Outline ..............................9 Application Common Module ................................ 124 Application Common Master Unit .......................... 131

• い Unique Information Retrieval Function .................. 147

• え Extension Module ................................................ 136

• か Out-of-Office Setting............................................ 135 External Software Connection Module................... 125 Solution to Link Up with External Software ............ 146 External process ................................................. 113 Screen Common Module ...................................... 119 Calendar unit ...................................................... 131

• き Starting up and Exiting.............................................2 Business Fundamental Tool .................................. 126

• く Graph Drawing Module ........................................ 122

• こ Internationalization .............................................. 149

• し Automatic Authentication .........................................3

• せ Restrictions......................................................... 153

• そ Source Security Function ..................................... 147

• て Debug................................................................. 115 Sending E-Mails with Attachment File ................... 110

• と Integrated Search Solution................................... 146

• は Batch Control Module .......................................... 128

Page 165: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

• ひ ViewCreator

Outline of ViewCreator............................................. 129 Standard page..................................................... 149

• ふ File upload............................................................ 99 File download...................................................... 104 File upload unit ................................................... 133 File server ............................................................ 99 File operation ...................................................... 147 Deleting file ........................................................ 106 File Storage Location...............................................8 Folder.....................................................................4

• へ Page ......................................................................4 Script Development Model .......................................7

• ほ Portal screen ...................................................... 129 Portal module...................................................... 128

• ま Multi-device solution ............................................ 146

• め Main delivery ...................................................... 108 E-mail Related Modules ....................................... 124 Message setting .......................................... 151, 152 Menu configuration ..................................................4 Menu display...........................................................4

• も Module ............................................................... 118

• ゆ Unit .................................................................... 131

• よ Reserved words .................................................. 152

• わ Workflow.................................................................5 Workflow Module ................................................. 127

Page 166: Programming Guide - intra-mart · 1.5.1.2 JavaEE Development Framework 10 1.5.1.3 Advantage in using Framework with JavaEE Development Model 11 1.6 JavaEE Development 12 1.6.1 JavaEE

Second Version August, 2007

Programming GuideJavaEE Development ModelVer6.1