don cline

Ranch Hand
+ Follow
since Oct 10, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by don cline

Costi,

Thank you for your post.

I do not have Apache installed. I am running Tomcat as a standalone application. I have changed the port it listens to, to port 80 in /etc/tomcat6/server.xml

Of course, I had to change /etc/default/tomcat6 to allow it to turn on AUTHBIND.

The first two lines of http://192.168.1.9/ are:
It works !

If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!


So Tomcat is running.

But, in developing an answer to your post I discovered the problem

I was using /usr/share/tomcat6/webapps as the root apps directory and place to put the war file rathar than /var/lib/tomcat6/webapps

So, it all works. Thanks to both that posted for your help.



Don

13 years ago
Tom,

Thank you for your post.

Briefly, I am pretty sure that I what I am doing wrong is very basic. I have copied the log files and as you will see, Tomcat did not try to even deploy the app.


Have you checked the log files?
The log files follow:
catalina.out
Jan 2, 2011 8:05:56 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /
usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages
/lib/i386:/usr/lib/jni:/lib:/usr/lib
Jan 2, 2011 8:05:57 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Jan 2, 2011 8:05:57 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4331 ms
Jan 2, 2011 8:05:58 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 2, 2011 8:05:58 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Jan 2, 2011 8:05:58 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Jan 2, 2011 8:05:59 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Jan 2, 2011 8:06:00 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Jan 2, 2011 8:06:00 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Jan 2, 2011 8:06:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3215 ms


catalina.2011-01-02.log
Jan 2, 2011 8:05:56 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /
usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages
/lib/i386:/usr/lib/jni:/lib:/usr/lib
Jan 2, 2011 8:05:57 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Jan 2, 2011 8:05:57 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4331 ms
Jan 2, 2011 8:05:58 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 2, 2011 8:05:58 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Jan 2, 2011 8:05:58 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Jan 2, 2011 8:05:59 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Jan 2, 2011 8:06:00 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Jan 2, 2011 8:06:00 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Jan 2, 2011 8:06:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3215 ms


localhost.2011-01-02.log
this was empty


What does your web.xml file look like?
The contents follows:
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">

<description>
Servlet and JSP Examples.
</description>
<display-name>NeuralNetII</display-name>
<!-- Define servlets that are included in the NeuralNetII application -->

<servlet>
<servlet-name>Reflect</servlet-name>
<servlet-class>Reflect</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Reflect</servlet-name>
<url-pattern>/Reflect</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceAddSymbol</servlet-name>
<servlet-class>SymbolMaintenanceAddSymbol</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceAddSymbol</servlet-name>
<url-pattern>/SymbolMaintenanceAddSymbol</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceSymbolDelete</servlet-name>
<servlet-class>SymbolMaintenanceSymbolDelete</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceSymbolDelete</servlet-name>
<url-pattern>/SymbolMaintenanceSymbolDelete</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceSplitDelete</servlet-name>
<servlet-class>SymbolMaintenanceSplitDelete</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceSplitDelete</servlet-name>
<url-pattern>/SymbolMaintenanceSplitDelete</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceSplitAdd</servlet-name>
<servlet-class>SymbolMaintenanceSplitAdd</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceSplitAdd</servlet-name>
<url-pattern>/SymbolMaintenanceSplitAdd</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceExtendForwardRemote</servlet-name>
<servlet-class>SymbolMaintenanceExtendForwardRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceExtendForwardRemote</servlet-name>
<url-pattern>/SymbolMaintenanceExtendForwardRemote</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceExtendBackRemote</servlet-name>
<servlet-class>SymbolMaintenanceExtendBackRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceExtendBackRemote</servlet-name>
<url-pattern>/SymbolMaintenanceExtendBackRemote</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceCalculateLastFewRemote</servlet-name>
<servlet-class>SymbolMaintenanceCalculateLastFewRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceCalculateLastFewRemote</servlet-name>
<url-pattern>/SymbolMaintenanceCalculateLastFewRemote</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>SymbolMaintenanceCalculateAllRemote</servlet-name>
<servlet-class>SymbolMaintenanceCalculateAllRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SymbolMaintenanceCalculateAllRemote</servlet-name>
<url-pattern>/SymbolMaintenanceCalculateAllRemote</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>NetDefinitionMaintenanceSave</servlet-name>
<servlet-class>NetDefinitionMaintenanceSave</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>NetDefinitionMaintenanceSave</servlet-name>
<url-pattern>/NetDefinitionMaintenanceSave</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>NetDefinitionMaintenanceDelete</servlet-name>
<servlet-class>NetDefinitionMaintenanceDelete</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>NetDefinitionMaintenanceDelete</servlet-name>
<url-pattern>/NetDefinitionMaintenanceDelete</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>RunDefinitionMaintenanceDelete</servlet-name>
<servlet-class>RunDefinitionMaintenanceDelete</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>RunDefinitionMaintenanceDelete</servlet-name>
<url-pattern>/RunDefinitionMaintenanceDelete</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>RunDefinitionMaintenanceSave</servlet-name>
<servlet-class>RunDefinitionMaintenanceSave</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>RunDefinitionMaintenanceSave</servlet-name>
<url-pattern>/RunDefinitionMaintenanceSave</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>RunDefinitionMaintenanceTrainRemote</servlet-name>
<servlet-class>RunDefinitionMaintenanceTrainRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>RunDefinitionMaintenanceTrainRemote</servlet-name>
<url-pattern>/RunDefinitionMaintenanceTrainRemote</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>TrainedNetMaintenanceDelete</servlet-name>
<servlet-class>TrainedNetMaintenanceDelete</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>TrainedNetMaintenanceDelete</servlet-name>
<url-pattern>/TrainedNetMaintenanceDelete</url-pattern>
</servlet-mapping>


