Re: Urgent : Can we restrict access to a directory in tomcat

2003-06-09 Thread Tom Oinn
The other way to do it would be to check the referer page, this seems to 
be quite a common trick and will confound most people trying to link 
directly to your images (which is what I imagine you're trying to 
prevent). There may be a more elegant way of doing it, but you could 
create a servlet that is mapped to your /images mount point which 
inspects the referer field in the request and, assuming it is valid, 
returns the appropriate content from a directory outside of your web 
application. As all requests would go through the servlet you have 
access control.

Tom

Shapira, Yoav wrote:
Howdy,
That one's tricky (and strange).  When you have a servlet or JSP, the
output the user sees is HTML.  In HTML, you have img tags.  The
browser will request those images normally in HTTP requests.  So from
the server's perspective, the request is the same whether the user types
in the image URL or you embed it in one of your pages.
Would something like using a mangled images directory name ($KF_%# or
something) be sufficient?  A name that's hard for users to guess and use
directly?
Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Syed Nayyer Kamran [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 9:33 PM
To: [EMAIL PROTECTED]
Subject: Urgent : Can we restrict access to a directory in tomcat
hi there,

I want to restrict the user to access the images directly through the
web.

They should be able to access these images through web pages developed
as

jsp/servlet but should not be able to access these images displayed on
page

by copying the image url to the address bar. Is tomcat directly support
this functionality. or any other solution.
Thanks in advance for any solution of the problem.

Nayyer Kamran




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Proper way to deal with serialization of session attribute withLogger attribute

2003-05-27 Thread Tom Oinn
Make the logger static? Effectively the same as you're creating it from 
the class name anyway, and avoids attempts to serialize it as it's not 
attached to an object of any kind.

Tom

Karr, David wrote:
I'm using JDK 1.4.1, and Tomcat 4.1.24.

I was seeing a strange situation where some cactus/ant tests of mine
would succeed on one run, and then fail on the next, and alternate in
that pattern continuously.
After looking carefully at the Tomcat logs, I discovered that a class
that is instantiated and then put into the session has a Log4J Logger
object.  Tomcat tries to persist that session, but it fails because
Logger is not serializable.
If I want to allow objects of this class to be serialized and
deserialized, how do I deal with the contained Logger object?
The class presently defines it's logger instance variable like this:

protected final Logger logger =
Logger.getLogger(this.getClass());
Do I instead have to make this transient and change all the references
to the logger instance variable to call an accessor which tries to
initialize the value first if it's null?  Or perhaps do I have to add
writeObject() and readObject() methods where the writeObject()
method specifically writes all the fields but this one, and the
readObject() method reads all those fields, and then manually sets the
logger value?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: System user accounts required to use manager in 4.1.12?

2002-11-08 Thread Tom Oinn
I find it unlikely that a path like that ever worked on any system. 
You're sending parameters to a server, so the code that needs to read 
the .war file is running remotely. There is no way that the remote 
server will understand your 'C:/path/.../foo.war', it simply doesn't 
exist there. You need to put the war files onto an HTTP server 
somewhere, quite possible using IIS or Apache on your win2k machines, 
have the users copy the war files into their web space and then access 
them by HTTP from the manager application (i.e. use the 
http://my.workstation/~me/mywebapp.war rather than a local file path).

Cheers,

Tom

[EMAIL PROTECTED] wrote:
John,
The manager install and reload finctions work fine on 4.0.4 running on an 
AS/400 with a windows client.  Your URL format looks correct and like the one I 
used.  It took me a few trial and errors to get the format correct.
Bill

Hello -

I've setup 4.1.12 on Solaris 8.  

I've given access to the manager app to my users.  They are all using the
same user account and password in tomcat-users.xml for now, though that will
change once I get more experience using the security roles system.

Do my users need system-level user accounts in order to use the Tomcat
manager app?  Do WAR files need to be copied to the server prior to trying
to deploy them using the Manager app?I'm trying to use a Manager URL
like this to install a WAR file:

http://galeron.aas.com:8080/manager/install?path=/myAppwar=file:C:/path/to/
myApp.war

This returns an error message that says:

FAIL - Encountered exception java.io.IOException:
java.lang.IllegalArgumentException: Doc base must point to a WAR file

I've got a whole bunch of Microsoft VB coders learning JSP and Java, and I'd
really like to avoid having to set all of them up as users on my server, and
teach them about command lines, FTP, etc.  It was my understanding that they
would be able to use the Manager app to deploy their WAR files as needed via
a web browser.  Is this not the case?

Assume this scenario:

- they should be able to access their apps on
http://some.server.name/someApp
- they should be able to use the Manager app to deploy as needed
- their application WAR files exist on Windows 2000 Pro machines

That said, can someone provide me with an example of how to deploy
someApp.war from a Windows 2000 machine to a Tomcat server using only the
Manager app?  Can this even be done?

Specifically, I would like to know, for the scenario above, how I would fill
in the three text boxes on the page at
http://galeron.aas.com:8080/manager/html/list which are labeled Path,
Config URL, and WAR URL.  As it stands right now, I would think it would
be:

Path = /someApp
Config URL = I have no idea
WAR URL = C:\some\path\to\war\file\on\Win2K

Any help is appreciated...and I guarantee the docs will get updated once I
figure this out, as they haven't helped me any so far!

- John


John Turner
[EMAIL PROTECTED] | 248-488-3466
Advertising Audit Service
http://www.aas.com


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org





--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Servlet

2002-08-30 Thread Tom Oinn

Um, have you actually read the documentation? If you had then you would 
have seen references to WEB-INF directories, web.xml files and suchlike. 
  I strongly suggest that you go read the docs that came with tomcat 
before asking questions to the list.

Cheers,

Tom

Jaicey Ouseph wrote:
 I have downloaded the Tomcat 4.0.4. I am running it as
 a standalone. I have made a folder jaicey/jsp in
 webapps. I have even made jaicey/servlets in webapps.
 I have set the context path in server.xml. So when I
 place any jsp file inside jaicey/jsp it works fine.
 But when I place the servlet inside jaicey/servlet
 then it does not seem to work. If I set the classpath
 in setclasspath.bat then, it only works if I start
 tomcat without using bootstrap. But how do I set the
 classpath if I am using bootstarp to start the tomcat.
 
 Please Reply..
 
 
 __
 Do You Yahoo!?
 Yahoo! Finance - Get real-time stock quotes
 http://finance.yahoo.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: NotSerializableException

2002-08-20 Thread Tom Oinn

Create a container object, which is serializable and put a member 
reference within it to your IMAPSession, marking this as transient.

public class MyContainer implements Serializable {
  public transient IMAPSession mySession;
}

Tom

Luminous Heart wrote:
 I only add the imap session to the HttpSession. But I
 do not write it to disk. What is the best way to stop
 this behavior?
 
 --- Peter Davison [EMAIL PROTECTED] wrote:
 
It looks like Tomcat is trying to serialize a
session.  Are you storing an
IMAPFolder object in the session?

It kacks because com.sun.mail.imap.IMAPFolder is not
serializable.

P.


On Tue, 20 Aug 2002 07:41:48 -0700 (PDT)
Luminous Heart [EMAIL PROTECTED] wrote:


I am not asking tomcat to serialize my app, nor do

I

have any serialization in this application.  Why

am I

getting this new exception?

2002-08-19 21:06:27 StandardManager[/NoPassApp]
Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
com.sun.mail.imap.IMAPFolder
at


 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
 
at


 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
 
at


 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
 
at


 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
 
at


 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
 
at


 java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
 
at


 org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1
 
268)
at


 org.apache.catalina.session.StandardSession.readObjectData(StandardSession.ja
 
va:810)
at


 org.apache.catalina.session.StandardManager.load(StandardManager.java:411)
 
at


 org.apache.catalina.session.StandardManager.start(StandardManager.java:617)
 
at


 org.apache.catalina.core.StandardContext.reload(StandardContext.java:2497)
 
at


 org.apache.catalina.loader.WebappContextNotifier.run(WebappLoader.java:1332)
 
at java.lang.Thread.run(Thread.java:536)
Caused by: java.io.NotSerializableException:
com.sun.mail.imap.IMAPFolder
at


 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
 
at


 java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
 
at


 java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
 
at


 java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
 
at


 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
 
at


 java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
 
at


 org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:
 
1338)
at


 org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.j
 
