Recent Notes

Displaying notes 81 - 90
Created by nogeek on April 25, 2010 05:09:14    Last update: April 25, 2010 05:10:46
Oracle Web Cache version used: Oracle Application Server Web Cache 10.1.2.3.0 Copyright (c) 1999, 2008, Oracle. All rights reserved. The test page is a simple Struts action sending a URL redirect: public ActionForward execute(ActionMapping map, ActionForm form, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { resp.sendRedirect("/testApp/index.jsp"); return null; } Web Cache setup Origin server Host Name Port oas.host 7777 Site Host Name Port URL Path Prefix webcache.host 80 Test results Request directly to the OC4J (Oracle Application Server): C:\work\testAppWebApp2>curl --dump-header - http://oas.host:7777/testApp/index.do HTTP/1.1 302 Moved Temporarily Date: Sat, 24 Apr 2010 20:20:12 GMT Server: Oracle-Application-Server-10g/10.1.3.5.0 Oracle-HTTP-Server Set-Cookie: JSESSIONID=a50c3c6cdd7ea0bfd4267ec6d1998e5ea2fef1f2ac34475f2b5f234c6 550ded5.e3mRbNiObx0Oe38Tb30Lc3iQa40; path=/testApp Location: http://oas.host:7777/testApp/index.jsp Transfer-Encoding: chunked Content-Type: text/html <HTML><HEAD> <TITLE>Redirect to http://oas.host:7777/testApp/index.jsp</TITLE> </HEAD> <BODY><A HREF="http://oas.host:7777/testApp/index.jsp"> http://oas.host:7777/testApp/index.jsp</A></BODY></HTML> Request to Oracle Web Cache: C:\work\testAppWebApp2>curl --dump-header - http://webcache.host/testApp/index.do HTTP/1.1 302 ...
Created by magnum on April 19, 2010 01:50:04    Last update: April 19, 2010 01:50:28
Add these lines to mime.types to associate both .php and .php5 to PHP: application/x-httpd-php php application/x-httpd-php php5
Created by Dr. Xi on April 07, 2010 15:46:14
SQL> desc user_role_privs; Name Null? Type ----------------------------------------- -------- ---------------------------- USERNAME VARCHAR2(30) GRANTED_ROLE VARCHAR2(30) ADMIN_OPTION VARCHAR2(3) DEFAULT_ROLE VARCHAR2(3) OS_GRANTED VARCHAR2(3) SQL> select * from user_role_privs; USERNAME GRANTED_ROLE ADM DEF OS_ ------------------------------ ------------------------------ --- --- --- PET_STORE DBA NO NO NO PET_STORE DBA_READ_ONLY NO YES NO PET_STORE PET_WRITE NO YES NO PET_STORE PET_READ_ONLY NO YES NO SQL> desc dba_role_privs; Name Null? Type ----------------------------------------- -------- ---------------------------- GRANTEE VARCHAR2(30) GRANTED_ROLE NOT NULL VARCHAR2(30) ADMIN_OPTION VARCHAR2(3) DEFAULT_ROLE VARCHAR2(3) SQL> select * from dba_role_privs where grantee = 'PET_STORE'; GRANTEE GRANTED_ROLE ADM DEF ------------------------------ ------------------------------ --- --- PET_STORE DBA NO NO PET_STORE PET_WRITE NO YES PET_STORE DBA_READ_ONLY NO YES PET_STORE PET_READ_ONLY NO YES Further reference: Oracle Database Security Guide (11g Release 2)
Created by Dr. Xi on April 06, 2010 22:55:13    Last update: April 06, 2010 22:56:38
These are the steps to diagnose the "javax.jms.Destination found at the specified destination-location" error an MDB in the Oracle application server (oc4j) environment. The data source is correctly configured and connection can be successfully established. Test this from the Oracle AS em console. The destination queue exists and is started. If you are using PL/SQL Developer, you can check this by right clicking on the queue name and make sure that "Enqueue Enabled" and "Dequeue Enabled" are checked. Deployment descriptors are correctly set up. The database user used for the JDBC connection pool has the proper privileges to enqueue and dequeue. Usually this means that the database user is assigned the AQ_USER_ROLE . The ultimate test is to run some PL/SQL code in the oc4j ...
Created by Fang on April 04, 2010 04:12:14    Last update: July 21, 2010 14:52:58
The tags <c:if> The <c:if> tag may be used with or without body content: <!-- Without body content, used to export variable named by the var attribute --> <c:if test="testCondition" var="varName" [scope="{page|request|session|application}"] /> <!-- With body content, which is inserted into the page when testCondition evaluated to true. --> <c:if test="testCondition" [var="varName"] [scope="{page|request|session|application}"] > body content </c:if> In my opinion, the version without body content is pretty much useless (the <c:set> tag is a lot more meaningful for this purpose). If body content exists, it is inserted into the page if the testCondition is true . Optional attributes var and scope may be specified. If var is specified, a variable whose name is the value of var is exported to the associated scope ( pageScope ...
Created by Fang on April 03, 2010 20:21:15    Last update: April 04, 2010 03:30:22
The tags <c:out> The <c:out> tag evaluates an expression and outputs the result on the page. The syntax is: <c:out value="value" [escapeXml="{true|false}"] [default="defaultValue"] /> where escapeXml defaults to true and default defaults to empty string "". <c:out value="${expr}" escapeXml="false"/> is equivalent to ${expr} . If a variable is set in multiple scopes, the lower scope wins. In the following example code, attribute1 is set in request, session, and application scopes; attribute2 is set in session and application scopes; attribute3 is set in the application scope. The results are: <c:out value="${attribute1}"/> : Attribute1 request scope <c:out value="${attribute2}"/> : Attribute2 session scope <c:out value="${attribute3}"/> : Attribute3 application scope To access values in higher scopes, you have to specify the scope explicitly, like this: <c:out value="${sessionScope.attribute1}"/> : Attribute1 ...
Created by Fang on April 02, 2010 21:45:47    Last update: July 17, 2010 02:55:06
This is built upon the simple test application for JSTL , which contained a single servlet and a single JSP page. If I want to use it to test all available JSTL tags, the servlet and JSP page would be too complicated. Instead, I want to group the JSTL tags into separate JSP pages and display each group based on the requested URL. For example, if the URL ends with /CoreBasic , I'll display a page that contains the basic core tags; if the URL ends with /I18N , I'll display a page that contains the internationalization tags (e.g., <fmt:message> ). Furthermore, I want to delegate the handling of each group of tags to separate Java classes. This is the application I'll use for the ...
Created by Fang on April 01, 2010 22:24:58    Last update: April 02, 2010 02:49:38
In this note I'll show you how to create and package a JSP custom tag. The purpose of this tag is to display a random splash image for a home page, among a set of images. We should be able to add or delete candidate splash images from the WAR archive without the need to change the JSP. This is the intended use of the tag: <%@ taglib uri="http://custom.tag.com/demo" prefix="cust"%> <cust:splash file="/images/splash*.png" alt="splash"/> In the above example you provide a set of images named splash*.png (e.g., splash1.png, spalsh2.png, ...), and the tag will pick a random one to display when the JSP is rendered. Let's get started. I'll use Maven for this purpose. Create the standard Maven directory structure ./pom.xml ./src ./src/main ./src/main/java ./src/main/java/tagdemo ./src/main/java/tagdemo/SplashTag.java ...
Created by nogeek on April 01, 2010 18:54:41    Last update: April 01, 2010 18:55:27
Start remote desktop client by clicking Start and Run, then enter mstsc. Click the "Options" button, select the "Local Resources" tab, check "Clipboard" More options are available when you click the "More..." button (share local drives etc.).
Created by voodoo on April 01, 2010 04:28:04    Last update: April 01, 2010 04:37:32
You were tempted by "my fun cards" and installed "my web search" on your computer. Although some people say "my web search" is harmless, but still it behaved scary. So you want to uninstall it. You click the "Add/Remove Programs" and removed the "my web search" toolbar. But then when you type in things in the Firefox address bar you find that it still brings up "my web search"! Here's how to get rid of it: Enter "about:config" in the address bar (and promise that you'll be careful). Enter "myweb" in the filter box Reset browser.search.selectedEngine and keyword.URL , extensions.mywebsearch.openSearchURL , extensions.mywebsearch.prevKwdEnabled , and extensions.mywebsearch.prevKwdURL . The extensions.mywebsearch.* settings will be removed after Firefox restart. The parameter that affects the address bar search is keyword.URL ...
Previous  4 5 6 7 8 9 10 11 12 13 Next