Home » Support » Getting Started » Oracle Application Server
Getting Started with Oracle Application Server
Using SearchBlox with Oracle 10g Release 2
- Deploy searchblox.war by using the "Deploy WAR file" functionality in the Oracle Enterprise Manager. Set "Application Name" to searchblox and "Map to URL" to /searchblox.
- Check if SearchBlox has been deployed to the directory %OracleAS_HOME%\j2ee\home\applications\searchblox directory.
- Edit web.xml located in %OracleAS_HOME%\j2ee\home\applications\searchblox\searchblox\WEB-INF so that the file looks like this (the changes are marked bold):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- SearchBlox Servlets -->
<listener>
<listener-class>com.searchblox.index.ContextListener</listener-class>
</listener>
<servlet>
<servlet-name>LicenseServlet</servlet-name>
<servlet-class>com.searchblox.admin.LicenseServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>UserServlet</servlet-name>
<servlet-class>com.searchblox.admin.UserServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>com.searchblox.admin.LoginServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>TemplateServlet</servlet-name>
<servlet-class>com.searchblox.admin.TemplateServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>CollectionServlet</servlet-name>
<servlet-class>com.searchblox.admin.CollectionServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>SearchServlet</servlet-name>
<servlet-class>com.searchblox.search.SearchServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>IndexerServlet</servlet-name>
<servlet-class>com.searchblox.admin.IndexerServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ReportServlet</servlet-name>
<servlet-class>com.searchblox.report.ReportServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LicenseServlet</servlet-name>
<url-pattern>/servlet/LicenseServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserServlet</servlet-name>
<url-pattern>/servlet/UserServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/servlet/LoginServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TemplateServlet</servlet-name>
<url-pattern>/servlet/TemplateServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CollectionServlet</servlet-name>
<url-pattern>/servlet/CollectionServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SearchServlet</servlet-name>
<url-pattern>/servlet/SearchServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>IndexerServlet</servlet-name>
<url-pattern>/servlet/IndexerServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ReportServlet</servlet-name>
<url-pattern>/servlet/ReportServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>search.jsp</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/admin/errorpage.jsp</location>
</error-page>
<security-role>
<role-name>Admin</role-name>
</security-role>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/config.xml</url-pattern>
<url-pattern>/license.xml</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Admin</role-name>
</auth-constraint>
</security-constraint>
</web-app>
- Edit jazn-data.xml located in %OracleAS_HOME%\j2ee\home\application-deployments\searchblox so that the file looks like this:
<?xml version="1.0" encoding="UTF-8" standalone='yes'?>
<!DOCTYPE jazn-data PUBLIC "JAZN-XML Data" "http://xmlns.oracle.com/ias/dtds/jazn-data.dtd">
<jazn-data>
<!-- JAZN Realm Data -->
<jazn-realm>
<realm>
<name>jazn.com</name>
<users>
<user>
<name>SearchBlox</name>
</user>
</users>
<roles>
<role>
<name>AdminRole</name>
<members>
<member>
<type>user</type>
<name>SearchBlox</name>
</member>
</members>
</role>
</roles>
</realm>
</jazn-realm>
<!-- JAZN Policy Data -->
<jazn-policy>
</jazn-policy>
<!-- Permission Class Data -->
<jazn-permission-classes>
</jazn-permission-classes>
<!-- Principal Class Data -->
<jazn-principal-classes>
</jazn-principal-classes>
<!-- Login Module Data -->
<jazn-loginconfig>
</jazn-loginconfig>
</jazn-data>
- Edit orion-application.xml located in %OracleAS_HOME%\j2ee\home\application-deployments\searchblox so that the file looks like this:
<?xml version="1.0"?>
<!DOCTYPE orion-application PUBLIC "-//ORACLE//DTD OC4J Application runtime 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-application-9_04.dtd">
<orion-application deployment-version="10.1.2.0.0" default-data-source="jdbc/OracleDS" treat-zero-as-null="true">
<web-module id="searchblox" path="searchblox.war" />
<persistence path="persistence" />
<security-role-mapping name="Admin">
<group name="AdminRole" />
</security-role-mapping>
<!--principals path="principals.xml" /-->
<jazn provider="XML" location="jazn-data.xml" />
<log>
<file path="application.log" />
</log>
<namespace-access>
<read-access>
<namespace-resource root="">
<security-role-mapping>
<group name="jazn.com/administrators" />
</security-role-mapping>
</namespace-resource>
</read-access>
<write-access>
<namespace-resource root="">
<security-role-mapping>
<group name="jazn.com/administrators" />
</security-role-mapping>
</namespace-resource>
</write-access>
</namespace-access>
</orion-application>
- Shutdown and restart OracleAS
- Go to http://yourhost/searchblox/admin/main.jsp in your browser and Login using username : admin / password : admin
- Go to Collections Tab and Click on Add Collection to create a new collection.
- Choose whether it is a HTTP or FileSystem based collection, assign a unique name and choose the language for this collection. And Click Add to finish creating the collection.
- Click on Root Sub-Tab and Type in RootURL / Filepath and click OK.
- Go to Indexer Sub-Tab and click Index button to start indexing. Click on the DashBoard Sub-Tab under Collections to view indexing status.
- Go to http://yourhost/searchblox/search.jsp to start searching.
Using SearchBlox with OC4J Standalone (9.0.4)
- Create a new directory named searchblox in the $OC4J-HOME/j2ee/home/applications folder.
- Extract searchblox.war into the /searchblox directory, using for example the Java jar tool or a regular unzip command. On Windows, applications like WinZip work as well.
- Edit the file $OC4J-HOME/j2ee/home/config/application.xml and add the following descriptor within the <orion-application> element.
<web-module id="searchblox" path="../../home/applications/searchblox"/>
- Edit the file $OC4J-HOME/j2ee/home/config/http-web-site.xml and add the following descriptor within the <web-site> element.
<web-app load-on-startup="true" application="default" name="searchblox" root="/searchblox" />
- Place a copy of the file $OC4J-HOME/j2ee/home/applications/searchblox/WEB-INF/lib/dom4j.jar in the directory $OC4J-HOME/j2ee/home/applib
- Edit the file $OC4J-HOME/j2ee/home/applications/searchblox/WEB-INF/web.xml so that the element <security-constraint> contains only the elements shown below:
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/config.xml</url-pattern>
<url-pattern>/license.xml</url-pattern>
<url-pattern>/index/*</url-pattern>
<url-pattern>/docs/*</url-pattern>
<url-pattern>/ext/*</url-pattern>
<url-pattern>/publish/*</url-pattern>
<url-pattern>/stylesheets/*</url-pattern>
<url-pattern>/stopwords/*</url-pattern>
<url-pattern>/logs/*</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
- Start OC4J
- Go to http://yourhost/searchblox/admin/main.jsp in your browser and Login using username : admin / password : admin
- Go to Collections Tab and Click on Add Collection to create a new collection.
- Choose whether it is a HTTP or FileSystem based collection, assign a unique name and choose the language for this collection. And Click Add to finish creating the collection.
- Click on Root Sub-Tab and Type in RootURL / Filepath and click OK.
- Go to Indexer Sub-Tab and click Index button to start indexing.
- Click on the DashBoard Sub-Tab under Collections to view indexing status.
- Go to http://yourhost/searchblox/search.jsp to start searching.