ava:827)
at


 org.apache.catalina.session.StandardManager.unload(StandardManager.java:507)
 
at


 org.apache.catalina.session.StandardManager.stop(StandardManager.java:654)
 
at


 org.apache.catalina.core.StandardContext.reload(StandardContext.java:2409)
 
... 2 more


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:  

mailto:[EMAIL PROTECTED]

For additional commands, e-mail:

mailto:[EMAIL PROTECTED]


--
Peter Davison
[EMAIL PROTECTED]

When I hear a man applauded by the mob I always feel
a pang of pity
for him.  All he has to do to be hissed is to live
long enough.
  -- H.L. Mencken, Minority Report

--
To unsubscribe, e-mail:  
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

 
 
 __
 Do You Yahoo!?
 HotJobs - Search Thousands of New Jobs
 http://www.hotjobs.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Can two tomcats back each other up on one machine?

2002-07-25 Thread Tom Oinn



Brandon Cruz wrote:
 I am running tomcat 3.2.4 (I know it's old, but it works great!).  We
 typically have around 50 database connections and twice as many sessions
 going at any given time.  I would like to set up another tomcat, or find a
 solution to restart without having to kill everyone's session.  Is there
 anyway I can set up this up so that if one tomcat goes down for restart the
 sessions can automatically be transferred over to the other tomcat?  After I
 restart the first, then I can restart the second the same way.  The problem
 is that we usually add two or three virtual hosts per day and need those
 changes to be recognized.
 
 Has anyone done anything like this before or run into the same problem?

Not sure about exactly how you do what you're describing, but another 
solution is as follows.

1) set up a redirector with sticky session management, so requests are 
routed through to whichever container their session is bound to

