Recent Notes
Displaying keyword search results 91 - 100
Created by nogeek on September 29, 2010 19:22:15
Last update: September 29, 2010 19:22:15
Assuming you are using the default server.
Edit the file server/default/conf/login-config.xml
Copy & paste the section:
<application-policy name="web-console">
...
Change the copy to:
<application-policy name="myapp">
<auth...
Create users properties file
Copy server/default/conf/props/jmx-console-users.properties to server/default/conf/props/myapp-users.properties . Change contents to:
# users.properties file for use with the Users...
Create roles properties file
Copy server/default/conf/props/jmx-console-roles.properties to server/default/conf/props/myapp-roles.properties . Change contents to:
# roles.properties file for use with the Users...
Edit web.xml in the application myapp . Add security constraints:
<security-constraint>
<web-resource-col...
Add file WEB-INF/jboss-web.xml with the following contents:
<?xml version='1.0' encoding='UTF-8' ?>
...
where myapp corresponds to the name attribute for application-policy in step 1.
Created by James on September 10, 2010 23:01:14
Last update: September 10, 2010 23:01:14
By default, heights for jQuery UI tab panels expand or contract depending on the height of each tab. The code snippet here sets the height of all tabs to be equal to that of the container.
<!DOCTYPE html>
<html>
<head>
<title>jQu...
Created by James on September 03, 2010 15:34:30
Last update: September 03, 2010 15:34:43
Combine the elements of a JavaScript array to a string by the join method:
a = [ 'Eeny', 'meeny', 'miny', 'moe' ];
a.join(...
Created by James on September 03, 2010 15:28:59
Last update: September 03, 2010 15:28:59
For a JavaScript array, the push method appends an element to the end, the unshift method inserts an element to the beginning.
The following code yields the array [1, 2, 3, 4] :
a = [];
a.push(3);
a.push(4);
a.unshift(2...
Created by voodoo on July 01, 2010 18:54:08
Last update: August 31, 2010 22:40:41
Problem: cannot connect to PostgreSQL server because of above error.
Solution: add the host entries to the /usr/local/pgsql/data/pg_hba.conf file:
# TYPE DATABASE USER CIDR-ADDRESS ...
Reference for CIDR address: http://oav.net/mirrors/cidr.html
Created by Fang on August 03, 2010 19:50:51
Last update: August 03, 2010 19:50:51
The tags <fmt:message> Writes out a formatted message for the current locale and resource bundle, or stores the resulting message to a scoped variable (when the var attribute is specified). Syntax:
<fmt:message key="messageKey" [bundle="resourc... Or, with parameters in body: <fmt:message key="messageKey" [bundle="resourc... <fmt:bundle> Creates a resource bundle for the contained body. Syntax: <fmt:bundle basename="basename" [prefix="prefi... <fmt:setBundle> Sets a resource bundle in a scoped variable, which may be used later by <fmt:message> . Syntax: <fmt:setBundle basename="basename" [var="varNa... <fmt:param> This is used inside a <fmt:message> tag to specify a replacement parameter. <fmt:param value="theParameterValue"/> or <fmt:param>The Parameter Value</fmt:param> Test it Make these additions to the expanded test application : Create 3 resource bundles and place them under src\main\resources . messages_en.properties : label.login=Login label.username=User Name ... messages_es.properties :...
Created by nogeek on July 30, 2010 23:00:06
Last update: July 30, 2010 23:01:24
It happened on Windows XP with JBoss 5.1.0.GA. This is the stack trace:
2010-07-30 16:39:52,177 ERROR [org.jboss.kernel.pl... According to " (SOLVED) JBAS-7674 solution for JBoss 5.1?? (Windows lock on jnp-service.url) ", the problem seemed to be solved for JBoss 6. In the meanwhile for JBoss 5, disabling Windows Indexing Service seemed to solve the problem. Quote from aforementioned link: It seemed that a file was being locked for some reason, and that file was obviously necessary for JBoss to start. Some further investigation (ok, I admit, I just tried to delete all of JBoss with the faith that it would fail on the locked file), it turns out that file was some file called jnp-service.url in the data directory of the default server. After downloading...
Created by voodoo on July 11, 2009 15:14:55
Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations.
It's really easy to see HTTP headers with curl:
C:\>curl --head http://www.google.com
HTTP/1.0 ...
or, headers and page together (dump headers to stdout):
$ curl --dump-header - http://www.google.com HTTP/...
Download openssl from openssl.org:
curl http://www.openssl.org/source/openssl-0.9.6m....
C:\>curl --help
Usage: curl [options...] <url>
...
Created by Fang on July 27, 2010 18:58:42
Last update: July 27, 2010 18:58:42
The tags
<fmt:setLocale>
<fmt:setLocale value="locale"
[variant="varian...
The <fmt:setLocale> action stores the locale specified by the value attribute in the javax.servlet.jsp.jstl.fmt.locale configuration variable in the scope given by the scope attribute. If value is of type java.util.Locale , variant is ignored.
This tag should be used at the beginning of the page. Example:
<fmt:setLocale value="en_US"/>
<fmt:requestEncoding>
<fmt:requestEncoding [value="charsetName"] />
The <fmt:requestEncoding> action may be used to set the request's character encoding, in order to be able to correctly decode request parameter values whose encoding is different from ISO-8859-1 .
This action calls the setCharacterEncoding() method on the HttpServletRequest with the character encoding name specified in the value attribute.
Test it
These tags will be tested in later sections.
Created by magnum on July 26, 2010 15:41:36
Last update: July 26, 2010 15:41:36
The HttpServletRequest.getRequestURL() method returns the URL for the servlet request as a StringBuffer .
public String getCurrentUrl(HttpServletRequest req...