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
Home Public Library Author Content
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.
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
JSP Basics Includes Reading aspire data using ihds JSP References
You can use this document to provide feedback.
Commons file uploads properly integrated using parts
Allow for url parameters as extra path segments
Saving blobs
Prepared statements
Retrieving files through Aspire parts as opposed to tomcat downloads. This will ensure proper security
\com\ai\aspire\AspireReleaseNotes.java \com\ai\aspire\AspireReleases.java \com\ai\common\DDictionary.java \com\ai\common\FileUtils.java \com\ai\common\IStringDictionary.java \com\ai\common\StringUtils.java \com\ai\common\mapper\GenericMapper.java \com\ai\common\mapper\RequestBasedMapper.java \com\ai\data\FileCollectionReader1.java \com\ai\data\IDataRow1.java \com\ai\db\RSDataRow.java \com\ai\db\ps\DBPSExecutor2.java \com\ai\db\ps\GenericTypeConverter.java \com\ai\db\ps\ISpecificTypeConverter.java \com\ai\db\ps\ITypeConverter.java \com\ai\db\ps\ParamSpec.java \com\ai\db\ps\TypeConverterUtility.java \com\ai\db\ps\TypeEnum.java \com\ai\htmlgen\streamwriters\BlobTransform.java \com\ai\htmlgen\streamwriters\ExtensionToContentTypeMapping.java \com\ai\htmlgen\streamwriters\FileDownloadTransform.java \com\ai\htmlgen\streamwriters\IExtensionToContentTypeMapping.java \com\ai\parts\AHttpParamCollectorPart.java \com\ai\parts\FileDeletePart.java \com\ai\parts\FileItemToBlobPart.java \com\ai\parts\FULCopyFilePart.java \com\ai\parts\SingleFileUPloadCommonsPart.java \com\ai\servlets\paramfilters\AParamFilterRequest.java \com\ai\servlets\paramfilters\DisplayParamFilter.java \com\ai\servlets\paramfilters\DisplayParamFilterRequest.java \com\ai\servlets\paramfilters\DisplayParamFilterRequestOld.java \com\ai\servlets\paramfilters\UpdateParamFilter.java \com\ai\servlets\paramfilters\UpdateParamFilterRequest.java33 File(s)
33 files changed
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.
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
This is an important read to configure aspire for uploading files
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.
part of the upload file effort
This class allows you to use connection pools from apache or tomcat
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.
Some important log search strings
DatabaseTM: log file for single select
Description to be entered
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
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
1. you can turn off flushing and closing the stream in base servlet
2. You can use JSPIncludeTransform to include jsp urls
you can use this part for introducing or copying existing keys as new keys.
When some people have tried to install loginapp4, they ran into some issues. Tomcat itself threw an exception while loading the context for loginapp4.
See if you can comment out the following line in aspire.properties
aspire.systemProperties
use a # at the begining
A way to construct hds on the fly: an example using Lucene
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.
Simple sample code of javascript to submit a form for aspire
Main configuration file
Example JSP page using ihds
http://www.activeintellect.com/aspire/aspire_distributions/?M=D
This directory on activeintellect.com provides latest aspire downloads. The following are available for downloading
Examples of database definitions.
connection strings aliases