2) when you want to update your services, you don't shut down either 
container, you simply prevent new sessions being created on one or the 
other.

3) when all active sessions have cleared from the unreachable container, 
you can shut it down and reconfigure it

4) repeat in the obvious fashion for the other

It may be possible (well okay, it's possible, it may be easy) to 
automate this, and similarly it scales to multiple instances quite 
nicely. It's trivial if you have good hardware redirectors, but they're 
not exactly cheap bits of kit so it's entirely likely you don't.

Hope that's of some help,

Tom


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 



Re: Can two tomcats back each other up on one machine?,
Tom Oinn

RE: Can two tomcats back each other up on one machine?,
Brandon Cruz














 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Re: Can two tomcats back each other up on one machine?,
Tom Oinn

RE: Can two tomcats back each other up on one machine?,
Brandon Cruz














 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Re: Can two tomcats back each other up on one machine?,
Tom Oinn

RE: Can two tomcats back each other up on one machine?,
Brandon Cruz














 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Re: Can two tomcats back each other up on one machine?,
Tom Oinn

RE: Can two tomcats back each other up on one machine?,
Brandon Cruz














 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  













Re: Can two tomcats back each other up on one machine?,
Tom Oinn

RE: Can two tomcats back each other up on one machine?,
Brandon Cruz














 
  
Chronological
--
  

 
  

 

  Thread 
  --  
  





  
  
  
  
  [EMAIL PROTECTED]">
  Reply via email to
  
  










 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "3243237953";
google_color_border = "CE9689";
google_color_bg = ["FF","ECE5DF"];
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







Re: Can two tomcats back each other up on one machine?
Tom Oinn


RE: Can two tomcats back each other up on one machine?
Brandon Cruz





 






  
  





Reply via email to



  
  





 
 







Re: Problem with doPost() method executed twice in parallel

2002-06-07 Thread Tom Oinn



[EMAIL PROTECTED] wrote:

  And suddenly, whereas the code is executing in an extern method, the
  traces situed at the begin of doPost() method are displayed a second
  time !!!
  It looks like if doPost() method was executed a second time IN
  PARALLEL of the first doPost() (because the external methods issued
  from the first doPost() continue to execute).

This is correct. The servlet container will create a single instance of
the servlet class that you have written, calling the init() method at
the time of creation. After this, each request to your servlet will map
to a separate thread, all of which run through the same object (your
servlet).

If you are accessing external objects as part of this process, you must
ensure that either your external resources are created per-access, so
created and referenced within the doPost() method, or that they are
thread safe, as you have no control over when they are accessed.

Exactly why you are getting two invocations of your doPost() call is
unclear, it depends on what is trying to access it, but this kind of
behavior is common and intentional.

Hope that helps,

Tom Oinn

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: templating system?

2002-05-24 Thread Tom Oinn



Vincent Stoessel wrote:
 
 Hello All,
 
 I was wondering if there were any projects out there that provided any
 kind of database-html templating. I need the ability quickly create
 web pages that allow users to  create/retrieve/update/delete rows
 from tables that I will be creating. I am doing this with tomcat
 jsp/javabeans model. I guess I could just write my own but I wanted
 to ask before I reinvent the wheel.
 Thanks

I wrote an interface builder called Talisman, its pages are at
http://www.ebi.ac.uk/talisman, give me a mail if it looks like it's of
interest and I can give you more details.

Ciao,

Tom

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: I'm getting no responses to my requests for help on this list

2002-05-16 Thread Tom Oinn

Hi,

We're going to need some details of your environment, os and suchlike.
Do you have any other servers running on this machine?

Tom

Gary Frick wrote:
 
 Hi All,
 
I've been working day and night trying to get Tomcat started and to get past the 
HTTP 500 error when trying to invoke the JSP examples.  I've been combing the 
archives, but I'm not seeing any real solutions.  What must I do and where must I go 
to get help?
 
First it would be helpful to know what is going on.  When I try to start Tomcat I 
get the following (See below. Only providing first few lines of trace).  When I try 
//localhost/examples  I can execute the servlets, but not the JSPs.  On the JSPs I 
always get HTTP Status 500 messages.  I've followed the recommendations to recheck 
the classpaths and environment variables (JAVA_HOME and TOMCAT_HOME), but this hasn't 
helped.  For one thing I don't understand why port 8080 is already in use.  How can I 
check?
 
 Thanks,
 Gary
 
 Catalina.start: LifecycleException:  null.open:  java.net.BindException: Address
  already in use: JVM_Bind:8080
 LifecycleException:  null.open:  java.net.BindException: Address already in use:
  JVM_Bind:8080
 at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
 ctor.java:1130)
 at org.apache.catalina.core.StandardService.initialize(StandardService.j
 ava:454)
 at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
 a:553)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 - Root Cause -
 java.net.BindException: Address already in use: JVM_Bind:8080
 at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.j
 ava:950)

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: problem with mysql and tomcat

