RE: Order of WebApp Loading

2005-09-15 Thread Robert Harper
The case is still that most servlet containers, Tomcat included, are multithreaded and order of processing should not be counted on. One app may be swapped out while the other app runs. It is far better to write your servlets so that there is no dependency on order of operation, order of

RE: Windows and Tomcat

2005-09-08 Thread Robert Harper
When you installed Tomcat, you were prompted if you want it to run as a service and if so, what user to use. You should be able to go into your Services app under ControlPannel\Administrative Tools\Services and change the use and password that Tomcat starts with. If you need to, create an account

RE: Windows and Tomcat

2005-09-08 Thread Robert Harper
help thanks, Lalit On 9/8/05, Robert Harper [EMAIL PROTECTED] wrote: When you installed Tomcat, you were prompted if you want it to run as a service and if so, what user to use. You should be able to go into your Services app under ControlPannel\Administrative Tools\Services and change

RE: Users Can See root files

2005-08-31 Thread Robert Harper
Change the listings parameter value in the %CATALINA_HOME%/conf/web.xml to false. IE: servlet . . . init-param param-namelistings/param-name param-valuefalse/param-value /init-param /servlet This should turn off the file listings so that users should not be

RE: newbie with a short question

2005-08-26 Thread Robert Harper
The JVM by default does not allow you to run anything on the client. You will have to change the .properties file on the client to enable the server to interact with the client's file system etc. This is one of the reasons JavaScript is safer than VBScript. The VBVM allows the browser to do

RE: restarting tomcat in production

2005-07-25 Thread Robert Harper
The best practice is to find the leak and fix it. Restarting is a cover up to a problem that may cause bigger problems down the road as the project scope increases. You can do this but it only hides the real problem and if someone replicates you site and forgets to write or enable the script, then

RE: Problems serving files to download

2005-06-28 Thread Robert Harper
Try the following if you are trying to read the following in a servlet: String s = java.net.URLDecoder.decode( http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt;, UTF-8 ); You can read the file and write it out to the response stream. Since this is a text file it will be displayed in the

RE: Stored Procedures problem

