Newbie trying to use tomcat to run jsp
I'm just trying to setup Tomcat on my machine, and i've run into a couple of issues.
(1) if i type in http://localhost:9000/test in IE, it gives me an error saying TCP_ERROR and how the web server is possibly down. however if i try it in Netscape, the page shows up fine. I read in the running.txt file that it had something to do with the LAN settings, but i have no idea what has to be done in there to get it to work??
(2) the second issue is, if i give someone the url http://<IP>:9000/test that is using another machine, what has to be done for them to see it? i had someone on another machine try it and they got page could not be found.
TIA
>
(1) if i type in http://localhost:9000/test in IE, it
gives me an error saying TCP_ERROR and how the web
server is possibly down. Do you mean HTTP 500 error?
however if i try it in
Netscape, the page shows up fine. I read in the
running.txt file that it had something to do with the
LAN settings, but i have no idea what has to be done
in there to get it to work??
No LAN settings are needed. You're doing something else wrong. Is there a TOMCAT_HOME/webapps/test directory set up? Unless you created it, there's no such URL in Tomcat's setup.
(2) the second issue is, if i give someone the url
http://<IP>:9000/test that is using another machine,
what has to be done for them to see it? i had someone
on another machine try it and they got page could not
be found.
TIA If they can see the machine on the network, you don't have to do anything else special. If they can ping it, they can talk to Tomcat.
If you're a newbie, as your topic says, why are you changing things like the Tomcat port? Leave it as the default until you have Tomcat under your belt. - MOD
Similar Messages
-
Problem with Configuring Tomcat for running jsp web applications..Plz HELP
I am using Tomcat 5.5 and Jdk 1.5.0_12 and Oracle 10g. I am using jdbc-odbc bridge connection
to connect to the database. I have placed my project folder called
tdm under the webapps folder in Tomcat. This 'tdm' folder consists of
a collection of html pages,jsp pages and images of my project. Also I created a
WEB-INF folderand in that I have lib folder which contains catalina-root.jar
, classes12.jar and nls_charset.jar files. And also in the WEB-INF folder I have the web.xml
file which looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app>
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/gdn</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
My Server.xml file in Tomcat\conf folder is as follows
<!-- 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">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- 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"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource name="jdbc/gdn" auth="Container"
type="javax.sql.DataSource" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbc:odbc:gdn"
username="system" password="tiger" maxActive="20" maxIdle="10"
maxWait="-1"/>
</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 HTTP/1.1 Connector on port 8080 -->
<Connector
port="5050" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
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 HTTP/1.1 Connector on port 8443 -->
<!--
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" 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" 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 AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- 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"/>
-->
<!-- 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"
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"
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"
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"
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" 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
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: (only for SimpleTcpReplicationManager)
<%
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"
notifyListenersOnReplication="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"
ackTimeout="15000"/>
<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" />
-->
<!-- 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"/>
-->
<!-- 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.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
-->
<!--
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<Context path="/tdm" docBase="tdm" debug="0" reloadable="true" />
</Host>
</Engine>
</Service>
</Server>
I have set the context path to /tdm in the server.xml file. Should this be placed in context.xml?
My first page in the project is called Homepage.html. To start my project I give http://localhost:5050/tdm/homepage.html
in a browser. Here I accept a username and password from the user and then do the validation in
a valid.jsp file, where I connect to the database and check and use jsp:forward to go to next pages
accordingly. However when I enter the username and password and click Go in the homepage, nothing is
displayed on the next page. The URL in the browser says valid.jsp but a blank screen appears.
WHY DOES IT HAPPEN SO? DOES IT MEAN THAT TOMCAT IS NOT RECOGNIZING JAVA IN MY SYSTEM OR IS IT A PROBLEM
WITH THE DATABASE CONNECTION OR SOMETHING ELSE? I FEEL THAT TOMCAT IS NOT EXECUTING JSP COMMANDS?
IS IT POSSIBLE?WHY WILL THIS HAPPEN?
I set the JAVA_HOME and CATALINA_HOME environment to the jdk and tomcat folders resp.
Is there any other thing that I need to set in classpath? Should I have my project as a
WAR file in the webapps of TOMCAT or just a folder i.e. directory structure will fine?I am using Tomcat 5.5 and Jdk 1.5.0_12 and Oracle 10g. I am using jdbc-odbc bridge connection
to connect to the database. I have placed my project folder called
tdm under the webapps folder in Tomcat. This 'tdm' folder consists of
a collection of html pages,jsp pages and images of my project. Also I created a
WEB-INF folderand in that I have lib folder which contains catalina-root.jar
, classes12.jar and nls_charset.jar files. And also in the WEB-INF folder I have the web.xml
file which looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app>
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/gdn</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
My Server.xml file in Tomcat\conf folder is as follows
<!-- 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">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- 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"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource name="jdbc/gdn" auth="Container"
type="javax.sql.DataSource" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbc:odbc:gdn"
username="system" password="tiger" maxActive="20" maxIdle="10"
maxWait="-1"/>
</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 HTTP/1.1 Connector on port 8080 -->
<Connector
port="5050" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
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 HTTP/1.1 Connector on port 8443 -->
<!--
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" 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" 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 AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- 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"/>
-->
<!-- 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"
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"
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"
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"
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" 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
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: (only for SimpleTcpReplicationManager)
<%
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"
notifyListenersOnReplication="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"
ackTimeout="15000"/>
<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" />
-->
<!-- 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"/>
-->
<!-- 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.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
-->
<!--
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<Context path="/tdm" docBase="tdm" debug="0" reloadable="true" />
</Host>
</Engine>
</Service>
</Server>
I have set the context path to /tdm in the server.xml file. Should this be placed in context.xml?
My first page in the project is called Homepage.html. To start my project I give http://localhost:5050/tdm/homepage.html
in a browser. Here I accept a username and password from the user and then do the validation in
a valid.jsp file, where I connect to the database and check and use jsp:forward to go to next pages
accordingly. However when I enter the username and password and click Go in the homepage, nothing is
displayed on the next page. The URL in the browser says valid.jsp but a blank screen appears.
WHY DOES IT HAPPEN SO? DOES IT MEAN THAT TOMCAT IS NOT RECOGNIZING JAVA IN MY SYSTEM OR IS IT A PROBLEM
WITH THE DATABASE CONNECTION OR SOMETHING ELSE? I FEEL THAT TOMCAT IS NOT EXECUTING JSP COMMANDS?
IS IT POSSIBLE?WHY WILL THIS HAPPEN?
I set the JAVA_HOME and CATALINA_HOME environment to the jdk and tomcat folders resp.
Is there any other thing that I need to set in classpath? Should I have my project as a
WAR file in the webapps of TOMCAT or just a folder i.e. directory structure will fine? -
Using TomCat to view JSP files
I've installed tomcat for the purpose of viewing jsp files.
In which folder am i supposed to place the jsp files to view them?
Also, what address am i supposed to type in my browser ( http://localhost:8080/myJspFile.jsp ?????? )
My tomcat folder is e:\tomcat
and JAVA_HOME is d:\jdk1.3
Thank youHere is a good link for you to start from
http://www.moreservlets.com/Using-Tomcat-4.html#Try-Pages
http://localhost:8080/myJspFile.jsp
This looks right unless you have changed your port setting which the link above shows you how to change the port setting to port 80 so you dont have to type http://localhost:8080/blah it would http://localhost/blah.
You_tomcat_install/webapps/ROOT
or
You_tomcat_install/webapps/ROOT/some_dir
Anyways good luck and go to that link I gave you and it should help you out alot. -
Eclipse problem with Tomcat when running jsp
when I start tomcat from CMD, it starts normally and display http://localhost:8080/ properly
but when I start tomcat from Eclipse, it starts the server normally,
but it can't display http://localhost:8080/ properly,
I guess that the problem with the java classpath isn't defined correctly in Eclipse
but but I've tried it before, and it doesn't work
here the error msg from Eclipse console:
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on http-8080
[INFO] ChannelSocket - -JK2: ajp13 listening on /0.0.0.0:8009
[INFO] JkMain - -Jk running ID=0 time=0/120 config=C:\jakarta-tomcat-4.1.31\conf\jk2.properties
Error compiling file: C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java [javac] Compiling 1 source file
[javac] Modern compiler not found - looking for classic compiler
Info: Compile: javaFileName=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java
classpath=C:/jakarta-tomcat-4.1.31/shared/classes/;C:/jakarta-tomcat-4.1.31/common/classes/;C:/jakarta-tomcat-4.1.31/common/endorsed/xercesImpl.jar;C:/jakarta-tomcat-4.1.31/common/endorsed/xmlParserAPIs.jar;C:/jakarta-tomcat-4.1.31/common/lib/activation.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant-launcher.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-collections.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-dbcp-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-logging-api.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-pool-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-compiler.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-runtime.jar;C:/jakarta-tomcat-4.1.31/common/lib/jdbc2_0-stdext.jar;C:/jakarta-tomcat-4.1.31/common/lib/jndi.jar;C:/jakarta-tomcat-4.1.31/common/lib/jta.jar;C:/jakarta-tomcat-4.1.31/common/lib/mail.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-common.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-factory.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-resources.jar;C:/jakarta-tomcat-4.1.31/common/lib/servlet.jar
cp=C:\jakarta-tomcat-4.1.31\shared\classes
cp=C:\jakarta-tomcat-4.1.31\common\classes
cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xercesImpl.jar
cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xmlParserAPIs.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\activation.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\ant-launcher.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\ant.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-collections.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-dbcp-1.1.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-logging-api.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-pool-1.1.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-compiler.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-runtime.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\jdbc2_0-stdext.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\jndi.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\jta.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\mail.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-common.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-factory.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-resources.jar
cp=C:\jakarta-tomcat-4.1.31\common\lib\servlet.jar
work dir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
srcDir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
include=index_jsp.java
Exception compiling Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
Exception:
Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
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(Thread.java:479)
Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
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(Thread.java:479)
Here are my system settings :
Eclipse 2.1.3
plugin : tomcatPluginV21, lomboz.213
Jakarta-tomcat-4.1.31
JAVA_HOME : C:\jdk1.3.1_15
CATALINA_HOME : C:\jakarta-tomcat-4.1.31
Here are my Eclipse settings :
http://server2.uploadit.org/files/marvelousgame-01.JPG
http://server3.uploadit.org/files/marvelousgame-02.JPG
http://server2.uploadit.org/files/marvelousgame-03.JPG
http://server3.uploadit.org/files/marvelousgame-04.JPG
http://server2.uploadit.org/files/marvelousgame-05.JPG
http://server3.uploadit.org/files/marvelousgame-06.JPG
thx!!!I would suggest updating your software to the latest versions - java 1.4.2 or higher, tomcat 5 or higher, Eclipse 3. That should fix any incompatibilities you are experiencing.
As to your problem, it seems the tomcat you are trying to run from Eclipse wants a newer Java version (1.4.2 most likely). -
Newbie: trying to use XML in a Line Series.
So, I have a similar question to my last one, how to connect some XML from an RPC to a line series. The XML comes across fine. Problem is, why does it not work below?
The XML is simple, and I use dataProvider="{tsRPC.lastResult.TIMESERIES}"....then yField="DataPoint.Value"...but it does not work
I have seen some examples that use the "data.something"...where data must be some internal object. I tried various combinations of everything.
<TIMESERIES>
<DataPoint Date="38000" Value="34.51"/>
<DataPoint Date="38001" Value="35.06"/>
</TIMESERIES>
<mx:HTTPService id="tsRPC"
url="http://localhost:6574/Test2/TimeSeriesServer"
resultFormat="e4x">
</mx:HTTPService>
<mx:Panel title="LineChart and AreaChart Controls Example3"
height="491" width="729" layout="horizontal" x="350" y="84">
<mx:LineChart id="linechart" height="100%" width="100%"
paddingLeft="5" paddingRight="5"
showDataTips="true" dataProvider="{tsRPC.lastResult.TIMESERIES}">
<mx:horizontalAxis>
<mx:CategoryAxis id="ca" categoryField="DataPoint.Date" title="Date" />
</mx:horizontalAxis>
<mx:series>
<mx:LineSeries yField="DataPoint.Value" form="curve" displayName="Profit" lineStroke="{s1}"/>
</mx:series>
</mx:LineChart>
<mx:Legend dataProvider="{linechart}"/>
</mx:Panel>thanks paul.
I am learning now about e4x. For those who don't know...
http://www.actionscript.org/resources/articles/222/1/Intro-to-E4X/Page1.html
For those that don't know E4X stands for ECMAScript for XML and this specification introduces some new functionality that makes working with XML a lot simpler. New to AS3 are the XML, XMLList,QSpace and Namespace E4X classes. E4X not only makes life simpler but provides greater code consistency and familiarity (we can use dot syntax more similiar to ActionScript). -
Hi,
I'm trying to run the Employee sample that was provided as example in Oracle. I've instaled Oracle 8.0.5 (client) on a NT, JDK and JRE 1.1.8. It compiles fine, but when I try to run I get:"
xception in thread "main" java.lang.UnsatisfiedLinkError: get_client_server_nls_ratio
at oracle.jdbc.oci7.OCIDBAccess.getNlsRatio(OCIDBAccess.java:1577)
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:263)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:127)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:170)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at Employee.main(Compiled Code)
Does anyone has any ideia why is it happening? Thanks a lot!<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Gustavo Badauy ([email protected]):
Hi,
I'm trying to run the Employee sample that was provided as example in Oracle. I've instaled Oracle 8.0.5 (client) on a NT, JDK and JRE 1.1.8. It compiles fine, but when I try to run I get:"
See my answer:
java.lang.UnsatisfiedLinkError:
get_client_server_nls_ratio topic submitted by Craig Nelsen
xception in thread "main" java.lang.UnsatisfiedLinkError: get_client_server_nls_ratio
at oracle.jdbc.oci7.OCIDBAccess.getNlsRatio(OCIDBAccess.java:1577)
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:263)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:127)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:170)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at Employee.main(Compiled Code)
Does anyone has any ideia why is it happening? Thanks a lot!<HR></BLOCKQUOTE>
null -
Complete Newbie trying to use Ultra Key
Hello,
I am a total newbie, and am working on learning to use my new green screen & lights :-) So far, I am able to get the vast majority of the green out.
Here is a shot of the green background:
Here is my background:
Here is my end result:
You'll notice the fuzzy remanants of the green screen after using Ultra Key filter.
How do I get rid of this? Any help is much appreciated
Thanks,You do need to start of with a relatvely uncreased, evenly lit backdrop. I can see why you're having problems.
With just one eyedrop sample...
I would try and create a garbage matte to mask out as much unwanted background as possible and then try the key on the remaining content. -
Hello fellow Mac user.
So I'm working on a projekt in logic, and a friend of my has recorded drums and are sending me audiofiles in a .zip file.
However, when I tried to unzip it a new file is created that is called .cpgz. So i looked around on various forums witch said I should use Terminal. I used the following commands:
cd ./desktop
unzip file.zip
Then I get the following message:
Archive: file.zip
skipping: audio1 need PK compat. v4.6 (can do v2.1)
skipping: audio2 need PK compat. v4.6 (can do v2.1)
skipping: audio3 need PK compat. v4.6 (can do v2.1)
skipping: audio4 need PK compat. v4.6 (can do v2.1)
skipping: audio5 need PK compat. v4.6 (can do v2.1)
My-MacBook-Pro:desktop namename$
I do not understand the problem, and would apritiate some help on what I'm doing wrong,
Thank you, and sorry if there are some spelling and/or gramatical errors
//Wille@blomman007: you should be able to unpack the archive with the TheUnarchiver: it supports cpgz - archives. It's available from the app store: https://itunes.apple.com/app/the-unarchiver/id425424353?mt=12&ls=1
-
Which software i shall use best to run jsp pages
previously i was useing javawebserver with win98 platform
i want to you other software which support jspI strongly recommend Resin.
www.caucho.com
-y -
Help...Newbie trying to use iDVD
I have sent over from iPhoto about 800 pictures to iDVD. I made a nice intro screen (the baby mobile), previewed it (it works fine), then select burn. It takes several hours to encode...then NOTHING. It doesn't burn the DVD. After several attempts, I tried encoding it to a disk image...still nothing. I assume this is user error (likely). Or it may be too many picutres, although the total size of the project that is developed (the .mov) is less than a GB. Any help would be greatly appreciated. This is a project for my wife's Valentines Gift...so time is of the essence
PowerBook Mac OS X (10.4.4)Hi Mark:
Welcome to discussions!
You may want to try a different media ( like DVD-R ) and you should read these links.
iDVD: Troubleshooting issues with burning discs
http://docs.info.apple.com/article.html?artnum=302925
What are some common reasons for problems when creating a DVD?
http://www.kentidwell.com/idvd4/#faq_20
Get back to us if you have more problems!
Sue -
I installed the Java development kit, it did not work so I uninstalled everything saying java from the Add/Remove programs menu.
Then I installed the program jdk-6u12-windows-i586-p.exe. I installed it to the C:\jdk1.6.0 directory. (I had previously installed it under Program files)
I did a file search for javac.exe under the c:\jdk1.6.0 directory, which it could not find. Am I missing installing something?
I added the environment path string c:\jdk1.6.0\bin to the string.
What am I missing?Google!
This is one of the most frequently asked questions. There have been numerous posts about it as well as step-by-step instructions on how to set everything up on Sun's website. Please do a little research and find the answer yourself instead making someone waste their time repeating once again what is already on the web. -
Problem in Using Java Bean in JSP
Hi,
I have a bean called BankAccount.....I tried to use it in a jsp file called Usebean.jsp like this <jsp:useBean id="BA" class="BankAccount" scope="application" /> I tried in both tomcat and j2ee1.3 server... but when i run the jsp file i get an error saying..... Class.org.apache.jsp.BankAccount not found...... But i have put the class file properly inse classes folder.....
Can anyone help me soon..... i am new to JSP........
Thanks,
AkshathaWell u need to have your class in a package
like mypackage.BankAccount
and put your class in classes/mypackage
<jsp:useBean id="BA" class="mypackage.BankAccount" scope="application" /> -
How to use mxml in a jsp file?
I'm trying to use flex in a .jsp file. I followed the
suggestion that I use the Flex 2 Tag library as suggested by this
link:
http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP#Download_and_Installation
but I couldn't find it. I also downloaded LiveCycle Data Services
ES but couldn't find the flex-bootstrap.jar.
I have a simple example:
<!--<%@ taglib uri="FlexTagLib" prefix="mm" %>-->
Use the <mxml> tag to insert a Flex application in an
existing JSP page. The following example shows the <mxml> tag
with the source attribute to include an external MXML file:
<mm:mxml source="CustomerServiceChat.mxml"/>
Alternatively, you can use the <mxml> tag with inline
MXML source code, as the following example shows:
<mm:mxml>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns="*">
<mx:Text label="Hello World">
</mx:Application>
</mm:mxml>
I also added the following code in my web.xml:
<taglib>
<taglib-uri>FlexTagLib</taglib-uri>
<taglib-location>/WEB-INF/lib/flex-bootstrap.jar</taglib-location>
</taglib>
and obviously I get an error because I don't have the
flex-bootstrap.jar file. Please let me know how this can be
corrected. Thanks in advance!Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
Adobe - Developer Center : Flex quick start guide for PHP
developers:
Apr 30, 2007 ... In this example, I changed the result data
type to XML with E4X support by setting .... In Flex you would
download a file using this code:
Link:
http://www.adobe.com/devnet/flex/articles/php_getstarted.html
2d. Tutorial - Flex 3 Getting Started - Adobe Learning
Resources:
See Calling XML Web Services over the Web Using the Web
Service References ... For information on integrating PHP and Flex
using AMF to encode the data,
Link:
http://learn.adobe.com/wiki/display/Flex/2d.+Tutorial
Mike Potter: Flex and PHP - A simple sample:
I have other example with PHP and MySql and give the same
error, and a example .... Flex Data Services... I choose None (???)
because I work with php and
Link:
http://blogs.adobe.com/mikepotter/2006/02/flex_and_php_a_1.html
Adobe - Developer Center : Transmitting data between Flex and
PHP:
Sep 4, 2007 ... Now that the user interface is set up and
ready to go you can add the HTTP services to go ask for the data
from the PHP code. In Flex you
Link:
http://www.adobe.com/devnet/flex/articles/flex_php_json.html
Integrating Adobe Flex and PHP:
Mar 1, 2006 ... The first step is to download Flex Builder
2.0 from the Adobe labs ... For example, you could use this same
PHP script to pass data to a
Link:
http://devzone.zend.com/article/11-Integrating-Adobe-Flex-and-PHP
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine. -
Trying to use launchd to reload full-screen browser
I'm trying to use launchd to run a simple digital sign to show the weather.
Use case:
Start browser on boot, load up a URL (THIS WORKS)
Run a simple apple script that reloads the browser
Use launchd to run that script to reload the browser every 5 minutes.
All was well until I switched my browser to full-screen mode.
Now, when the launchd script fires off, it moves back to the desktop (away from the full screen browser).
Tabs reload correctly but the user cannot see them (because the browser is not visible anymore).
Put simply: If I open up a browser into full screen mode, and then use launchd Apple script to reload it, the full-screen browser dissapears, and the Desktop shows up. If I command-tab back to the browser, I can see that the reload worked.
Does anyone know how to make this work so that the browser reloads in full-screen mode without switching to the desktop when I call my applescript?
If it helps, here is my code in the apple script... this all works (I'm using a Chrome extension to make ctrl+shift+r reload all tabs)
tell application "Google Chrome" to activate
tell application "System Events"
delay 2.0
tell process "Google Chrome"
key down control
key down shift
key down "r"
delay 0.2
key up "r"
key up shift
key up control
end tell
end tell
Here is my plist file (with some stuff removed to protect my privacy)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.***.chromeReload</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>/Users/***/PATH/TO/ChromeReloader.app</string>
</array>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Minute</key>
<integer>0</integer>
</dict>
<dict>
<key>Minute</key>
<integer>5</integer>
</dict>
<dict>
<key>Minute</key>
<integer>10</integer>
</dict>
<dict>
<key>Minute</key>
<integer>15</integer>
</dict>
<dict>
<key>Minute</key>
<integer>20</integer>
</dict>
<dict>
<key>Minute</key>
<integer>25</integer>
</dict>
<dict>
<key>Minute</key>
<integer>30</integer>
</dict>
<dict>
<key>Minute</key>
<integer>35</integer>
</dict>
<dict>
<key>Minute</key>
<integer>40</integer>
</dict>
<dict>
<key>Minute</key>
<integer>45</integer>
</dict>
<dict>
<key>Minute</key>
<integer>50</integer>
</dict>
<dict>
<key>Minute</key>
<integer>55</integer>
</dict>
</array>
</dict>
</plist>I know this a bit late:
Maybe an easier code..?
activate application "Google Chrome"
tell application "System Events"
tell process "Google Chrome"
keystroke "r" using {control down, shift down}
end tell
end tell -
How to run jsp using tomcat server?
hai friends,
i'm using jsp for my application and for that i'm using tomcat server.
i was runing my jsp files like this
http://localhost:8080/examples/jsp/myapp/index.jsp but instead of this
i need to run my jsp files like this
http://localhost:8080/myapp/index.jsp
what r the changes that i should do in tomcat installation to run myapplication in such a way.
thanks in advanceyou need to redefine the server root...
for that do the following...
copy all the directory tree rooted at
JAKARTA-HOME/webapps/ROOT/examples/jsp/myapp/ to
JAKARTA-HOME/webapps/ROOT/myapp/
-OR-
in the server.xml, search for "Tomcat Root Context" and un-comment the code defining Root Context...
change the docBase value from "ROOT" to "ROOT/examples/jsp"
that shud help...
-Pranav
hai friends,
i'm using jsp for my application and for that i'm
using tomcat server.
i was runing my jsp files like this
http://localhost:8080/examples/jsp/myapp/index.jsp but
instead of this
i need to run my jsp files like this
http://localhost:8080/myapp/index.jsp
what r the changes that i should do in tomcat
installation to run myapplication in such a way.
thanks in advance
Maybe you are looking for
-
Exception handling to catch the outcome of a select
Hello, I want to use exception handling to exit me out of a function module. I want to have one exception for all errors. For example, if this select statement does not work, how do I finish up this code to make it work. error type cx_bsx try select
-
Zen NX is not recognized by my lap
Just for kicks I gave Pocket DivX Encoder a try. It sure is quick, and the file was definitely readable on my Zen, but I prefer to use my usual video converter, megui. The problem is all of the video files that i have made with megui weren't 'seekabl
-
Different msgid shown in /var/adm/message as opposed to command line.
I've been trying to investigate an issue of how the /var/adm/messages alarms which has a message ID is different from a command line msgid output but have not been successful. The test I have done is as follow: logger -p local0.error -t TEST "Test Al
-
My wifi connection does not remain connected. I need to disconnect and then reconnect to reestablish wifi, sometimes every few minutes. Router SSID has been changed to broadcast and am using WPA2. Any fix available to this problem? The problem is cle
-
Is there a way to remove the currency from you shopping cart products or create your own currency? I am tryning to aad products that can be purchased with my own type of currency ie points. These poins will be send out as gift vouchers for dealers an