<servlet>
<servlet-name>TrainedNetMaintenanceDeleteBackTest</servlet-name>
<servlet-class>TrainedNetMaintenanceDeleteBackTest</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>TrainedNetMaintenanceDeleteBackTest</servlet-name>
<url-pattern>/TrainedNetMaintenanceDeleteBackTest</url-pattern>
</servlet-mapping>


<servlet>
<servlet-name>TrainedNetMaintenanceScoreRemote</servlet-name>
<servlet-class>TrainedNetMaintenanceScoreRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>TrainedNetMaintenanceScoreRemote</servlet-name>
<url-pattern>/TrainedNetMaintenanceScoreRemote</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>BackTestRunDefinitionMaintenanceDelete</servlet-name>
<servlet-class>BackTestRunDefinitionMaintenanceDelete</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>BackTestRunDefinitionMaintenanceDelete</servlet-name>
<url-pattern>/BackTestRunDefinitionMaintenanceDelete</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>BackTestRunDefinitionMaintenanceSave</servlet-name>
<servlet-class>BackTestRunDefinitionMaintenanceSave</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>BackTestRunDefinitionMaintenanceSave</servlet-name>
<url-pattern>/BackTestRunDefinitionMaintenanceSave</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>BackTestRunDefinitionMaintenanceBackTestRemote</servlet-name>
<servlet-class>BackTestRunDefinitionMaintenanceBackTestRemote</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>BackTestRunDefinitionMaintenanceBackTestRemote</servlet-name>
<url-pattern>/BackTestRunDefinitionMaintenanceBackTestRemote</url-pattern>
</servlet-mapping>

</web-app>



Do you have any paths in your xml files that refer to your Windows box?
I am pretty confident that I do not. There is one jsp dialog that is not yet OS neutral, but all of the rest should be. I would simply expect this jsp to fail in its function.


Is your MySql database configured to allow access from your Ubuntu box?
The Ubuntu box is already accessing the MySql database. Much of this application runs as a stand alone Java app or under tomcat. The standalone part is running on that Ubuntu box (192.168.1.9) and accessing the database. BTW, MySql is running on another Ubuntu server box (192.168.1.7).

Thank you for you suggestion. But, the log files were not a big help to me. Again, the war file is placed in /usr/share/tomcat6/webapps and tomcat seems to not even try to deploy it.

Don
13 years ago
I have a web application working in Tomcat 6 under Windows. I need to run it in Ubuntu Server.

I installed Tomcat on Ubuntu and http://192.168.1.9/index.html I get the base "It Works" screen from Tomcat. 192.168.1.9 is the IP of the Ubuntu server.

I created a WAR file of my application (I will call myapp) off of windows. I tested it on the Windows, placing the war file in the webapps directory and it auto deployed correctly.

In Ubuntu, I placed the war file in the webapps directory (/usr/share/tomcat6/webapps), this file was moved through a samba share, not FTP.
I restarted tomcat and it does not deploy, and yes, autoDeploy is set to true in the server.xml file.