2002-04-23 Thread Tom Oinn



Amrinder Singh wrote:
 
 hi i've downloaded the mysql and loaded the driver(mm.nysql) driver for it.If i try 
to use it in a regular program without involving the server(tomcat3.2.1) it works 
fine . i can get the resultset etc which is fine. But when i created another 
applicatoin which involved the use of Tomcat it gives me error saying
 
 Started: 21:13:29.210 PM
 Error: java.sql.SQLException: Invalid authorization specification: Access denied for 
user: 'username@localhost' (Using password: YES)
 
 i've looked at hundreds of webpages but nothing so far has revealed a suitable 
reaason and solution for it. one webpage said to put the jar file in WEB-INF/lib dir 
but in my version of tomcat3.2.1 theres no subdirectory as that . 

Well, you wrote the web application right? So technically no directories
exist until you put them there :)

Applications running in tomcat get can load their classes from three
main locations, /jre/lib/ext (Standard installed extensions, don't use
this as it's a nightmare to maintain, believe me!), /$TOMCAT_HOME/lib
(for general drivers that everything should be able to see) and
/$TOMCAT_HOME/webapps/YOUR_APP/lib.

So, the short answer (and I'm not even sure your problem is anything to
do with this, but it's a faq anyway) is to create the 'lib' subdirectory
and put the driver jar in it.

Cheers,

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: image manipulating via servlets on tomcat4

2002-03-12 Thread Tom Oinn



yilmaz wrote:
 
 Hi  everybody,
 I am using tomcat4 on win 2000.
 I have searched all the archives and almost all websites related with java,
 to no avail.
 My problem is manupulating  images via servlets on Tomcat.
 In fact , there are tons of examples on the internet and on the archives
 which shows
 how to load an image from a local file and send to the browser, or
 dynamically
 generate a gif , or jpg image  and send it  to the user. Up to here ,
 everything is allright.
 But , it seems that there is no way to load an image from a file (at
 server), write some text on it
 or edit that image on hand, finally send it to hte browser as a new image.
 I tried almost every way, in vain :(
 I hope, someone overthere, an expert, be nice enough to answer my question,
 though my
 question might sound a little bit offtopic.
 Looking forward to your help hopefully.
 Cheers :)

It sounds that you need to do the following :

1) Load your image and do whatever manipulation you would do normally,
this gives you some kind of object representing the image data yes?
2) Set the response content type to something appropriate to the image
format you want to use
3) Get the writer for the http response
4) Get a reader from your image object, through some kind of encoder
format (jpeg, gif etc)
5) Read from the reader, writing to the writer and you should be
returning an image to the client.

