Howto

You can contact me (satya) using any of the following methods

As of June 6th 2004

  • Cell: 904-662-5427
  • email home: satya at activeintellect dot com
  • yahoo chat: satya_egroups at activeintellect dot com
  • news group: aspirej2ee at yahoogroups.com

http://www.activeintellect.com/aspire/aspire_distributions/?M=D

This directory on activeintellect.com provides latest aspire downloads. The following are available for downloading

  • Latest aspire jar file
  • Latest aspire properties file that goes with the above jar
  • Latest complete distribution of aspire
  • Any handy support jars
This is a guide for beginers allowing them to create their first web application under tomcat and a first page.
This document will describe the process of painting a web page using Aspire/J2EE. The document will start with a simple web page and proceeds to present web pages of increased complexity. I will talk about property files, aspire tags among other things
JSP Basics
Includes
Reading aspire data
using ihds
JSP References

Updates are quite straight forward in Aspire. An update is initiated by a user submitting a form. A form can be submitted using either a get method or a post method. Or you can even use a javascript function to collect the relevent fields and fire of a URL to the server along with the parameters.

Use these settings for your log file

Syntax for specifying data for a web page in one of the oldest in Aspire. As a result it is a bit awkward. Although I haven't completely fixed it due to backward compatibility concerns I have corrected it a bit. The following is an example.


###################################
# ManageUsersURL
###################################
ManageUsersURL=/login/manage-users.jsp
ManageUsersURL.transformType=jsp
ManageUsersURL.transform.classname=com.ai.jsp.JSPTransform
ManageUsersURL.dataRequestName=MUDR

request.MUDR.classname=com.ai.htmlgen.DBHashTableFormHandler1

request.MUDR.ActiveUsers.class_request.classname=com.ai.htmlgen.GenericTableHandler6
request.MUDR.ActiveUsers.query_request.classname=com.ai.parts.ReusablePart
request.MUDR.ActiveUsers.query_request.reuseRequestName=BL.GetActiveUsers

request.MUDR.InActiveUsers.class_request.classname=com.ai.htmlgen.GenericTableHandler6
request.MUDR.InActiveUsers.query_request.classname=com.ai.parts.ReusablePart
request.MUDR.InActiveUsers.query_request.reuseRequestName=BL.GetInActiveUsers
How to redirect a page to different urls after an update

Starting with build 21 look for a session variable called

profile_aspire_loggedin_status

The values are "true" or "false"

Previously this used to be called

aspire.loggedin_status

This document shows how to declare public urls and public update requests using Trivial authentication


request.aspire.authentication.authenticationObject.className=\
com.ai.aspire.authentication.TrivialAuthentication

request.aspire.authentication.authenticationObject.publicRequestNames=\
AppendFeedbackRequest

request.aspire.authentication.authenticationObject.publicURLs=\
url1,url2
Disable authentication for development mode
Or enable individual login pages
1. inserts
2. autonumbers
3. primary keys

Read this for sending a JSP page as an email using smtp mailer

An example of using the existing mail part.

Simple sample code of javascript to submit a form for aspire

1. You can use this document for substituting common headers and footers on your aspire web sites.
2. How to write your own expressions
3. Source code of the default expression functions

This class implements a mechanism to preload a certain number of connections for each data source. The facility also allows to keep those many minimum connections open during the clean up process.

Describes how to write web applications that can hook up to any web application context. Removes the need to hard code web application context in web applications


# USing the URLStringReader to retrieve a url as a string
#
request.GetBodyText.classname=com.ai.parts.URLStringReaderPart
request.GetBodyText.URL=\
/webapp/display?url=DisplayURL&ordid={ordid}&useid1={useid1}
request.GetBodyText.resultName=bodyText

This class implements a mechanism to preload a certain number of connections for each data source. The facility also allows to keep those many minimum connections open during the clean up process.

In brief this article discusses

. What are filters
. What are they used for
. Specifying filters in properties file
. A complete example where a filter is used
. What sort of filters available
. An example of a filter class implementation

Aspire allows "if" tags in your html pages. Here is an example.


<!--RLF_TAG BGN_IF aspire_key_name=literal_value if1 -->
..html segment
<!--RLF_TAG END_IF aspire_key_name=literal_value if1 -->

Aspire will take the "aspire_key_name" and try to locate it in the aspire data set. If it is there its value is taken and compared to the literal_value. The key is not case sensitive but the values are. If the strings are the same (or match) then the html segment will be included in the page otherwise not.

Key words

1. searching databases
2. dynamic where clause
3. javascript
4. form fields
5. form processing

summary

It is common to have search form when you are retrieving rows from a database. If the number of fields you are searching on are more than a few, it is cumbersome to check every field and correspondingly alter the where clause. These javascript routines allow you construct these where clauses on the fly. In this article I am going to show you the source code for these routines and how to use them in your form processing.

1. How to further format display fields
2. substr, document.write, inline javascript, field formatting

By slightly altering the the web-inf\web.xml you will be able to do this


http://host/your-app/display?url=Pag1URL&arg1=10
http://host/your-app/update?request_name=StateChangeRequest&arg1=10

Previously you would have needed to do


http://host/your-app/servlet/DisplayServlet?url=Pag1URL&arg1=10
http://host/your-app/servlet/UpdateServlet?request_name=StateChangeRequest&arg1=10

Aspire not only allows you to access and update data using stored procedures but also allows additional features to use stored procedures as the business layer. Here are a few things where and how stored procedures could be used in Aspire

Aspire comes with a set of javascript utilities to validate form fields. These utilities can jump start your validation process. For complex validations you may either have to extend or use your own tools. But these utilties atleast will show the way for accomplishing this.
Description to be entered

Aspire being an application server that serves html files on request, Aspire needs a way to locate these html files. Aspire also delivers these html files based on a mapping between a url name and the real html template file. Aspire gathers this information from properties or configuration files. As a result Aspire also need to read these files from the disk.

Detailed guide for writing login application

Read this article to know how you can specialize what happens when uncaught exceptions are thrown and how to handle them.

Talks about
1. update
2. redirecturl
3. inserts
4. autonumbers
5. Microsoft access

This class allows you to use connection pools from apache or tomcat

This document discusses the property file sections that deal with the display pages and update pages in Aspire.

..or reusing data definitions

Some time you want to write a jsp page that uses data from the url, session, or a configuration file but doesn't need any sql to be executed. You can define such a jsp page as follows ...

Aspire has a unique concept called generic transformations. These generic transformatons come handy while developing web pages as debugging tools and also discovery tools. A web page in Aspire has data and a transformation. Data is defined in a configuration file. Generic transformations allows you to retrieve data in various generic formats such as "text" and "xml" and "excel" with out ever painting a page.

Using this facility you can retrieve data before starting to write a JSP page or an Aspire tags page. This data importantly also shows the column names or meta data which is useful at the time of painting. Advanced applications can even convert this data to a typed language class.

This document describes the general phiolosophy of writing a login web page with in Aspire. I want to emphasize that because increasingly user authorization is being handled by such things as portals with single sign on and also enterprise security tools such as Netegrity or via servlet filters while leaving the main framework such as Aspire for painting and updating state.