Displaying keyword search results 1 - 10
Created by Fang on October 28, 2011 13:49:40 Last update: October 30, 2011 19:23:25
This is a simple example to demonstrate the templating power of JSF facelets. If you've used struts tiles before, you'll recognize the simplicity of templating with facelets. I've stripped out everything else except the pages themselves, just to put our focus on facelets. This is a Maven based project, and you need Tomcat (or any servlet container) to run the resulting webapp. To begin with this is the list of files:
./pom.xml ./src/main/webapp/home.xhtml ./src...I left faces-config.xml in there for completeness sake, it may not be needed. The Maven POM ( pom.xml ):
<?xml version="1.0" encoding="UTF-8"?> <project...Web app configuration ( WEB-INF/web.xml ):
<?xml version="1.0" encoding="UTF-8"?> <web-app...Empty WEB-INF/faces-config.xml :
<?xml version="1.0" encoding="UTF-8"?> <!-- Thi...index.jsp is simply a redirect to home.jsf :
<% response.sendRedirect("home.jsf"); %>...
Created by freyo on August 25, 2011 09:07:40 Last update: August 25, 2011 20:45:43
This is a list of built-in Android permission values: Permission Description Since API Level android.permission.ACCESS_CHECKIN_PROPERTIES Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded. 1 android.permission.ACCESS_COARSE_LOCATION Allows an application to access coarse (e.g., Cell-ID, WiFi) location 1 android.permission.ACCESS_FINE_LOCATION Allows an application to access fine (e.g., GPS) location 1 android.permission.ACCESS_LOCATION_EXTRA_COMMANDS Allows an application to access extra location provider commands 1 android.permission.ACCESS_MOCK_LOCATION Allows an application to create mock location providers for testing 1 android.permission.ACCESS_NETWORK_STATE Allows applications to access information about networks 1 android.permission.ACCESS_SURFACE_FLINGER Allows an application to use SurfaceFlinger's low level features 1 android.permission.ACCESS_WIFI_STATE Allows applications to access information about Wi-Fi networks 1 android.permission.ACCOUNT_MANAGER Allows applications to call into AccountAuthenticators. Only the system can get this permission. 5 android.permission.AUTHENTICATE_ACCOUNTS...
Created by jinx on May 03, 2011 08:56:55 Last update: May 03, 2011 08:57:54
These error level constants are defined in PHP : Constant Value Description E_ERROR 1 Fatal run-time errors. Execution of the script is halted. E_WARNING 2 (1<<1) Run-time warnings (non-fatal errors). Execution of the script is not halted. E_PARSE 4 (1<<2) Compile-time parse errors. Parse errors should only be generated by the parser. E_NOTICE 8 (1<<3) Notices. Indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script. E_CORE_ERROR 16 (1<<4) Fatal errors that occur during PHP's initial startup. This is like an E_ERROR, except it is generated by the core of PHP. E_CORE_WARNING 32 (1<<5) Warnings (non-fatal errors) that occur during PHP's initial startup. This is like an E_WARNING, except it is generated...
Created by freyo on April 12, 2011 13:05:33 Last update: April 12, 2011 13:06:26
android:sharedUserId (from Android doc): The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process. Declare sharedUserId in AndroidManifest.xml :
<manifest xmlns:android="http://schemas.android.co...Retrieve sharedUserId programmatically:
import android.content.pm.PackageManager; impor...
Created by Dr. Xi on February 17, 2011 14:06:22 Last update: February 17, 2011 14:06:22
This is the crontab to run a cron job every 15 minutes:
*/15 * * * * /path/to/executable >/redirect/output...or,
0,15,30,45 * * * * /path/to/executable >/redirect/...In general, the format is:
minute hour day_of_month month day_of_week commandValid values are: Field Value minute 0-59 hour 0-23 day of month 1-31 month 1-12 day of week 0-6 (Sunday = 0) Reference: crontab(5) - Linux man page
Created by nogeek on December 31, 2010 11:56:25 Last update: December 31, 2010 11:56:25
These are the steps to create a JBoss 5.1.0 configuration with Tomcat from the built-in minimal configuration. Change directory to $JBOSS_HOME/server . Make a copy of the minimal configuration.
cp -R minimal tomcatonlyCopy bindingservice.beans from the default configuration.
cp -R default/conf/bindingservice.beans tomcatonly...Copy login-config.xml from the default configuration.
cp default/conf/login-config.xml tomcatonly/conf/Edit tomcatonly/conf/jboss-service.xml : Add jars from the common/lib directory:
<!-- Load all jars from the JBOSS_DIST/serv...Add the JAAS security manager section (copy from the default profile, and yes, JBoss tomcat can't live without the JBoss JAAS manager).
<!-- JAAS security manager and realm mappin...Copy the Tomcat (JBoss web) deployer from the default configuration.
cp -R default/deployers/jbossweb.deployer tomcaton...Copy metadata-deployer-jboss-beans.xml and security-deployer-jboss-beans.xml from the default profile.
Created by nogeek on September 01, 2010 19:25:09 Last update: December 31, 2010 11:54:45
Edit the file server\default\conf\jboss-log4j.xml and change the log level from INFO to DEBUG :
<!-- ============================== --> <!-...Presumably this should change the log level for the console appender (STDOUT) to DEBUG. However, this change alone does not work. It should be used in combination with the system property jboss.server.log.threshold . Either add -Djboss.server.log.threshold=DEBUG to JAVA_OPTS in bin\run.conf.bat :
rem # JVM memory allocation pool parameters - modi...or set it from the command line:
Created by James on October 06, 2010 20:54:39 Last update: October 06, 2010 20:55:00
Created by Fang on March 23, 2010 03:50:11 Last update: August 18, 2010 21:59:52
This is a simple web application with a single servlet and a single JSP page. It is intended to be a test bed for JSTL tags. You may want to store all syntax, rules, and exceptions in your head, but in my opinion nothing beats a simple test program that allows you play with it all you want. So here it is (build with Maven ). Prerequisites: Maven: http://maven.apache.org/ . You don't need any prior knowledge of Maven, but you need to install the binary. JBoss: http://jboss.org/jbossas/downloads/ , or Tomcat: http://tomcat.apache.org/ if you don't run the SQL tests. You need to know how to deploy a web application (shh! Don't tell your boss it's just copying a file to the deployment folder). Steps: The directory...
Created by Fang on August 16, 2010 22:00:05 Last update: August 16, 2010 22:12:25
The tags <sql:update> Executes SQL INSERT , UPDATE , DELETE statements, or SQL DDL statements. Syntax:
<sql:update sql="sqlUpdate" [dataSource="d...or, put the SQL within the element body:
<sql:update [dataSource="dataSource"] [v...Attributes: Name Dynamic? Type Description sql true String SQL update statement. dataSource true javax.sql.DataSource or String Data source associated with the database to update. A String value represents a relative path to a JNDI resource or the parameters for the JDBC DriverManager class. var false String Name of the exported scoped variable for the result of the database update. The type of the scoped variable is java.lang.Integer . scope false String Scope of var. Defaults to "page". <sql:transaction> Establishes a transaction context for <sql:query> and <sql:update> subtags. Syntax:
<sql:transaction [dataSource="dataSource"] ...where...