2005-06-28 Thread Robert Harper
If this is an update, you will almost always get this exception. What is the query you are attempting to run? Robert S. Harper Information Access Technology, Inc. -Original Message- From: Carlos Bracho [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 12:54 PM To:

RE: threads in tomcat

2005-06-16 Thread Robert Harper
You should hold a reference to your thread in your app. Set a flag that the thread watches to notify it that it is time to terminate. Place this code in the servlet's destroy() body. Calling the destroy() on the thread object is a little drastic because it will terminate the thread without calling

RE: Problem with security?

2005-06-10 Thread Robert Harper
, no authentication is needed to access [Robert Harper] [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Problem with security?

2005-06-10 Thread Robert Harper
information on how to do this (keep in mind I'm new at this), please let me know. -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Friday, June 10, 2005 10:59 AM To: 'Tomcat Users List' Subject: RE: Problem with security? I think you have missed the point that you cannot get

RE: tomcat windows / mysql linux

2005-06-08 Thread Robert Harper
What is the speed of your network? Local access will almost always be faster than a call across the network. Even if you specify your ODBC to use a network address, the OS's are smart enough to not send local access through the network card. There could also be issues with the network physical

RE: Can a servlet receive its own request?

2005-05-18 Thread Robert Harper
I don't think so. You will have to have something start the request. Servlets are loaded by the container and are run in response to a request. Once the servlet is running, there is no reason why it could not make an http request for data from another server/servlet and parse the response. Robert

RE: Deny directory listing in Tomcat 4.1.x

2005-05-17 Thread Robert Harper
Add init-param param-namelistings/param-name param-valuefalse/param-value /init-param to the %CATALINA_HOME%/conf/web.xml file. Robert S. Harper Senior Engineer   Information Access Technology, Inc. 1100 East 6600 South Suite 300 Salt Lake City, Utah USA

RE: What are those No such list! s and Illegal IMail List Server Command! ?

2005-05-17 Thread Robert Harper
I recommend shooting, hanging, flogging, castrating, and beheading of the list server manager. Some monkey got hold of a keyboard and messed the whole thing up. Robert S. Harper Senior Engineer -Original Message- From: Mandar Vaidya [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 17, 2005

RE: Tomcat problem

2005-05-13 Thread Robert Harper
Is someone inadvertently selecting text in the console? This will cause any process running in the console to become blocked by the OS. When you hit a key, this deselects the text in the console and releases the process to run again. I sometimes use this while debugging something to halt a process

RE: 2 nd Try : help need for hosting the website

2005-04-29 Thread Robert Harper
When you try place www. anishanumandla.com in the navigation bar, your request is translated by the browser to http://www.anishanumandla.com. This will attempt a connection to your server on the default port of 80. Look at the difference. anishanumandla is the name of your servlet in the localhost

RE: FileUpload

2005-04-21 Thread Robert Harper
Check your catalina.policy file or access rights to the user that the Tomcat apps are running under. Robert S. Harper 801.265.8800 ext. 255 [EMAIL PROTECTED] -Original Message- From: Andrew Paliga [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 10:38 AM To:

RE: Can't do logout in basic authentication

2005-04-20 Thread Robert Harper
If you read the docs on BASIC authentication, you will find that the browser caches the login information and will provide it every time you return to that site. The way to log out is to close the browser. Apparently this has been a problem for web developers for some time. Browser developers have

RE: Tomcat Requirements

2005-04-12 Thread Robert Harper
Java will use as much as you let it. The amount of memory is dependent more on your app. than Tomcat. You can write inefficient code that will kill any platform or you can write very efficient code that will hardly tax the system. Tomcat itself does not require that much to run. You should also

OT: special characters in property files

2005-04-07 Thread Robert Harper
I need to retrieve a value from a property file with a ‘$’ as part of the data. How do I decorate this character so that the value will be loaded when I call ResourceBundle.getString() ? I am not having much success googling for it. Thanks in advance. Robert S. Harper Senior Engineer

RE: special characters in property files

2005-04-07 Thread Robert Harper
I ended up finding that \$ would work too. Where to I find a doc that explains all this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Tomcat threads

2004-12-10 Thread Robert Harper
webapps) are not supposed to create [Robert Harper] The extra thread is from the return side of the RMI link to the remote computer. I do not directly spawn a thread. If you know of an event library for this version of the JVM, I would be happy to use that because I think things run more efficient

RE: Tomcat threads

2004-12-10 Thread Robert Harper
, Robert Harper [EMAIL PROTECTED] wrote: Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] I have an app that must wait for a return from another machine that Yikes ;( I hope you realize that fragility of this design

Tomcat threads

2004-12-09 Thread Robert Harper
I have an app that must wait for a return from another machine that will send an asynchronous message. I go into a while loop where I put the current thread to sleep for 1000 mills. several times. The problem is that it also blocking the return thread until the loop is terminated. The servlet

RE: off topic - how do i convert an int to char

2004-12-07 Thread Robert Harper
The offset starts at '0' == 48 ( 0x30 hex ) for ASCII. To get the correct values, you should know what character set you are in. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Brantley Hobbs [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 8:50 AM To: Tomcat

problem with response.encodeURL in jsp

2004-12-06 Thread Robert Harper
I am trying to customize the login.jsp page and when I add more formatting and some graphics the jsp that encodes the URL for the security check does not encode correctly. Instead of %= response.encodeURL(j_security_check) % retruning

RE: comparison of Type 4 JDBC drivers

2004-11-09 Thread Robert Harper
This is the JVM catching an exception/access violation in the native code outside of the JVM. The problem is probably in native code in the driver or any jni code you may be using. If you are not using any jni to wrap native code that is custom to your site, you should look at how you are calling

Exception: current thread not owner

2004-10-18 Thread Robert Harper
I have a spot in my servlet where I would like to wait for another computer to process a request. This request is asynchronous and I have to wait for the output before I can continue. When I try to put a wait( 1000 ) line in my code I get the exception that I am not the owner of the current

RE: Exception: current thread not owner

2004-10-18 Thread Robert Harper
threads, you'd own that thread so you could sleep or wait it as needed. [Robert Harper] I still need to know how I am to wait without burning the CPU while I am waiting for a response. I would rather not have to have the web page have to keep checking back for a response

RE: Exception: current thread not owner

2004-10-18 Thread Robert Harper
It's been a while since I've had to post code on here ;) Here's a generic way to spawn a thread and only check on it every X milliseconds, instead of all the time, so that you don't burn the CPU: [Robert Harper] I know how to create threads. I did not intend for you to treat me like a total

Environment variables and Tomcat 5

2004-10-15 Thread Robert Harper
I have an application that calls some JNI native code that relies on certain environment variables being set. When Tomcat runs as a service it does not seem to get the variables. The The Apache Jakarta Tomcat 5.5 Servlet/JSP Container document states that these variables may be set with the

RE: Blocking access to static content

2004-10-12 Thread Robert Harper
, 2004 at 01:27:14PM -0600, Robert Harper wrote: : I tried filters but my filters were not always called. It may be helpful to get to the root of why the filters weren't called. What happened? What was in web.xml? Better yet, just define security-constraints in web.xml and limit access

Blocking access to static content

2004-10-11 Thread Robert Harper
I have turned the listings off in the default servlet. Now how do I keep users from directly accessing anything outside of the defined servlets and JSP pages even if the user knows the path to the file? Robert S. Harper Senior Engineer 1100 East 6600 South, Suite 300 Salt Lake City, UT

RE: Blocking access to static content

2004-10-11 Thread Robert Harper
at 12:39:13PM -0600, Robert Harper wrote: : I have turned the listings off in the default servlet. Now how do I keep users : from directly accessing anything outside of the defined servlets and JSP pages : even if the user knows the path to the file? Filters, filters, filters. -QM

Tomcat directory browsing

2004-10-08 Thread Robert Harper
I have a problem where Tomcat is allowing a user, once logged in, to browse the directory structure and files on the server. How do I stop this from happening? Process: The user follows the URL https://machine_name:8443/myapp/servlet/MyServlet. Logs in using the user name and password that

RE: Capturing HTML using Tomcat 4

2004-10-06 Thread Robert Harper
One way is to write a servlet that builds the html and before you finish with the response, save the text into a table and then send the response. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 4:10

RE: How to get a handle to tomcat Mbean Server?

2004-09-28 Thread Robert Harper
I don't know if this helps but this is a function I use to load the user database. After that, I use the different methods implemented in the org.apache.catalina.UserDatabase class. I found the functions and the parameters needed by searching the source for the function I wanted. I use this to

bypassing login page

2004-09-23 Thread Robert Harper
I have a servlet that requires an HTTPS connection and normally forces a browser to log in using a jsp page. I would like to use the same servlet to allow a program to submit a request and retrieve the response without having to navigate through the login page. Is there a way to do this? I

RE: getParameter() should be case insensitive?

2004-09-23 Thread Robert Harper
Though it may be true that there are not requirements about case insensitivity in the specification, it would be nice to make the world consistent and all it would take is for the developers to start using String.compareToIngnoreCase() instead of String.compareTo(). I would especially like this in

SSL encryption

2004-09-08 Thread Robert Harper
What is the default encryption level with SSL in Tomcat? I have created a private key with the RSA algorithm an using SSL in the connection descriptor. I need to know what bit encryption is used whit a default setup and if I can change that. Robert S. Harper Senior Engineer 1100 East 6600

RE: JDBC connections

2004-08-27 Thread Robert Harper
You should be able to use the standard sun.jdbc.odbc.JdbcOdbcDriver class to connect to those DMBS's. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Nelson, Jerry W, Contractor 146CF, SCB [mailto:[EMAIL PROTECTED] Sent: Friday, August 27, 2004 2:39 PM To: 'Tomcat

RE: How to get the context path for a web application?

2004-08-10 Thread Robert Harper
A ServletConfig reference is passed in the call to the init() method of your servlet. From this you may use the getServletContext() method to get the context. One thing to remember is that this does not get called until the servlet is initialized and would be invalidated when it is destroyed. I

RE: Trouble running Tomcat 5.0.29

2004-08-10 Thread Robert Harper
Check the suggested JDK version and the version you have. You may have an older 1.2 version of the JDK. There were a lot of changes in jni from 1.2 to 1.3 1.4. The initialization process is much different. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: David Short

RE: SOLVED: How to get the context path for a web application?

2004-08-10 Thread Robert Harper
If you set your container to start a pool of servlets when it starts, the init should be called then. I'm not sure how to set Tomcat to start up a pool of Keep alive servlets. You'll have to consult the docs for that. The init is called when the servlet is instantiated and should be called before

RE: Bizzare bug with my class and sharing values between different instances

2004-08-06 Thread Robert Harper
The problem is that your data members are static. That means that for each instance of the class, they all point to the same data member. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Thomas Joseph Olaes [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 3:05 PM

RE: Rewriting URLs in Tomcat

2004-07-28 Thread Robert Harper
Have you tried the HttpServletResponse .sendRedirect( String url ) method? Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jacob Weber Sent: Wednesday, July 28, 2004 3:07 PM To: [EMAIL PROTECTED] Subject: Rewriting URLs in

RE: Beyond bassic form authentication?

2004-07-23 Thread Robert Harper
Did you try scabbing code from the login.jsp? You may want to use that and the user will gain access to the areas allowed with their group or role. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004

RE: relogin question

2004-07-16 Thread Robert Harper
The problem is that Tomcat does not know that the user has hit the back button. You may want to add some script to the page to invalidate the context at the user site or send a message to your servlet to invalidate the context when the user goes back a page. Robert S. Harper 801.265.8800 ex. 255

RE: Tomcat - MySQL = No suitable driver ERROR

2004-07-01 Thread Robert Harper
I have seen this one too many times. It usually has to do with the naming lookup. I have had to keep playing with the form of the name until it worked. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01,

RE: How to get Roles in a Principal with JNDIRealm

2004-06-30 Thread Robert Harper
It may be easier to use JMX and retrieve the role out of the user information from the user bean. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Renato Primavera [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 7:47 AM To: [EMAIL PROTECTED] Subject: How to

RE: Please Help! Tomcat 5.0.25

2004-06-30 Thread Robert Harper
When you run a service in WinXX, it does not run with the same rights and settings as the logged in user. If your app needs a mapped drive, then you will have to find a way for your app to map the drive for it's self. This may also be a user rights issue as the service runs without the same

RE: re: Tomcat unexpectedly shuts down

2004-06-30 Thread Robert Harper
What does your code do at line 33 in VqaNcDB.searchVqaNc()? I would try to correct that problem first. Robert S. Harper -Original Message- From: Bliesner, Christopher P [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 11:57 AM To: Tomcat Users List Subject: RE: re: Tomcat

RE: Determination if a client has sessions enabled or not.

2004-06-25 Thread Robert Harper
It may also be asked if it is bad practice to require the user to enable pop-ups. I would think not as many businesses force internal users to disable cookies and pop-ups. If your application requires either then it is not always useable. Food for thought. Robert S. Harper 801.265.8800 ex. 255

RE: Determination if a client has sessions enabled or not.

2004-06-25 Thread Robert Harper
I agree that cookies are a very useful tool. My point is that we have two conflicting interests, the user's desire to protect themselves from malicious attacks and loss of privacy and the developer's need to keep information about the current session. If you want to work in all cases, then some

RE: Tomcat 5.0 under Windows ME

2004-06-23 Thread Robert Harper
It looks like Tomcat was build to run on a Win32 system that was built more on NT technology. ME was the next version of 95 and 98 and is a dead-end. You might try to find out if there is an update for ME that will include a version of NETAPI32.DLL that contains the needed function or upgrade.

RE: Managing Tomcat logs

2004-06-22 Thread Robert Harper
Instead of using System.out.println() to log your messages, use the HttpServlet's log() method. You can specify the logging class you want to use, the path it writes to, the base name, and extension. Each day a new file is created and you can simply delete the old ones as they are closed when a

RE: Allow user to change password in JDBCRealm

2004-06-18 Thread Robert Harper
I think this is all kept in the server's beans. To access this you need to us the JMX mess. I have finally figured out how to do it using the normal tomcat-users.xml database. To load the bean server try this: MBeanServer m_BeanServer; if(MBeanServerFactory.findMBeanServer(null).size() 0) {

Adding roles to users

2004-06-17 Thread Robert Harper
I have been able to create a user by calling the createUser method on the Users:type=UserDatabase,database=UserDatabase object. Now I need to add a role to that user. In the mbeans-descriptors.xml file it describes the return value as being the name of the user bean. The source for

RE: question

2004-06-17 Thread Robert Harper
Did you set up the web.xml file in your application area to direct the browser to your application? If you are using a servlet, then you should have something like the following in the web.xml file in your application's WEB-INF directory. ?xml version=1.0 encoding=ISO-8859-1? !-- This xml doc is

Tomcat UserDatabase

2004-06-16 Thread Robert Harper
Is there an accepted way for an application to directly access/manipulate the tomcat-users.xml database? I would like to automate the process of adding users from my servlet but I am having a hard time finding documentation/samples of how to do this. It may just be that I don't know how to grant

setting user role

2004-06-16 Thread Robert Harper
OK I've tried all I can figure out and I have gotten so that I can add a user to the tomcat-users.xml using the MBeanServer interface but now how do I add roles to the user? Using the ObjectName with the value set to Users:type=UserDatabase,database=UserDatabase and the action set to addRole

Connecting and updating the tomcat-users.xml database

2004-06-15 Thread Robert Harper
Is there a way, other than the administration page, to update and read the tomcat-users.xml database? I tried to use MemoryUsersDatabase but when the code runs, the JVM cannot load the class. Is there some other mechanism or an accepted way for a servlet to update the database without having to