Stripes Hosting – How To Configure Stripes Framework

October 19 2012
0

Stripes is a presentation framework for building web applications using the latest Java technologies. The main driver behind Stripes is that web application development in Java is just too much work! It seems like every existing framework requires gobs of configuration. Struts is pretty feature-light and has some serious architectural issues. Others, like WebWork 2 and Spring-MVC are much better, but still require a lot of configuration, and seem to require you to learn a whole new language just to get started. DailyRazor is a leading java hosting provider for Stripes hosting. Stripes framework is supported and can be hosted on our Private Tomcat java hosting plans.

3. Upload all jar libraries from lib/ subfolder under the folder where the archive was unpacked to, to Tomcat’s shared lib folder – /home/_username_/tomcat/shared/lib/ (where _username_ is name of your account on the server).

4. After uploading all the files to Tomcat’s, please restart your Tomcat so it loads the libraries.

5. Configure Stripes for your application (described below) and upload the application to the server, and Tomcat will deploy it automatically. You don’t need to include the libraries to application itself, Tomcat will share them for all the applications you Tomcat running.

!!!The ActionResolver.Packages parameter!!!
Stripes auto-discovers your ActionBeans at deployment time by scanning your web application’s classpath. This saves you from having to enumerate all your ActionBeans somewhere, but you do have to give Stripes some starting points. To do so, use the ActionResolver.Packages init-param of the Stripes Filter to indicate one or more package roots. Do not use .* at the end of a package; subpackages are automatically included. Use commas to separate multiple package roots. The ActionResolver.Packages is the only required init-param for the Stripes Filter.

2. Now you need to put in place the StripesResources.properties from lib/ subfolder under the folder where the archive was unpacked to – you’ll need to copy that to your web application’s /WEB-INF/classes. StripesResources.properties is used to lookup error messages both for Stripes’ built in validations, and for any validation done in ActionBeans, and it has to be available in the Classpath. An example fragment of the file follows:

Example StripesResources.properties

# Validation error messages used by Stripes’ built in type converters
converter.number.invalidNumber=The value ({1}) entered in field {0} must be a valid number
converter.byte.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
converter.short.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
converter.integer.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
converter.float.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3}
converter.enum.notAnEnumeratedValue=The value “{1}” is not a valid value for field {0}
converter.date.invalidDate=The value ({1}) entered in field {0} must be a valid date
converter.email.invalidEmail=The value ({1}) entered is not a valid email address

Visit here to review our hosting plans supporting Stripes Framework. If you need any assistance with configuring Stripe Frameworks on any of our Java hosting plans – please email us at support@dailyrazor.com or click here to open a support ticket.

Get all the newest Articles, Discounts and Coupons before everyone else