About
Satya
Aspire/J2EE
Java.net
OnJava.com
Build Related
Release Notes
Download
Help
More...
White Papers
What is Aspire
Aspire's Benefits
Aspire's Features
Database Development
Architecture
More ..
Howtos
Base Framework
Data Access
Web
Advanced
Related Reading
Satya's AKC Blog
Satya's java.net Blog
Articles
Properties
Cheat sheet 1
Cheat sheet 2
property files
html files
jsp files
9-Aug-06
14-Dec-06
24-Oct-07
part of the upload file effort
4-Nov-05
During the early days of servlets I have used a trick to accomplish client side redirect after an update took place. This client side redirect will erase the update url from the browsers memory making the "back" and "refresh" buttons safe to the user.
20-Jan-06
Aspire depends on two data abstractions. One is a relational abstraction representing a collection of rows and columns and the other a hierarchical abstraction which is a grouping of the relational abstraction with a context. The central class in relational abstraction is represented by a type called IDataCollection. The hierarchical abstraction is represented by a type called "ihds".
This artilce gives sample code for how to do this
4-Aug-04
Aspire has facilities to allow for paging in large result sets coming from database. Usually rows from a database are listed as a table on the html page. In Aspire parlance this table is populated using a loop tag in the html file. The rows for that loop are retrieved using a loop definition in a properties file. The java class that usually does this work is called "GenericTableHandlerX". The nature of this handler is that it will retrieve the rows using a database cursor. This class does not allow to retrieve rows using a seek/get approach to retrieve a window of the result set. Such a pattern is necessary for effective paging. This facility is provided a java class called RandomTableHandlerX. This document explains this process using the RandomTableHandler7.
10-Dec-04
9-Sep-04
aspire.sessionSupport.applySessionManagement=yes aspire.sessionSupport.mainpage=/webapp/your-page-that-says-session-doesn't exist
aspire.authentication.userAuthorization=no aspire.sessionSupport.applySessionManagement=yes aspire.sessionSupport.mainpage=/webapp/your-page-that-says-session-doesn't exist request.aspire.sessionSupport.sessionSupportObject.className=\ com.ai.servlets.ExternalSessionManager
27-Oct-05
Aspire has two features that work together in scheduling requests. A "request" in Aspire's parlance is a unit of work or at times called a task. So when you schedule a request, you are actually scheduling tasks at a given interval.
The scheduler that is available in Aspire is a very basic scheduler with minimal but sufficient-for-the-purpose capabilities. Using this scheduler you can schedule a task (a piece of java code) for every n number of timer ticks. A timer tick is defined as a certain number of seconds.
For a task to be invoked by a scheduler it had to be registered. This is where the initialization support in Aspire come into play. Initializers in Aspire allow you to run code at the start up time. You can read the document on initialization to learn more about the interfaces.
10-Jun-03
18-Oct-04
Choose a an authentication implementation that is appropriate in the aspire properties file. Here is an example with Trivial authentication.
request.aspire.authentication.authenticationObject.className=\ com.ai.aspire.authentication.TrivialAuthentication request.aspire.authentication.authenticationObject.publicURLs=\ LoginPageURL,WelcomePublicJSPURL request.aspire.authentication.authenticationObject.publicRequestNames=\ LoginRequest
See how public urls are defined as a comma separated list aspire url names. Also see how aspires update requests can also be mentioned as public.
Notice that the lines are broken for clarity. You may want to put them on the sameline
14-Nov-07
1. You will be using commons file upload plugin or part
2. You will need to add a url rewrite filter that comes with aspire to convert extra path to url arguments
3. You will "singlefileuploadpart" to parse the multipart upload
4. You will use a PSExecutor2 part to save it as a blob in the database
5. You can BlobTransform to write it back to the browser
16-Nov-07
An example to use while trying to upload files. This is one possible approach with out saving blobs. You will use the file system to store the files and use a database table to hold references to them. You will also see here how one can display the files.
Receives a username and password and if they are valid it succeeds. if not an exception with an identifier of INVALID_PASSWORD is raised. One can use this exception to reroute to the same page or a different page.
It also looks at an aspire_target_url parameter and if present, indicates a redirector target as aspir_target_url_key=LOGIN_TARGET_PRESENT.
21-Oct-03
Aspire has a rudimentary scheduler in a package called com.ai.scheduler. This scheduler called BasicScheduler allows you to schedule tasks every 'n' number of intervals. Where an "interval" is defined as a time duration in milliseconds.
Here is a basic usage of the scheduler
21-Oct-04
Calls another part or business logic, by translating the input arguments to match the expected names of the receiver
1. originalNames: comma separated list of key names that needs to be copied from
2. newNames: comma separated list of keys to which the above key values will be copied to
3. propagateParams: yes|no: yes
4. reuseRequestName: Name of the reusable target request
if Propagateparams is "yes", then the incomign map is passed down. if it is set to "no" then a freshmap is created for the receiver Use "no" with caution, as this will result in a new transaction if the called parts have any database calls.
1.resultName: What ever the target request returns
18-Oct-05
While programming databases it is important sometimes to prime the connection object. This is done by setting some additional attributes or parameters on a connection object using the "select" statements. As Aspire uses connection pools, the programmers rarely have control of the connection object directly (although it is possible). This facility is an attempt at providing a way to set these parameters using an event model.
24-Aug-06
you can use this part for introducing or copying existing keys as new keys.
9-Nov-07
Generic mappers are a set of java classes used to quickly read key value pairs. For example the relationship between file extension and their content type is determined this way.
This mechanism is intended to be a general purpose mechanism for reading a dictionary of values
The current implementation is a bit inefficient but a future implementation can amend that.
7-Oct-05
IfPart extends the functionality of the multi request executor (essentially an implementation of a sequential processing pipeline) for conditional purposes.
29-Aug-20
Aspire during startup can load classes implementing the "IApplicationInitializer" interface. These classes will be loaded as per the factory specification. This means the loaded class can be a single instance or a multi-instance. Once these classes are loaded their "initialize method gets called".
28-Sep-06
11-Sep-06
request.putVariable2InSession.classname=com.ai.parts.SessionVariablesPart request.putVariable2InSession.variableName=var1 request.putVariable2InSession.newVariableName=var2
The above code when embedded in a pipeline will take "var1" from the hashtable and places it in the session as "var2". If newVariableName is not mentioned then it will just put it as variableName
16-Sep-04
27-Jan-06
The following example shows how to use substitution parts in your server side pipelines.
16-Dec-04
when you are working with web forms on a web browser, what the user types in on a form is called view state. If you were to return back to the form from the server side, you don't want the user to loose that data and reenter again. The process of managing that interaction is called view state management.
14-Oct-04
The context string looks like
<Context path="/akc" docBase="w:/satya/webapps/akc" debug="0"/>
The question is what is the parent node to the "Context" node. Here is the hierarchy in that xml file
<Server><Service><Engine><Host> <Context path="/akc" docBase="w:/satya/webapps/akc" debug="0"/> </Host></Engine></Service></Server>
This is based on tomcat 5. Probably the same for earlier and later tomcats as well. But just check in case
public interface IAuthentication2 extends IAuthentication1 { //from original public boolean verifyPassword(final String userid, final String passwd ) throws AuthorizationException; public boolean isAccessAllowed(final String userid, final String resource ) throws AuthorizationException; //from 1 public boolean isAccessAllowed(final String userid , HttpServletRequest request ,HttpServletResponse response) throws AuthorizationException; //from 2 public boolean isAPublicURL(HttpServletRequest request ,HttpServletResponse response) throws AuthorizationException; }
6-Nov-04
4-Jan-05
5-Jan-05
3-Sep-04
2-Sep-04
3-Oct-04
Use this part
10-Sep-04
29-Nov-04
Supports the login process Improves on the original version Keeps the target url when directed Further documentation will follow
8-Dec-04
Works like an oracle decoder for field values including default values
6-Feb-04
In this article I want to explain an architectural model that I use often called "parts and pipelines" using an example. This model is especially useful in declrative programming. This article will start by introducing an example where a web page will update some content on the server side. The quoted example will be analyzed to explain parts, pipelines, and declarative programming. To further understand the details of a Part the source code for a "HelloWorldPart" is presented followed by the source code of 2 real world parts.
This is an important read to configure aspire for uploading files
14-Apr-04
1. Inheriting from an abstract factory part 2. Handling exceptions 3. Common mistakes 4. Closing collections
Page Menu
Print
Sort by Date
Sort by Name
Titles
> Summaries
Global Menu
My Web Logs
My Library
My Home
Other libraries
Author Content
data format