Hope that helps,

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How to use swing classes without X-server

2002-03-05 Thread Tom Oinn



Serge A. Redchuk wrote:
 
 Hello All !
 
 I want to use some of Swing classes like
 
 import javax.swing.tree.TreeModel;
 import javax.swing.tree.TreePath;
 
 by tomcat in environment where no X-server running.

snip

 Huh !! I do not need X-server !!! I just want to use a pair of Swing
 classes.
 
 Anybody know what to do ???

1) Wait until java 1.4 is solid enough to use in anger, I believe it
   gets around this problem.

2) Run the Xvfb (X Virtual Frame Buffer) on your server, and set the
   DISPLAY environment variable appropriately. We had to do this to
   get our farm nodes (no graphics) working properly.

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Why localhost:8080 NOT expanded to http://localhost:8080

2002-02-28 Thread Tom Oinn



Thomas Stiller wrote:
 
 After having started Tomcat 4.0.2 I entered
 the URL
 localhost:8080
 into my browsers URL entryfield.
 Surprisingly it is not automatically expanded to
 http://localhost:8080
 but gave an error (page not found)
 
 With other URLs in the outside internet world(when I am connected through my 
providers connection) it works fine.

Most browsers will only do the autocompletion with addresses starting
'www', I doubt there's any way you can change this. You could just
create a bookmark to your server if it's bugging you...

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat in an academic development enviroment

2002-02-20 Thread Tom Oinn



Randy Layman wrote:
 
  -Original Message-
  From: Zoko, Anthony [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 19, 2002 8:32 PM
  To: [EMAIL PROTECTED]
  Subject: Tomcat in an academic development enviroment
 
 
  1) How do I isolate student applications into there own
  process space to prevent them from crashing Tomcat (these
  students don't have much development experience)?
 
 I don't believe that this is possible.  On the up side, though, the only way
 a student could crash Tomcat is by calling System.exit or loading native
 code that crashes.  Both of these options can be disabled using the security
 settings for the JVM.  One student would still be able to hog all the
 processor, memory, and hard drive resources that you allow Tomcat to take,
 though.

It's worse than that; an out of memory exception will kill the servlet
container, so it's not just a question of resource hogging. We have a
related problem here, in that different groups of developers write code
with, shall we say, variable levels of stability. We just run multiple
VMs, they share most of their memory allocation so it's not proved to be
a problem. We're running about twenty instances of tomcat 3 on a dual P3
800mhz linux box with 1gb ram and it copes just fine, certainly well
enough for dev work, or eager students.

Once things are tested properly, we deploy them into production
containers, and if they take those down we go developer hunting with our
office collection of nerf weaponry. Doesn't cure the bugs, but gets the
point across.

Cheers,

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: bug?? linux7.1 tomcat4.0.1

2002-01-25 Thread Tom Oinn



Dean Hiller wrote:
 
 I have
 redhat linux 7.1
 jdk1.3.1_02
 tomcat 4.0.1
 
 tomcat works, BUT all images come across corrupted on IE and netscape.  Is there a 
bugfix/work around to fix this problem. 

I believe this is covered elsewhere on the list, recently, and has
something to do with the glibc version supplied with this version of
redhat.

 Also, why does the jdk have to be installed?  Why can't we just use the JRE?

The JDK is needed because the JRE doesn't include a compiler, and
tomcat needs one to compile the servlets generated from jsp files. You
might in theory be able to run it with the JRE if you added the
appropriate jar files.

 One more thing is the DOCS should mention that tomcat on linux is run on port 8180 
NOT 8080 after installation.  Of course, I am using the tomcat from the rpm directory 
not the bin directory on the website.

I can't comment on this, but I would suggest that anyone running a
server should examine the configuration /before/ starting it for the
first time. Had you done this, it would have been apparent which ports
were in use. Besides which, the initial configuration also provides
quite reasonable documentation on the possible config options, so
there are other reasons to want to look at it.

Cheers,

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: GETTING STARTED WITH TOMCAT

2001-12-13 Thread Tom Oinn



[EMAIL PROTECTED] wrote:
 
 hi
 i'm new to servlets and JSP ...well i have installed tomcat in C:\tomcat
 and have set the JAVA_HOME in tomcat\bin\tomcat.bat to C:\jdk1.3.1
 
 when i try to start the tomcat from MS-DOS from bin subdirectory a new window starts 
and disappears...(I Think this is what it should behave like!!) BUT the problem is 
that when i try to test whether tomcat is working its not finding 
http://localhost:8080
 
 please help me out so i can proceed further.

I suggest you look in the server logs, they're in the $TOMCAT_HOME/logs
directory. I believe that if everything were working, the DOS window
would stay there, the fact that it doesn't suggests that the server
didn't start correctly, and hopefully would have told you why in the
logs. Alternatively, open a new DOS prompt and run the bat file from
there, that way you would be able to see the error messages before the
window closes.

HTH,

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat 3.3, server.xml and a lot of fun

2001-12-05 Thread Tom Oinn



java programmer wrote:

snip

 webapps should never have made it
 into the spec. Name three well known
 web sites running in a mass virtual hosted
 environment and deployed as webapps with
 a web.xml file to boot ! Hell, name *any*.

/snip

Hi,

We're the main european hub for bioinformatics research and resources,
the fact that webapps exist and can be packaged is incredibly useful to
us. The management of different projects, produced by different groups
but wishing to reside in the same container, would otherwise be annoying
and tedious, with the webapp concept it's relatively trivial. This is
not running in a virtual hosted environment because we're sitting on top
of the academic backbone here and run our own machines, but the point
still holds; there are definite circumstances where modular applications
are of extremely high value.

Cheers,

Tom
 
oh, and btw :

 And the kicker is the gratuitous, idiotic
 use of XML for _configuration_. For you to say:

No problem with XML for config, it's just a more specific case of text
config files, and at least the structure is easy to use. Conceptually,
if you're configuring a system that is intrinsically hierarchical,
doesn't it make sense to use a configuration mechanism that shared this
property?
 
  servlet.xml cannot have DTD, since people can
  add their own stuff
  (classes), instantiate it in server.xml, and name it
  the way they want,
 
 shows that you have no conceptual idea what xml is
 intended for.

However, this is true :)

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New tomcat user questions