I then tried to copy in all the files manually. This is everything under the webapps directory for "myapp" (this is the jsp's, servlets class files, etc.). Again, after restarting tomcat, the application is still not running.

http://192.168.1.9/manager/list gives:
OK - Listed applications for virtual host localhost
/manager:running:0:/usr/share/tomcat6-admin/manager
/:running:0:ROOT
/host-manager:running:0:/usr/share/tomcat6-admin/host-manager

What am I missing?

Thanks in advance for any help,

Don

(Ubuntu 10.04, Windows 2000, Tomcat 6, MySql 5.1,
Ubuntu java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu1~10.04.1)
Windows java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02),
connects to the same remote MySql database)
13 years ago
Thank you both...

Don
13 years ago
JSP
Of course we would use the MVC for the web display. This is not really a reporting problem, but statistical data is used interactively on a large number of objects. Although P.O.s are not the real problem, (I'm not allowed to describe the system), but they describe the problem well.

I need to know how many P.O.s we had in the last month, what was the average size, what was the max size, etc. I do not want to load a million objects to get the answer.

My solution is to use a Relational store and get the answer through SQL, but is there an object oriented design pattern for this other than reverting back to SQL.
Can someone direct me toward reference material for the best way to support multiple languages in Java Server Pages? The page should be able to display in English, Spanish, and probably other languages. I would like to not have different versions of the page, but different versions of the text displayed. Looking for the right design pattern for this (I can think of multiple ways, but what is the best way, I am sure others have solved this.)
13 years ago
JSP
I am searching for the correct design pattern for the associated problem.

I have a system that processes, lets say purchase orders. This would then have the normal associated objects for items, purchase orders, customers, etc. etc. The system can have hundreds of thousands to millions of purchase orders.

I need to display information about the purchase orders, for time periods such as the last week, last month, how many P.O. there were, the average size of the P.O., the maximum size of the P.O. and other statistics I will not bore you with.

I am not looking for a solution to this (I can think of many), but the correct design pattern to use. Basically a design pattern that allows the collection of statistics for a very large number of objects, where it is not practical to load all those objects to gain the statistics, but the statistics change with time.

So, anyone to suggest the correct design pattern?
All,

I would like to set up a stand alone tomcat with both HTTPS/SSL pages and HTTP non encrypted pages. Can anyone direct me to a good source or show me how to configure TOMCAT to support both. Of course, those pages that are encrypted should not be accessable through HTTP and those that are not encrypted should not be accessable through HTTPS.

Thus,
https://www.mypage.com/securepage/index.jsp
should not be accessable through
http://www.mypage.com/securepage/index.jsp

and
http://www.mypage.com/nonsecurepage/index.jsp
should not be accessable through
https://www.mypage.com/nonsecurepage/index.jsp

thanks in advance

Don
17 years ago
Many Thanks

Don
19 years ago
All,

I would like to redirect the tomcat 404 error. That is,
if someone enters:
http://mydomain/xyz.jsp

and there is no xyz.jsp page, I would like to redirect them to
http://mydomain/error.jsp

Is there a way I can redirect any possible combination, including
http://mydomain/xyz/xyz.jsp
if there is no xyz directory? (e.g. that path has not been defined)

Thanks in advance
Don
19 years ago
OOPS...

One of the lines in the .jnlp file is incorrect and should read:

The line I showed was an attempt to fix the problem...

Don
19 years ago
The .jnlp file as provided by Sun:



Thanks in advance
Don
19 years ago
I am new to Java Web Start. I am trying to run Sun's Web Start example
webpad. I am using Tomcat 4.1.31

I built the webpad war file according to instructions:
"To build .war file, run below command inside the war directory
jar -cvf ../webpad.war ."

I placed the war file in the $TOMCAT_HOME/webapps directory and restarted
Tomcat.

I went to the associated web page at:
http://localhost:8080/webpad/war/index.html

So far, so good.

I tried to launch the webpad app and got an error:
"An error occurred while launching/running the application.
Category: Launch File Error
The field <jnlp>codebase has an invalid value: $$codebase"

On the exception tab it lists:


What did I leave out?

Don
19 years ago
I have a pretty basic question.

I placed a JTable inside a JPanel associated with a GridBadLayout
manager. Even though I set the size of the JTable with setSize(int,int)
the JTable ends up tiny.

How do I control its size? There is plenty of room on the JPanel.

Don
19 years ago