Using tomcat 5 along with apache 2.2
hi
i am facing a strange problem
i am trying to build a web application using servlets with tomcat 5 and apache 2.2 and i am using oracle 10g as the data base
now when try to access the database from my pc it works fine but when i try to access it from other pc through lan its showing an exception
i am using mod_jk connector to forward the servlets requests to tomcat.
log file looks like this
2009-02-01 00:04:07 StandardContext[manager]HTMLManager: init: Associated with Deployer 'localhost'
2009-02-01 00:04:07 StandardContext[manager]HTMLManager: init: Global resources are available
2009-02-01 00:04:07 StandardContext[manager]HTMLManager: list: Listing contexts for virtual host 'localhost'
2009-02-01 00:04:23 StandardWrapperValve[home]: Servlet.service() for servlet home threw exception
java.lang.NullPointerException
at Home.doGet(Home.java:26)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
please help me its my semister project
thanking you
ronit wrote:
java.lang.NullPointerException
at Home.doGet(Home.java:26)Some object reference at the mentioned line inside the mentioned method of the mentioned class is null while the code is trying to access/invoke it.
The solution should be obvious: make sure that it is not null, or only access/invoke it when it is not null.
That said, and apart from this specific problem, you should always be placing classes in packages. Not doing so is a bad practice and also asking for trouble.
Similar Messages
-
2nd Try: Please Help : UIX : Not able to use messageFileUpload along with m
UIX : Not able to use messageFileUpload along with messageChoice
I used messageFileUpload UIX element and associated upload button to fileupload servlet. This servlet just captures the file and put it in desired location. This works just fine.
My client wanted me to add another choice filed on UI. I used messageChoice. I named the field as fileType. All the options have name and value populated but when I submit the form servlet is reading fileType as NULL.
I am not sure what's happening. Please let me know how should I send file handle as well fileType ?
Thanks,
LindaWhat exactly are you expecting this to do for you?
Forall is designed to process batches of DML to prevent context switching from PL/SQL to SQL.
Has no relevance for what you are trying to do.
If you don't want to call the procedure multiple times, you need to rewrite it to passs the cursor to the function, then have the function process all the records.
Carl -
Can we use assumetargetdef along with sourcedef
Can we use assumetargetdef along with sourcedef
FISH2 wrote:
Yes you can, if you have the below costraints.
{SOURCEDEFS <full_pathname>} | ASSUMETARGETDEFS
Use SOURCEDEFSif the source and target tables have different definitions. Specify the source data-definitions file generated by DEFGEN.
Use ASSUMETARGETDEFS, if the source and target tables have the same definitions.
For Oracle databases that use multi-byte character sets, you must use SOURCEDEFS(with a DEFGEN-generated definitions file) if the source semantics setting is in bytes and the target is in characters. This is required even when the source and target data definitions are identical.
In other words, after taking into consideration the constraints noted in the documentation, the answer is "No, you can't."
Can we use assumetargetdef along with sourcedef
You should state what it is, exactly that you are trying to achieve. "Source definitions" are for the trail being read. There is only one "definition" for the trail. ("Definition" in this sense, means the DDL that was used to generate the tables on the source database.) The data captured from the source database is "applied" via SQL to the "target" database. The data is "mapped" from the source schema to the target schema. If you don't know what the source schema was, you can assume the target & source schemas are the same, and use the "AssumeTargetDefs" parameter. However, if the source & target table definitions are different, then you'd use "SourceDefs {definitions file}" together with a database connection to the target database for the "target definitions". (There are specific instances where you can have a "sourcedefs {file}" together in the same parameter file with a "targetdefs {file}", but that doesn't usually apply. It allows doing mapping upstream, before accessing the target database, to create a trail with a different definition (schema) than the original source database.) -
AUDIO PROBLEM WHILE USING OR ALONG WITH WEBCAM
Hi friends,
SUBJECT : AUDIO PROBLEM WHILE USING OR ALONG WITH WEBCAM
I'm not getting any sound while using web-cam.
I tried recording my voice , and played.. i can see my video but audio
Do we have any settings where i need to cross-check to make sure that everything being turned-on ?
My laptop details:-
HP Pavilion dv6 laptop
Operating system Installed - Windows 7
Can someone help me with this?
Thanks
kiranHi,
not sure if coincidence or the same question, but the same question got asked internally. The seeded option is required to get the OJSP filter installed. Here's the internal response
ADF View integration with MDS not configured
In web.xml, you need to have mds-ojsp intg enabled to load jspx base + customizations from MDS. In your web project in Jdev, go to ADFv project properties and select “Seeded customization” property. It would enable mds-jsp engine configuration in web.xml. If you want to use user personalization feature at runtime, you would need to select “User customization” property as well which would enable ADFv change persistence config in web.xml.
Warning: Some of the metadata under ... is packaged as part of both WAR and MAR. This metadata cannot be accessed from WAR using MDS.
For these two packages, you are including the files in both WAR & MAR. This warning conveys that since these base files are being put in MAR, at runtime they would be read from mds repository & not from WAR.
Frank -
JAVA to XML on runtime a,then using thatstream along with XSL genertateHTML
hi everybody,
can u give me a example of a java file which generates an xml file on runtime and passes it as a stream to XSLT processor along with XSL file to produce and html output.
i would appreciate this becoazue i know how to use physical file with XSLTprocessor but i am not able to pass an XML generated at runtime as a stream to the transformer class as a source.Hi Sumit
See the links below for examples on doing this:
http://xml.apache.org/xalan-j/
http://xml.apache.org/xalan-j/samples.html
Good Luck!
Eshwar Rao
Developer Technical Support
Sun mcirosystems inc
http://www.sun.com/developers/support -
Using NonCatalogLogger along with the LogMBean
Hi anybody
According to the API, the NonCatalogLogger class provides application services
for logging error messages to the weblogic server log. The name, location and
other properties of the logfile are determined by the LogMBean for the server.
Now, I have the instance of the LogMBean running in the server and using this
instance I am able to configure our weblogic server's logging configuration from
any client machine. But I am not able to log any message from a client machine
into the server's log file. That is I am not able to use the LogMBean object along
with the NonCatalogLogging object.
Do you have a suggestion?
Regards
Zakaria Chowdhuryhttp://edocs.bea.com/wls/docs60/javadocs/weblogic/management/configuration/L
ogMBean.html
"Rajan Annadurai" <[email protected]> wrote in message
news:3ced8eb9$[email protected]..
>
hi Sanjeev,
"in addition to FileName you can specify any LogMBean prop for a client inthe same
manner"
Can you please list down the LogMbean property to set rotation size. I amnot able
to find it any where in the documentation.
thank you,
Rajan
"Sanjeev Chopra" <[email protected]> wrote:
Clients cannot log to the servers logfile. If you use NonCatalogLogger on
the client, it creates its own file. By default however, the file is
turned
off. You need to turn it on by specifying the FileName prop of theLogMBean
for that client.
Since client config is not done thru MBeans, the way you define this is
with
system props i.e. -Dweblogic.log.FileName=....
(in addition to FileName you can specify any LogMBean prop for a client
in
the same manner)
"Zakaria Chowdhury" <[email protected]> wrote in message
news:[email protected]..
Hi anybody
According to the API, the NonCatalogLogger class provides applicationservices
for logging error messages to the weblogic server log. The name,
location
and
other properties of the logfile are determined by the LogMBean for theserver.
Now, I have the instance of the LogMBean running in the server and
using
this
instance I am able to configure our weblogic server's loggingconfiguration from
any client machine. But I am not able to log any message from a clientmachine
into the server's log file. That is I am not able to use the LogMBeanobject along
with the NonCatalogLogging object.
Do you have a suggestion?
Regards
Zakaria Chowdhury -
Viewing Excel Files using Tomcat - Problem with caching
Hi all,
A small part of an application I'm writing has links to Excel files for users to view/download. I'm currently using Tomcat v5 as the web/app server and have some very simple code (an example is shown below) which calls the excel file.
<%@ page contentType = "application/vnd.ms-excel" %>
<%
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
response.sendRedirect("file1.xls");
%>
This all works except but I'm having one big problem.
The xls file (file1.xls) is updated via a share on the server so each month, the xls file is overwritten with the same name but with different contents. I'm finding that when an update is made to the xls file and the user then attempts to view the new file in the browser they recieve only the old xls file. It's caching the xls file and I don't want it to. How can I fix this so that it automatically gives the user the new updated file.
The only way I've managed to get Tomcat to do this is to delete the work directory and delete the file from my IE temp folder and then restart Tomcat - this is a bit much!
Any help would be greatly appreciated.
Thanks.I'd a problem with caching a few years back, for a servlet request which returned an SVG file.
As a workaround, I ended up putting appending "#" and a timestamp / random number after it. The browser assuming each request was new, and didn't use the cache.
Eg.
http://myserver/returnSVG.do#1234567
where 1234567 is a timestamp / random.
Not sure whether you can do this on a file based URL... but maybe worth a shot...
regards,
Owen -
(Sales & Operations Planning) - Can we use RMCPSOP along with IDoc method
Hi,
While transferring data to demand mgmt(SOP) using the standard mass processing, sometimes the job is getting failed with error u201CNo period unit maintained in material masteru201D, after analysing the code which is triggering this error, we found that when ever an S076E is not the for corresponding Planning entry, it is triggering the error.
We are using the standard mass processing job using IDoc method to update S076((Sales & Operations Planning), we found that sometimes the S076E table was not getting updated with the Material/Plant combination. As suggested in SAP Note 500354 Program RMCPSOP can be used to synchronize S076 and S076E tables. Seeing the technical description of the suggested program it will create S076 and S076E entries based on PGMI and PGZU tables.
My question is
1) Can we use the RMCPSOP along with IDoc method, does it overwrites the S076 entries which were updated with IDoc method?
2) At what step should the RMCPSOP executed if we use IDoc method.
Regards
Bala Krishna> I am planning to use WMMBID02 for it.
> Although I found in Std SAP it is available for inbound only but I feel we can generate this idoc using user exit available at the time of "material document posting".
>
If you find nearly all the fileds which are asked by ur partner in that idoc, thats fine.
> my second query is , in this idoc along with other information we also have to send information related to "REASON CODE" and "To Stock Status" ( Like in case material is transferred from Blocked to unrestricted stock type and To Stock status will be Unrestricted ) but these fields are not available in idoc defination , what should I do ?
>
You can extend the idoc, if you still think that you are having enough fileds in standard idoc, which are usefull.
Reddy -
How to link tomcat 5 with apache 2 on win2k?
i've just installed the new tomcat 5.
i need help on how to combine tomcat 5 with apache2.
so can anyone give me some URLs?
thanks very much.Have a look at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html . I believe it's works the same way as for Tomcat 4.1.
The following steps briefly describe what to do:
1. Install the mod_jk DLL (if running on Windows) in your Apache\modules directory. You can find it on http://jakarta.apache.org/site/binindex.cgi as JK 1.2 'Binary Releases'. (Installing the JK2 Connector is more complicated.) Just copy it over.
2. Create a file workers.properties in you Tomcat\conf\jk directory with the following content:
# Definiert worker fuer Tomcat
worker.list=ajp13
# --- Settings for the ajp13 worker
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
You may need to make amendments if you're not running it on the same host or port.
3. In your Apache conf directory edit the httpd.conf file. Add the following lines:
# load the module you just added
LoadModule jk_module modules/mod_jk_xxx.dll
# set path for your settings
JkWorkersFile "D:/Programs/jakarta-tomcat-4.1.24/conf/jk/workers.properties"
JkLogFile "D:/Programs/jakarta-tomcat-4.1.24/logs/mod_jk.log"
JkLogLevel info
<VirtualHost *>
ServerName your.server.name.com
# link all the static files directly to your tomcat directory. Ignore that if you have them somwhere else.
Alias /kleika/1_00 "D:/Programs/jakarta-tomcat-4.1.24/webapps/yourwebapp"
<Directory "D:/Programs/jakarta-tomcat-4.1.24/yourwebapp">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# all requests to this path will be forwarded to Tomcat
JkMount /yourwebapp/* ajp13
</VirtualHost>
I hope that helps.
Steffen -
Can I use jQuery mobile with Apache Cordova in VS2013?
Hi,
I'm developing my first mobile app. I just need to build a very simple form with a few text fields and a date picker. I was wondering can I use jQuery Mobile for this? I saw an example of using jQuery Mobile with Ajax to call a web service
when user clicks Submit button and wondering if I can use that in VS 2013 Apache Cordova project.
Also, is there a way for user to define data for a couple of fields, like their user id and password for the app? How can that be done so users don't have to enter credential each time they use the app.
Thank you
Thank youNo. You need an officially unlocked iPhone. Contract free DOES NOT equal officially unlocked. All contract free means is that you are not obligated to a contract, nothing more.
In the US, only Apple sells officially unlocked iPhones. -
Did anybody used ADF Faces with Apache Struts?
Hi
Can anybody give some guidelines of how to use ADF Faces with Struts?I think you'll get a better answer for this on an iBatis forum.
I think I knew one customer who used this combination.
We don't have a specific tutorial that shows you how to use iBatis with ADF Faces, but at the end of the day any of the tutorials we have that shows you how to use POJO or a session facade to front POJO will be applicable to iBatis. -
Exception report when using tomcat 5 with JDBC
i followed this guide to setup the JDBC with my TOMCAT 5
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
but i seem to get this error
exception
javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.SID.test_jsp._jspService(test_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'"
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
org.apache.jsp.SID.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.SID.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
i can compile *.java and run them when they need the jdbc drivers to interact with mysql 5 database.
This is my server.xml
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<!-- Comment these entries out to disable JMX MBeans support -->
<!-- You may also configure custom components (e.g. Valves/Realms) by
including your own mbean-descriptor file(s), and setting the
"descriptors" attribute to point to a ';' seperated list of paths
(in the ClassLoader sense) of files to add to the default list.
e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
-->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
<!-- Note : To use gzip compression you could set the following properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<!--
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" />
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector port="8082"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false"
acceptCount="100" debug="0" connectionTimeout="20000"
proxyPort="80" disableUploadTimeout="true" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
<Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost" debug="0">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.4
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test" connectionPassword="test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- Defines a cluster for this node,
By defining this element, means that every manager will be changed.
So when running a cluster, only make sure that you have webapps in there
that need to be clustered and remove the other ones.
A cluster has the following parameters:
className = the fully qualified name of the cluster class
name = a descriptive name for your cluster, can be anything
debug = the debug level, higher means more output
mcastAddr = the multicast address, has to be the same for all the nodes
mcastPort = the multicast port, has to be the same for all the nodes
mcastBindAddr = bind the multicast socket to a specific address
mcastTTL = the multicast TTL if you want to limit your broadcast
mcastSoTimeout = the multicast readtimeout
mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
in case of multiple ethernet cards.
auto means that address becomes
InetAddress.getLocalHost().getHostAddress()
tcpListenPort = the tcp listen port
tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
has a wakup bug in java.nio. Set to 0 for no timeout
printToScreen = true means that managers will also print to std.out
expireSessionsOnShutdown = true means that
useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
false means to replicate the session after each request.
false means that replication would work for the following piece of code:
<%
HashMap map = (HashMap)session.getAttribute("map");
map.put("key","value");
%>
replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
* Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
* Synchronous means that the thread that executes the request, is also the
thread the replicates the data to the other nodes, and will not return until all
nodes have received the information.
* Asynchronous means that there is a specific 'sender' thread for each cluster node,
so the request thread will queue the replication request into a "smart" queue,
and then return to the client.
The "smart" queue is a queue where when a session is added to the queue, and the same session
already exists in the queue from a previous request, that session will be replaced
in the queue instead of replicating two requests. This almost never happens, unless there is a
large network delay.
-->
<!--
When configuring for clustering, you also add in a valve to catch all the requests
coming in, at the end of the request, the session may or may not be replicated.
A session is replicated if and only if all the conditions are met:
1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
2. a session exists (has been created)
3. the request is not trapped by the "filter" attribute
The filter attribute is to filter out requests that could not modify the session,
hence we don't replicate the session after the end of this request.
The filter is negative, ie, anything you put in the filter, you mean to filter out,
ie, no replication will be done on requests that match one of the filters.
The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
ending with .gif and .js are intercepted.
The deployer element can be used to deploy apps cluster wide.
Currently the deployment only deploys/undeploys to working members in the cluster
so no WARs are copied upons startup of a broken node.
The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
When a new war file is added the war gets deployed to the local instance,
and then deployed to the other instances in the cluster.
When a war file is deleted from the watchDir the war is undeployed locally
and cluster wide
-->
<!--
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
-->
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across all web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Logger shared by all Contexts related to this virtual host. By
default (when using FileLogger), log files are created in the "logs"
directory relative to $CATALINA_HOME. If you wish, you can specify
a different directory with the "directory" attribute. Specify either a
relative (to $CATALINA_HOME) or absolute path to the desired
directory.-->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<Context path="/testdb" docBase="APACHE_DIR/htdocs/testdb"
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/TestDB"
auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>test</value>
</parameter>
<parameter>
<name>password</name>
<value>testpwd</value>
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<!-- The JDBC connection url for connecting to your MySQL dB.
The autoReconnect=true argument to the url makes sure that the
mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
connection. mysqld by default closes idle connections after 8 hours.
-->
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/testdb?autoReconnect=true</value>
</parameter>
</ResourceParams>
</Context>
</Host>
</Engine>
</Service>
</Server>You haven't added a resource reference for your web application that gives the application a local name for the global resource "UserDatabase".
-
File Upload using Tomcat 5.x Apache 2.x
Hi,
Once I updated my tomcat 5.x to apache 2.x and ran my upload jsp code using java api i wrote to upload file to server, all pictures or videos received seems distorted.. At first i thought of bit shift or something but when i upload a textfile all look right.. Anyone know what the heck is going on before i disect my code.
thanks
henrymake sure your modjk logs don't have any errors.
Here's a peice out of my httpd.conf
#ADDed Oct 15,2003, seemed to remove modjk error
AddType multipart/form-data .gif .png .jpg .peg .jpeg .jpeI used to get strange modjk logged errors.
Also did you compile jk2 from source???
com.oreilly.servlet --- cos
http://www.servlets.com/cos/index.html
http://www.servlets.com/cos/cos-05Nov2002.zip
But if my bit shift is correct wouldn't my regular textfile upload be distored?From what I remember, the problem is something to do with logical AND or OR, with the bits. Apache receives it fine, passess it through jk, and and either the most sig or least gets lost. Image data is critical as every bit counts, text file, you may not notice it(white space), or every nTH file upload might fail.
here are the version numbers of software I use, and have compiled all from source.
apache-httpd-2.0.47
tomcat-4.1.27
jk2-connectors-2.0.2 -
I have a desktop computer and a laptop. I have installed Firefox 4 on both, but today I decided to install Aurora on the desktop computer and I plan on installing Nightly on my laptop. My plan is to use the newer versions as my default browsers and resort to Firefox 4 if a site isn't working. I have Sync set up to sync everything across the two computers.
I have read on multiple websites that since each version uses the same profile, very bad things could happen to that profile if you use different versions on the same machine.
Is this true for my situation? Would my bookmarks or passwords or anything be lost or damaged? Will Sync sync my information to all of the different versions?
For example, is it ok to run Nightly on my laptop and Aurora on my desktop and use Firefox 4 when needed and have Sync sync my passwords and other information?
I hope this makes sense. Thank you for your help!Thank you cor-el for those links! I have decided that I do not want to run Nightly anymore after reading that it could destroy my profile information or crash my computer.
Honestly, do you think Aurora will cause any damage to my profile if I use it with my day-to-day profile that contains all of my important information? Keep in mind I would be using Aurora on both computers that are set up to synchronize and then using Firefox 4 if ever needed. I've been running the betas for Firefox 4 and also using 3.6 when needed with my normal profile and there was never any corruption, so why would that happen with Aurora? Wouldn't Mozilla warn us? I do not want to set Aurora up to use a different profile. If that is dangerous, I will uninstall it and just use betas and final releases across my machines. But I would love to test the newest features and provide suggestions for improvement, but I need to use my same profile.
What do you suggest I do?
Thank you! -
Using Aperture along with iPhoto
Hey.
I use iPhoto for my image importing... basically everything..
I got my canon xsi and i like to edit some of my pictures more professionally
i have photoshop too.. and i failed to learn to use..
so i was thinking of getting Aperture, and use it only for images that i want to edit.. and stay using iphoto for everything else!
is this stupid? Is Aperture really an effective editing program?
ThanksHi Joe Shaheen;
Personally I think that Aperture is a very good way to process my photos. I find that I am able to process a shot in a much short period of time then with anything else I have used. I especially like it for processing my photos I take in RAW with my D300.
Allan
Message was edited by: Allan Eckert
Maybe you are looking for
-
Assigning a value to a field-symbol (workarea of type any)
Dear forumers, I'm having a bit of difficulty in assigning a value to a field-symbol (it should be treated as a workarea of type any), but I'm given a syntax error instead:- The data object "<LFS_WORKAREA>" has no structure and therefore no component
-
Error message when opening video files on z10
when opening video files, showing error-the file can't be played due to an unexpected error(-3). request a solution to resolve this
-
Server won't rejoin pool in VM Manager 3.1.1 after reboot.
Hello all, I am running Oracle VM Server and manager 3.1.1 and in the course of setting it up, I had to manually reboot the server. Now since iIhave restarted them - they are on two separate pieces of hardware- I can see in the manager, the server, b
-
Hi guys I'm new to this forum and looking for a help please.. My curve 8900 got the "Reload Software:552" message on the screen. I was trying to uninstall an application and after it asked me to reboot, it showed me that message. I already try to rei
-
Init.ora file parameter 'processses' not working
When I change the number of processes in my init.ora file from the default of 30 to 200, I get an error when accessing from SQLPlus that Oracle cannot be found. I run Oracle 8.1.6i on a Solaris v7 platform. Any suggestions???