2001-11-19 Thread Tom Oinn



Alec Bickerton wrote:

snip

 This indicates that the config file couldn't be found.
 
 QUESTION: Can  anyone suggest a reason as to why this is happening, even tho this 
works under 3.2.3 ?
 QUESTION: What would I need  to do to make poolman.xml visible to all webapps ?

The most common reason we've found for this error is that tomcat4 is
much more picky about the ordering of elements within web.xml. This can
mean that it will quietly not set any of your servlet configuration - do
you have a parameter in the web.xml saying where to find your xml file
perhaps? Take a look in the catalina.out logfile, it would tell you
whether this is happening (you'll get complaints about an invalid
web.xml file)

To make a file visible to all webapps should just be a question of
telling the other webapps where on the file system the xml file is
located surely? If you're accessing through HTTP you could set up a
dummy context with access restricted to localhost that contains your
configuration files.

Hope this helps,

Tom Oinn

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: log analyzer?

2001-11-12 Thread Tom Oinn



Y.H.Liu wrote:
 
 Hi friends,
 
  Is there any utility that can help to analyze the log file of Tomcat, such
 as webalizer for Apache?
 Thanks in advance.

You could take a look at awstats, if you have tomcat-4 and set the log
format to 'combined' then this works just fine out of the box, otherwise
it's sufficiently configurable that you could probably get it to read
the tc3 access logs. It's located at http://awstats.sourceforge.net, I'm
running it fine on tru64 unix and win32 with activeperl.

HTH.

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Is this the way to do it?

2001-09-17 Thread Tom Oinn



Järkeborn Joacim wrote:
 
 HI Magnus,
 
 Make use of the simple datatype 'boolean' instead of the object 'Boolean'

or... :

boolean BoolDans = (new
Boolean(request.getParameter())).booleanValue();

The Boolean class has a String constructor that returns Boolean.TRUE if
the string is not null and equal to true and Boolean.FALSE otherwise.
The 'booleanValue' creates a primitive type from this. BTW - 'new
Boolean(false)' is not all that good an idea, use
'Boolean.valueOf(false)' instead, as this avoids the overheads of object
creation etc.

Tom Oinn



Re: Destination Port for mod_jk

2001-09-14 Thread Tom Oinn



David Smith wrote:
 
 I believe it's the same as a conversation between your web browser and
 Apache.  When Apache makes a request of Tomcat, it uses the first available
 port on the local machine to open a connection to Tomcat.  In a linux box,
 check /proc/sys/net/ipv4/ip_local_port_range for the range of available
 ports.  Tomcat will reply back on the same port.  If you really want firewall
 security that tight, you might want to check into stateful inspection on the
 Apache server.  There, the ports are opened based on outgoing requests and
 closed when the connection is closed.   I believe iptables supports this
 using the state match extension module, but you'll have to check the docs
 since I've never tried it.
 
 My thoughts on the subject -- anyone else?

Assuming that each machine can reasonably trust the other, you could
add a completely isolated network interface to each machine, and set
up the apache and tomcat to use this interface, effectively you have
no security constraints on the interfaces between the two servers and
all your firewalling goes on on the machines' primary interfaces to
the rest of the world. We have a similar system with tomcat / oracle
machines and it seems simple and secure enough.

Tom Oinn

 --David Smith
 
 On Wednesday 12 September 2001 05:32 pm, you wrote:
  Hello,
 
  I'm setting a pair of machines, one of which is running tomcat, and the
  other of which is running apache.  I am using ajp13 to connect the two
  machines, and am trying to configure an iptables firewall on the apache
  machine (the tomcat machine will be next).
 
  The roadblock that I'm running into is that I don't know which ports
  will be used as the destination ports on the apache machine when tomcat
  replies.  The ports that I set up in server.xml and in
  workers.properties are the source of my replies...
 
  Looking at my syslog log file, I see that I'm getting information sent
  to ports 32769 up through 32792 (and maybe even more, I haven't looked
  through them that much yet).  An example line is included below:
 
  Sep 12 11:42:51 web1 kernel: INT_IN DROP 7 IN=eth1
  OUT=MAC=00:30:48:11:69:a8:00:b0:d0:e1:cc:0f:08:00 SRC=192.168.1.32
  DST=192.168.1.21 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP
  SPT=8011 DPT=32794 WINDOW=5792 RES=0x00 ACK SYN URGP=0
 
  Where is this port configured (if it's configurable)?  Or, does anyone
  know which ports I need to be leaving open?
 
  Thanks very much for any help!
 
  Sincerely,
 
  Scott



Re: Announce: OurSQL, JSP interface for MySQL

2001-09-12 Thread Tom Oinn



Elm Gysel wrote:
 
 That page has 4 links of its own and 3 of them give you jsp errors.
 
 I'm not sure if I would join that project tho :)
 
 Greetings from Belgium!
 
 Elm
 
 - Original Message -
 From: Kaneda K [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 12, 2001 12:42 PM
 Subject: Re: Announce: OurSQL, JSP interface for MySQL
 
  At 06:47 12/09/2001 +0200, you wrote:
  Hi,
  First, I'm sorry for being half off-topic.
  Recently, I was looking for a good admin tool for MySQL. All I found was
  MyAdmin, which is written in PHP. I don't want any PHP on my server, so I
  decided to write my own software, and here it is - the first version of
  OurSQL.
  What it can do? Right now - you can log in to any MySQL database (local
 or
  remote) and execute any queries you want, viewing results. The goal is,
 of
  course, to make easy any frequent operation.
  Tell me what do you think, any suggestions, etc.
  Yes I know the current version sucks. Think of it as an interactive demo.
  Installation: copy the .jsps to a single directory anywhere and add
 MM.MySQL
  drives to WEB-INF/lib
  
  You can get it here: http://oursql.wwtech.pl
  
  Greetings,
deacon Marcus
  
  p.s. I still need the Tomcat plushie, please...
 
  http://www.javaphilia.com/
 
  Is the same kind of project may be you could go faster by joining it,
 don't
  you think ?

..or you could take a look at :

http://golgi.ebi.ac.uk/talisman

This is a web application builder I wrote to save myself a load of time
writing boring web interfaces for our biologists, it includes a simple
test application that does generic SQL stuff (we use oracle but there's
nothing here that ties talisman to this, or any db in fact).

Tom