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
parameters, etc. Another reason not to count on this is that it is not part
of the specification and one implementation or version of a container may
choose to provide order or not and this might change. There have been many
recommendations on how to do this and I would suggest you try them. Your
apps will probably end up being more scaleable as well.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Jilles van Gurp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 11:52 AM
To: Tomcat Users List
Subject: Re: Order of WebApp Loading

If you define the contexts in the server.xml, they are started in the 
order that you define them, I think.

Regards,

Jilles

Peter Menzel wrote:
 Hi there,

 I have a question concerning Tomcats webapp loading:
 What is the order in which tomcats loads its webapps ?
 I have two webapps configured by /conf/Catalina/localhost/XXX.xml and 
 I need one webapp to be loaded before the other, because it starts the 
 database.
 How does Tomcat choose the first, second, ...
 And what is the loading sequence, if both are deployed as a .war ?

 Kind regards, Peter Menzel


 -
 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]





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



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 with the rights you want and set the service to start with that
account and the password to use. You can also set how Tomcat is to start as
well.

Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: Lalit Batra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 08, 2005 10:32 AM
To: tomcat-user@jakarta.apache.org
Subject: Windows and Tomcat

Hi! 
I am new to the world of Tomcat and have recently installed 5.5.9 on a 
Windows (2003 and XP) Box. It works fine but only with Users having 
Administrative/power user privileges. 
1) When the service for tomcat is started with USER option, it does not go 
and read the Webapps. The folder has read+execute, read options set for the 
normal USER. 
2) I have tried the same scenarios on both XP and Server 2003, the result is

same. 

Do we have to configure the tomcat-users.xml and if so then how do we add 
the access for a normal user on Windows Box. 

Please help!

Thanks, 
 Lalit


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



RE: Windows and Tomcat

2005-09-08 Thread Robert Harper
Tomcat will also need write access rights. When it starts, it changes some
of the XML configuration files and tries to create logs as well. You could
give your user full control to the tree under your CATALINA_HOME. Since you
say that when you set the User to have power user rights it Tomcat seems to
run, I would guess that this would fix your problem. Logs of the error might
help more but if Tomcat cannot write to the directories, logs will not be
able to be created.

Not knowing more detail, this would be my guess.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Lalit Batra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 08, 2005 10:56 AM
To: Tomcat Users List
Subject: Re: Windows and Tomcat

Robert, 
Thanks for replying! 
1) When I installed it I was in Admin user, and installed it with Service 
option. In windows services, Apache Tomcat we have an option of starting 
with USER. The service starts and shows me the owner as the User and even 
in the Process information from (task Managger) I see User as the process 
(tomcat) owner. So yes it starts with the USER I started the service with. 

2) User priveledges: The user has read+Execute permissions for the webapps

folder (changed it also for Aplication folder Tomcat under programs) and 
restarted many times.Still http://localhost does not come up. (I am using 
80, modified server to run on port 80).

3) If I put the USER to Power User Group of XP everything works.


please 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
 the use and password that Tomcat starts with. If you need to, create an
 account with the rights you want and set the service to start with that
 account and the password to use. You can also set how Tomcat is to start 
 as
 well.
 
 Robert S. Harper
 Information Access Technology, Inc.
 -Original Message-
 From: Lalit Batra [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 08, 2005 10:32 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Windows and Tomcat
 
 Hi!
 I am new to the world of Tomcat and have recently installed 5.5.9 on a
 Windows (2003 and XP) Box. It works fine but only with Users having
 Administrative/power user privileges.
 1) When the service for tomcat is started with USER option, it does not go
 and read the Webapps. The folder has read+execute, read options set for 
 the
 normal USER.
 2) I have tried the same scenarios on both XP and Server 2003, the result 
 is
 
 same.
 
 Do we have to configure the tomcat-users.xml and if so then how do we add
 the access for a normal user on Windows Box.
 
 Please help!
 
 Thanks,
 Lalit
 
 
 -
 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: 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 able to
navigate. 

Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 31, 2005 9:24 AM
To: tomcat-user@jakarta.apache.org
Subject: Users Can See root files

Hello,

I was showing someone my website the other day, and when they started
playing with the URL, they could see the jsp files, html files, and files
under the WEB-INF directory.

Is created a welcome-file-list in the web.xml, but I guess if someone
plays with the url and tries to get a look at the files that does not help.

How does one shut down all access to anything from a url 

Thanks
Scott

-
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: 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 anything the logged in user can do. This
is one of the reasons that VBScript is used for installing a lot if the
viruses and worms.

What is it that you need to do from the servlet? It looks like what you want
to do is something that could be dangerous if allowed by the user. Most
network administrators would go nuts with this. You may want to find some
other way to accomplish what you are trying to do.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Brian Cook [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 26, 2005 10:28 AM
To: Tomcat Users List
Subject: Re: newbie with a short question


Couple of things

1.  You will get better responses on this list if you review the posting 
  guide at.  This post is way to vague to get specific answers.  So most 
people are not going to respond to it.

http://jakarta.apache.org/site/mail.html


2.  If I follow the description correctly you are uploading a batch file 
to tomcat.  Then loading a page with a link to that batch file.  Then 
you are clicking on the link and it is displaying contents of the batch 
file.

If I followed all of the correctly that is exactly what should happen. 
If you are clicking on an Http link that posts to a web server that 
server is going to try to return the requested resource.

If you need to execute a file locally from Tomcat then you need to use 
one of the Java method calls to execute native files.  This by the way 
is usually a bad idea.  Is what ever your batch file is doing really a 
process that you can not recreate in java?

If I have misunderstood entirely which seems likely then you may want to 
repost the question formated in accordance with the posting guilds lines 
listed above. Posts to support forums should always include a detailed 
step by step lise of the process that creates the failing, copies of 
relevant configuration files(Saying you deleted some comments in a 
config file does not really help.  We need to see it.), and the lines of 
code that are believed to be failing.



nick sturm wrote:
 ok, I have done the two things on that page:
 renamed the serverlet and deleted the comments around the cgi section
 of the web.xml config file.
 
 I created a directory (cgi-bin) under root and under WEB-INF neither
 of which would execute the batch file when I link to them.  it would
 just open the batch file.
 
 thanks, sorry I'm very new to this.
 -n
 
 On 8/24/05, Caldarale, Charles R [EMAIL PROTECTED] wrote:
 
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Subject: RE: newbie with a short question

First I cause an open/save prompt with

response.addHeader(Content-Disposition, attachment;
filename=somebat.bat);

Then I use the response.getOutputStream() and stream the bat
file down it. This requires of course that you get an
inputstream to your bat file first. Copy it into your webapp
somewhere and use the servlet context
getRealPath(/bat/mybat.bat) and then i/o API to read it
into an input stream before sending outbound again.

I found that setting content type of
application/msdos-x-batch failed, as did others, just send it
without a content type as a open/save.

I must be missing something; how does the above cause an existing .bat
file on the server to be executed on the server?  (That was the original
question.)

For the OP: the CGI doc for Tomcat can be found at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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]
 
 





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



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
the problem will resurface and you will have to start the discovery process
all over again.

Robert S. Harper
Information Access Technology, Inc.
-Original Message-
From: Ron Heeb [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 2:16 PM
To: tomcat-user@jakarta.apache.org
Subject: restarting tomcat in production

hi,

i'm looking for some feedback on whether or not it's a normal procedure 
to regularly restart tomcat.  we have some memory leak somewhere that 
forces us to restart the process every 6-8 days but we're thinking that 
just putting in a script to restart daily would prevent this and may not 
be a bad idea to do even if there wasn't any leak.

any response appreciated.  thanks in advance...ron

-- 

Ron Heeb, Project Leader
Applications Development - Information Technology Resources
California State University, Northridge
18111 Nordhoff St.,  Northridge, CA 91330-8280
[EMAIL PROTECTED]




-
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: 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 browser window. The user may then
save the file from the browser. 

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 28, 2005 7:49 AM
To: 'Tomcat Users List'
Subject: Problems serving files to download

Hi,
 
I have a tomcat 4.1.31 (j2sdk1.4.2_08) running in a linux rh9 box. It's
a fresh install.
 
I'm from Brazil, so I've configured my linux to use pt_BR.ISO-8859-1. If
I type locale, everything is ok.
 
My CATALINA_OPTS has the -Dfile.encoding=ISO-8859-1
 
I have no problems with my applications. Everithing works fine. All my
pages are compiled fine, my servlets work fine, etc...
 
But, if I try to serve files to download, and this files had special
characters like çãíetc, when I click the file name (that is
displayed right), I receive the 404 HTTP error.
 
For instance: using vi, I created a file named acentuação.txt inside
the tomcat-docs directory. When I try to access this file, it's name is
encoded to acentua%C3%A7%C3%A3o.txt (the address shows
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt
http://localhost/tomcat-docs/acentua%C3%A7%C3%A3o.txt), and after that I
can't access it. I tryed to use Firefox (1.0.4) and IE 6, but I got the
same problem
 
How do I manage this? Who encoded the name?
 
TIA,
 
Bob



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



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: tomcat-user@jakarta.apache.org
Subject: Stored Procedures problem

I got this exception: java.sql.SQLException: [Microsoft][SQLServer 2000 
Driver for JDBC]No ResultSet set was produced at line # 2 in this code:


conn = this.dataSource.getConnection();
ResourceBundle resourceBundle = ResourceBundle.getBundle(ladw/resources);
statement = conn.prepareCall(resourceBundle.getString(sp.getPassword));
statement.registerOutParameter(1,Types.VARCHAR); 
statement.setString(2, userName);
statement.registerOutParameter(3,Types.VARCHAR); 
statement.execute();
String result = rs.getString(1);

can somebody help me?

-- 

--
Carlos J, Bracho M. 
--
e-mail: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
+58 416 409 21 75 
--



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



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
cleanup methods. Thread.stop() is deprecated because it does not clean up
well either.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Daniel Molina (Inter-Media) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 16, 2005 10:29 AM
To: Tomcat Users
Subject: threads in tomcat

Hello,

   If I use threads, through the Thread class, how can I can finish them
whenever Tomcat reloads the application that created them.

   Thanks.

Regards.
Daniel Molina Wegener

-
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: Problem with security?

2005-06-10 Thread Robert Harper
I think you have missed the point that you cannot get user information
unless the user authenticates. You don't want to have a user authenticate
but you want to get user information. These are mutually exclusive tasks.

If the user does not authenticate, you can only get the external IP address
of the requestor. In order to get user information, you must have the user
authenticate. You might have your users sent to a page that gathers the user
ID and then store it in a cookie. You cannot count on the browser sending
user information because the logged in user may and often is not the actual
user.

I don't know how you can call it secure if you don't require a key to open
the door. You may be encrypted in your transfer over SSL but if you don't
have the user log in, you are not secure.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Gagnon, Joseph M (US SSA) [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 8:43 AM
To: Tomcat Users List
Subject: RE: Problem with security?

I believe I've covered that all in my original message.  Read further.

-Original Message-
From: egan0019 [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 10:10 AM
To: Tomcat Users List
Subject: Re: Problem with security?

Look into the ServletRequest interface.  That interface, which is
extended
in HttpServletRequest.  You can call the getRemoteAddr(),
getRemoteHost(),
etc. methods.  You receive null in your getRemoteUser because the user
hasn't been 'authenticated' yet.


On 10 Jun 2005, Gagnon, Joseph M  (US SSA) wrote:
 Hello,
 
 I'm new to JSP development (and to dynamic web development as a whole)
 so please bear with me.  I'm investigating using JSP/Java for a
project
 at my workplace.  My system (test server, if you will) is a PC running
 Windows XP Pro and I am using Tomcat 5.5.9.
 
 I have a situation where I want to be able to provide user access to
an
 application by determining the identity of the requesting user,
without
 them having to go through a login procedure.  Specifically, what I've
 been trying to do is call the request.getRemoteUser() method to ID the
 requesting user.  When I do so, I keep getting null.  After reading in
 the JSP and Java servlet specifications, I see that this call would
 return null if the user is not authenticated.  Reading further, I get
 the impression that by default, 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
Try basic authentication. The browser will cache the user name and password
and it will only expire when the browse closes.

Read in the documents on how to configure the authentication. You might
require authentication for all protocols and use BASIC authentication. This
will make it easier for the user with a single login and then they can go
wherever you allow them and not have to login again until they close the
browser.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Gagnon, Joseph M (US SSA) [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 9:19 AM
To: Tomcat Users List
Subject: RE: Problem with security?

Did I not say that I'm new to this?

I made no mention to whether or not I was trying to make it secure.
This is only meant to be used within my company's intranet and my
intention was to take the user account and then compare it with a set of
registered users in the application's DB.

I am beginning to see that at the very least I need to create some kind
of mechanism (although I don't understand yet how to go about that, or
how many different ways it can be done) to perform user authentication.

If anyone can provide 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 user information
unless the user authenticates. You don't want to have a user
authenticate
but you want to get user information. These are mutually exclusive
tasks.

If the user does not authenticate, you can only get the external IP
address
of the requestor. In order to get user information, you must have the
user
authenticate. You might have your users sent to a page that gathers the
user
ID and then store it in a cookie. You cannot count on the browser
sending
user information because the logged in user may and often is not the
actual
user.

I don't know how you can call it secure if you don't require a key to
open
the door. You may be encrypted in your transfer over SSL but if you
don't
have the user log in, you are not secure.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Gagnon, Joseph M (US SSA) [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 8:43 AM
To: Tomcat Users List
Subject: RE: Problem with security?

I believe I've covered that all in my original message.  Read further.

-Original Message-
From: egan0019 [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 10:10 AM
To: Tomcat Users List
Subject: Re: Problem with security?

Look into the ServletRequest interface.  That interface, which is
extended
in HttpServletRequest.  You can call the getRemoteAddr(),
getRemoteHost(),
etc. methods.  You receive null in your getRemoteUser because the user
hasn't been 'authenticated' yet.


On 10 Jun 2005, Gagnon, Joseph M  (US SSA) wrote:
 Hello,
 
 I'm new to JSP development (and to dynamic web development as a whole)
 so please bear with me.  I'm investigating using JSP/Java for a
project
 at my workplace.  My system (test server, if you will) is a PC running
 Windows XP Pro and I am using Tomcat 5.5.9.
 
 I have a situation where I want to be able to provide user access to
an
 application by determining the identity of the requesting user,
without
 them having to go through a login procedure.  Specifically, what I've
 been trying to do is call the request.getRemoteUser() method to ID the
 requesting user.  When I do so, I keep getting null.  After reading in
 the JSP and Java servlet specifications, I see that this call would
 return null if the user is not authenticated.  Reading further, I get
 the impression that by default, no authentication is needed to access
[Robert Harper] [snip]




-
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]





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



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
setup. If you have daisy chained hubs instead of smart switches this could
further degrade the performance due to the number of hops you request might
take. You could expect a few second delay for network layer depending on the
speed and topography of the network. This is one of the reason good network
engineers get paid so well.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: daniel steel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 08, 2005 10:36 AM
To: tomcat-user@jakarta.apache.org
Subject: tomcat windows / mysql linux

hi all,
  i have an interesting problem. our app server(tomcat
5.5) on windows 2003 communicates with mySQl database
on linux box.

our client application is very slow each time we log
in. when we moved the database to windows box, the
application is super fast.

does anybody have thoughts on this?

thank you
secc



__ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html

-
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: 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 S. Harper
Senior Engineer
 
Information Access Technology, Inc.
1100 East 6600 South
Suite 300
Salt Lake City, Utah USA 84121-7411
(801)265-8800 Ext. 255
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.
 


-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 18, 2005 9:59 AM
To: Tomcat Users List
Subject: Can a servlet receive its own request?

Simple question, but it's driving me nuts. I really don't want to get into 
the whole web service business - all I need is for a servlet to be the 
recipient of its own request. Or - in other words - can a servlet act like a

web browser - just without the GUI?

Use case:

- Servlet issues https request to an outside server (via 
getServletContext().getRequestDispatcher(https://www.someoutsideserver/) )
- Outside server processes request and responds with POST response (also via

https).
- Servlet [somehow] is able to be the recipient of the response.
- Servlet parses the response and stores data to the database.

Notes:

- The servlet is not the default servlet on that tomcat instance.
- Everything happens via https and I expect the outside server will listen 
on 443 and tomcat on 8443

ANY suggestions would be very helpful - this seems to be a tricky one.

TIA,

Michael



-
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: 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 84121-7411
(801)265-8800 Ext. 255
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.
 


-Original Message-
From: Gabriel Belingueres [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 17, 2005 12:29 PM
To: tomcat-user@jakarta.apache.org
Subject: Deny directory listing in Tomcat 4.1.x

Hi,
 I need to deny the access to my web app's directory listing in Tomcat
4.1.x. 

How do I do that?
 TIA,
Gabriel



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



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 12:07 PM
To: 'Tomcat Users List'
Subject: RE: What are those No such list! s and Illegal IMail List Server
Command! ?

Same problem here.

Mandar
 

-Original Message-
From: Maxime [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 17, 2005 2:14 AM
To: tomcat-user@jakarta.apache.org
Subject: What are those No such list! s and Illegal IMail List Server
Command! ?

Hello everybody,
Since yesterday I am receiving a thousand of the same emails.
What can I (or we) do to avoid these ???
Thank you !
++
Max





---
Here the spam mail that I've received a lot of time !

New Atlanta List Server General Help File
-

Lists hosted by this server are:

   bluedragon-interest
   servletexec-interest
   jturbo-interest

Use one of these list names where you see list name in the command syntax
below.

All list server commands must be addressed to:

   [EMAIL PROTECTED]

Commands must be placed on the first line of the message body and may not be
preceded by blanks, whitespace, or other characters.

Valid Commands are:

   To subscribe to a list:

   subscribe list name your full name

   For example:

   subscribe servletexec-interest John Smith

   If you don't include your name in the subscribe command you'll receive an
Invalid Syntax error message from the list server.

   To unsubscribe from a list:

   unsubscribe list name

   To receive help send after subscribing to a list:

   help list name

If you have any questions or need additional help, send email to:

   [EMAIL PROTECTED]

-
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: 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
instead of using breakpoints.

Robert S. Harper
Senior Engineer
 
Information Access Technology, Inc.
1100 East 6600 South
Suite 300
Salt Lake City, Utah USA 84121-7411
(801)265-8800 Ext. 255
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.
 


-Original Message-
From: Santiago Iacobelli [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 13, 2005 1:10 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat problem

I'm running Tomcat 5.5.9 on Pentium 4, 512mb ram, ram with Windows 2000
server sp4.
Sometimes (two or four times a day) Tomcat doesn't send responses but when i
press any key in the console window, all the requests are processed and
Tomcat sends the responses to the clients.
This error happend with tomcat 5.0.x too.

Regards,





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



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 sample. What is the external name of your machine? If it is
anishanumandla then try http://www.anishanumandla.com:8080/anishanumandla.

For www.anishanumandla.com to be recognized to the outside world, you must
register the name with the WC3 group. Try using your external IP address
instead of the name like:

http://216.109.112.135:8080/anishanumandla

Tomcat does not broadcast your name to the whole world.

Robert S. Harper
Senior Engineer
 
Information Access Technology, Inc.
1100 East 6600 South
Suite 300
Salt Lake City, Utah USA 84121-7411
(801)265-8800 Ext. 255
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.
 


-Original Message-
From: Ashok Anumandla [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 29, 2005 3:28 PM
To: tomcat-user@jakarta.apache.org
Subject: 2 nd Try : help need for hosting the website

Hi All,

I am trying to host my website on Tomcat 5.5.9 in my home machine, i did 
following steps ..

- installed the JRE,JAVA, and Tomcat 5.5.9
- installed ant
- when i run ant, it created anishanumandla under tomcat webapps.
- configured following in server.xml
Host name=www.anishanumandla.com appBase=/Program Files/Apache 
Software Foundation/Tomcat 5.5/webapps/anishanumandla
Context path= docBase=/Program Files/Apache Software 
Foundation/Tomcat 5.5/webapps/anishanumandla  /
  /Host
- Configured web.xml for welcome file.
- Configured my linksys to fwd the any request from 
www.anishanumandla.com to port number and 8080 port.

- Restarted the tomcat,

But unfortunately i am not able to make it working , when i try 
http://localhost:8080/anishanumandla, it is working fine, but when i try 
accessing www.anishanumandla.com it is not working, i am getting page 
not found error, can somebody please tell me what i am doing wrong 
here?? or if there is step by step document, can u please send me the 
url,,,

the environmentment is Windows 2000...

Thanks in advance

Regards
Ashok

-
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: 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: tomcat-user@jakarta.apache.org
Subject: FileUpload

Hi,

I am trying to use FileUpload but i keep getting an Access denided error 
when i try to write things and i was wondering is there anyway around 
it...here is the error

Http Satus 404 - 
C:\AtrowkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemans (Access is 
denied)
type Status report
message C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand 
(Access is denied)
description The requested resource 
(C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand (Access 
is denied)) is not available.

Any suggestions woudl be greatly appreciated



Andrew Paliga
Junior Project Manager
IBM Toronto Media Design Studio
Phone: (905) 413-2024



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



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 not
seen this as a problem. Instead they seem to feel that the caching is a
benefit to the user by not requiring them to renter the same information.

Robert S. Harper
801.265.8800 ext. 255
[EMAIL PROTECTED]
-Original Message-
From: Robert r. Sanders [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 20, 2005 10:07 AM
To: Tomcat Users List
Subject: Re: Can't do logout in basic authentication

You can try google:  
http://www.modpython.org/pipermail/mod_python/2001-August/012120.html

Otgonbayar wrote:

I am using basic authentication in my application and I need to create
logout link in my JSP that does LOGOUT. 
It seems session.invalidate() doesn't work.
How can I do this? Please help me!
Thanks
Otgo



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

  


-- 
Robert r. Sanders
Chief Technologist
iPOV
(334) 821-5412
www.ipov.net


-
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: 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
consult the documentation for the garbage collector in the version of the
JVM you are using for settings to control how much memory to allocate, grow
by, and parameters for when to garbage collect.

Robert S. Harper
801.265.8800 ext. 255
[EMAIL PROTECTED]

-Original Message-
From: Bob [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 12, 2005 11:31 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat Requirements

I read much about memory usage and processes
but nobody can say how much memory I need!
 
I have to define the budget for the environment
for a solution to serve 1000-3000 concurrent users.
 
Which hardware should I buy, 
XEON Server Processor(s)?
Ram?
I want to use Linux.
 
Please give me an hint.
 
Thanks
Bob



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



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


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, given that
 J2EE apps (which includes Servlet 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 and the code looks cleaner.

 
 The problem is that it also blocking
 the
 return thread until the loop is terminated.
 
 So Thread.currentThread().sleep(1000) blocks a thread other than the
 current thread?  Is the return thread a child of the request
 processing thread?  If so, you should make it NOT a child by
 pre-creating it (or possibly a pool of these return threads) at app
 startup.
 
 But really, you should consider an alternative design.  Blocking
 container threads is never good.
 

[Robert Harper] It looks like the blocking was due to my lack of understanding
of how synchronized works. I thought, wrongly, that if I added the synchronized
modifier to a method definition, that the method would be synchronized. It also
made the member data field blocking. I am used to writing Win32 multithreaded
apps. and I am having a hard time making the switch to the Java way of doing
things.
 




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



RE: Tomcat threads

2004-12-10 Thread Robert Harper
I am not familiar with Doug Lea or any of his opinions. I do not have direct
control of the threading of the RMI communication. The RMI method calls are
asynchronous and I have to wait for the return message before I can produce the
display content. I have not gone too deep into JMS to make it event driven yet.
This would be my next change after I get basic functionality.

I do not directly spawn the new thread. The new thread is the RMI return message
coming from a remote host. Now that I do not synchronize a method, I no longer
have blocking problems and I get out of my loop as soon as the RMI thread sets a
flag that the data is ready.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: Dakota Jack [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 10, 2004 9:21 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: Tomcat  threads
 
 Have you looked at Doug Lea's stuff?  I personally would never have a
 server thread wait on anything from another thread.  The idea of two
 threads running together makes little sense where one is just waiting.
  This may seem too strict, but I follow it to the letter.
 
 Jack
 
 
 On Fri, 10 Dec 2004 08:04:12 -0700, 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, given that
   J2EE apps (which includes Servlet 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 and the code looks cleaner.
 
 
 
  
   The problem is that it also blocking
   the
   return thread until the loop is terminated.
  
   So Thread.currentThread().sleep(1000) blocks a thread other than the
   current thread?  Is the return thread a child of the request
   processing thread?  If so, you should make it NOT a child by
   pre-creating it (or possibly a pool of these return threads) at app
   startup.
  
   But really, you should consider an alternative design.  Blocking
   container threads is never good.
  
 
  [Robert Harper] It looks like the blocking was due to my lack of
 understanding
  of how synchronized works. I thought, wrongly, that if I added the
 synchronized
  modifier to a method definition, that the method would be synchronized. It
 also
  made the member data field blocking. I am used to writing Win32
 multithreaded
  apps. and I am having a hard time making the switch to the Java way of doing
  things.
 
 
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 
 
 You can't wake a person who is pretending to be asleep.
 
 ~Native Proverb~
 
 Each man is good in His sight. It is not necessary for eagles to be crows.
 
 ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
 
 -
 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]



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 thread is named
http-8443-Processor3 and the thread handling the return is named Thread-83.
I thought that the whole idea of multithreading is that while one thread is
sleeping, another thread can run. How do I get around this blocking? 

 

I am running Apache Tomcat/5.0.24 with the 1.4.1_03-b02 JVM from Sun on a Win2K
box.

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



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 Users List; Yang Xiao
 Subject: RE: off topic - how do i convert an int to char
 
 Alternatively, you can add the ASCII offset to the integer, then get the
 char that evaluates to that ASCII code.  I think its 32, but you'll need
 to check for sure.
 
 B.
 
 
 
  -Original Message-
  From: Yang Xiao [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 07, 2004 10:42 AM
  To: Tomcat Users List
  Subject: Re: off topic - how do i convert an int to char
 
  make a hash or array?
 
 
  On Tue, 7 Dec 2004 10:34:15 -0500, Nilesh Bhattad
 [EMAIL PROTECTED]
  wrote:
   folks,
   sorry for posting this offtopic qns here.. but would someone plz
 help me
  out in converting an int value to char? my requirement is very simple.
 i'm
  looping thro a list and for each counter i need to get 'a', 'b' and so
  forth.
  
   basically i need some conversion routine which will convert 0 to
 'a', 1
  to 'b', 2 to 'c' and so on.
  
   again, i apologize for posting such a dumb qns.
  
   - nilesh
  
 
  -
  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]




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



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

j_security_check;j_sessionid=A94B886CDA164C04611E9DF6E121DC5B

it simply returns

j_security_check

 

Any ideas why adding tables and graphics would change the return value?

 

Robert S. Harper

Senior Engineer

 



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 the JDBC. You may
be sending NULL values or incorrect format for what the ODBC driver is expecting
and causing the access violation.

I had something similar and it was stack corruption in my native code.

Robert S. Harper
801.265.8800 ex. 255
 -Original Message-
 From: Craig Collings [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 09, 2004 4:18 PM
 To: tomcat-user ([EMAIL PROTECTED])
 Subject: RE: comparison of Type 4 JDBC drivers
 
 Interesting.
 
 I'm using com.microsoft.jdbc.sqlserver.SQLServerDriver which is a type 4
 driver and I am also getting ex VM errors:
 
 any ideas?
 
 
 An unexpected exception has been detected in native code outside the VM.
 Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at
 PC=0x77F46A07 Function=RtlFreeHeap+0x322
 Library=C:\WINDOWS\system32\ntdll.dll
 
 Current Java thread:
   at java.util.zip.ZipFile.getEntry(Native Method)
   at java.util.zip.ZipFile.getEntry(ZipFile.java:146)
   - locked 0x10b26c90 (a java.util.jar.JarFile)
   at java.util.jar.JarFile.getEntry(JarFile.java:194)
   at java.util.jar.JarFile.getJarEntry(JarFile.java:181)
   at
 sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:668)
   at sun.misc.URLClassPath.getResource(URLClassPath.java:157)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:191)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
   - locked 0x10b322d8 (a sun.misc.Launcher$ExtClassLoader)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   - locked 0x10b322d8 (a sun.misc.Launcher$ExtClassLoader)
   at
 com.abnamrocraigs.listings.IressNewListingsListener.addListings(IressNewList
 ingsListener.java:147)
   at
 com.abnamrocraigs.listings.IressNewListingsListener.notify(IressNewListingsL
 istener.java:66)
   at
 com.abnamrocraigs.tasks.TaskScheduler.propagate(TaskScheduler.java:68)
   - locked 0x110be650 (a com.abnamrocraigs.tasks.TaskScheduler)
   at com.abnamrocraigs.tasks.ScheduledTask.run(ScheduledTask.java:21)
   at java.util.TimerThread.mainLoop(Timer.java:432)
   at java.util.TimerThread.run(Timer.java:382)
 
 Dynamic libraries:
 0x0040 - 0x00406000   C:\WINDOWS\system32\java.exe
 0x77F4 - 0x77FFA000   C:\WINDOWS\system32\ntdll.dll
 0x77E4 - 0x77F34000   C:\WINDOWS\system32\kernel32.dll
 0x77DA - 0x77E3   C:\WINDOWS\system32\ADVAPI32.dll
 0x77C5 - 0x77CF5000   C:\WINDOWS\system32\RPCRT4.dll
 0x77BA - 0x77BF4000   C:\WINDOWS\system32\MSVCRT.dll
 0x0800 - 0x082A7000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\server\jvm.dll
 0x77D0 - 0x77D8F000   C:\WINDOWS\system32\USER32.dll
 0x77C0 - 0x77C44000   C:\WINDOWS\system32\GDI32.dll
 0x76AA - 0x76ACC000   C:\WINDOWS\system32\WINMM.dll
 0x1000 - 0x10007000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\hpi.dll
 0x0038 - 0x0038E000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\verify.dll
 0x003B - 0x003C8000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\java.dll
 0x0039 - 0x0039D000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\zip.dll
 0x008D - 0x008DF000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\net.dll
 0x71C0 - 0x71C18000   C:\WINDOWS\system32\WS2_32.dll
 0x71BF - 0x71BF8000   C:\WINDOWS\system32\WS2HELP.dll
 0x008E - 0x008E8000   C:\Program
 Files\Java\j2sdk1.4.2\jre\bin\nio.dll
 0x71B2 - 0x71B63000   C:\WINDOWS\System32\mswsock.dll
 0x76ED - 0x76EF7000   C:\WINDOWS\system32\DNSAPI.dll
 0x76F7 - 0x76F77000   C:\WINDOWS\System32\winrnr.dll
 0x76F1 - 0x76F3F000   C:\WINDOWS\system32\WLDAP32.dll
 0x76F8 - 0x76F85000   C:\WINDOWS\system32\rasadhlp.dll
 0x71AE - 0x71AE8000   C:\WINDOWS\System32\wshtcpip.dll
 0x0340 - 0x03406000   C:\jintegra\bin\ntvauth.dll
 0x73D2 - 0x73E13000   C:\WINDOWS\system32\MFC42.DLL
 0x0341 - 0x03417000
 C:\jintegra\bin\International\ntvauthEnglishResourceDll.dll
 0x71F6 - 0x71F64000   C:\WINDOWS\system32\SECURITY.dll
 0x76F5 - 0x76F63000   C:\WINDOWS\system32\SECUR32.dll
 0x76C9 - 0x76CB4000   C:\WINDOWS\system32\msv1_0.dll
 0x76C1 - 0x76C38000   C:\WINDOWS\system32\imagehlp.dll
 0x6D58 - 0x6D621000   C:\WINDOWS\system32\dbghelp.dll
 0x77B9 - 0x77B98000   C:\WINDOWS\system32\VERSION.dll
 0x76B7 - 0x76B7B000   C:\WINDOWS\system32\PSAPI.DLL
 
 Heap at VM Abort:
 

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 thread. How can I set
up a wait so I don't burn CPU in a tight loop?

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



RE: Exception: current thread not owner

2004-10-18 Thread Robert Harper


 You'd still have to use a loop (assuming you're not interested in a
 design-driven solution like JMS or another event-driven model), but you
 can make it less tight by checking every X ms instead of all the time,
 and you can do it in a separate thread that you spawn.  Unlike the
 server 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.



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



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
newbie but I guess I am.

I still don't see how I have the servlet check back every so many ms for an
event or a status flag to be set without performing some sleep() or wait()
without burning CPU.



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



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 -Environment option but
when I use this option, the container will not start.

 

I am using Tomcat 5.0.24 for my container. How do I ensure that environment
variables are visible to native code?

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



RE: Blocking access to static content

2004-10-12 Thread Robert Harper
I have a tree that looks something like the following:

+---ctimpact
   +---ctimpact
  +---CTImpact
  L---src
  L---com
  L---iat
  +---ctimpact
  L---utils
   +---images
   +---usr
  +---1000
 +---download
 +---html
L---images
 L---upload
  +---123
 +---download
 L---upload
  +---1234567890
 +---download
 +---html
L---images
 L---upload
  +---145000
 +---download
 +---html
L---images
 L---upload
  +---145001
 +---download
 +---html
L---images
 L---upload
  +---test
 +---download
 +---html
L---images
 L---upload
  L---Test14
  +---download
  +---html
 L---images
  L---upload
   L---WEB-INF
   +---classes
  +---com
 L---iat
 +---ctimpact
 L---utils
  +---compressionFilters
  +---filters
  +---listeners
  L---util
   L---images

What I need to do is block access to anything under usr from direct access. I
have turned off listings in the default servlet so it is harder to browse but if
I were to put the URL http://localhost:8080/ctimpact/usr/1234567890/.properties,
I would get the contents of that file. This is not acceptable. I have added the
following security constraint:

security-constraint
display-nameUser Content/display-name
web-resource-nameAll user data/web-resource-name
url-pattern/usr/*/url-pattern
http-methodGET/http-method
http-methodPUT/http-method
http-methodPOST/http-method
http-methodDELETE/http-method
auth-constraint
role-namenot_allowed/role-name
/auth-constraint
/security-constraint

This does not seem to block access to anything under the /usr branch. If I use
the URL above, my filter is not called. I'm having a hard time locating
information I need in either the docs or books.

Any help would be appreciated.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 11, 2004 9:05 PM
 To: Tomcat Users List
 Subject: Re: Blocking access to static content
 
 On Mon, Oct 11, 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
 to a role that's not assigned to anyone.
 
 Putting the files in WEB-INF has mixed results as far as container
 portability.  Furthermore, it's not really a place for content...
 
 -QM
 
 --
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 
 -
 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]



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 84121-7411

801.265.8800 ex. 255

 



RE: Blocking access to static content

2004-10-11 Thread Robert Harper
I tried filters but my filters were not always called.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 11, 2004 12:57 PM
 To: Tomcat Users List
 Subject: Re: Blocking access to static content
 
 On Mon, Oct 11, 2004 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
 
 --
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 
 -
 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]



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 will allow them access to the
servlet the removes items off the URL up to myapp and then can browse the entire
structure below that root on the tree. I need to confine them only to valid
interaction between the servlets and the users.

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



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 PM
 To: [EMAIL PROTECTED]
 Subject: Capturing HTML using Tomcat 4
 
 I've been looking through archives and such for examples of how to capture
 the HTML output from a given JSP programmatically so I can archive or do
 other things with that HTML.  For example, we might do this to record the
 text of an agreement that was displayed to a user, in which a JSP generated
 the agreement HTML page.  The pages may be generated from either HTTP GET or
 POST.
 
 It would be nice to perhaps just have a servlet include the response from
 a JSP, passing along the GET/POST request to that JSP, but then have the
 servlet capture the JSP's response in a string for processing/storage.
 O'Reilly has a caching servlet that may help, but I was wondering if anybody
 had come out with an elegant way to do this.
 
 Thanks,
 David
 
 
 -
 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: 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
dynamically add and search for users. I can also add roles and add roles to
users.


private void loadUserDatabase()
{
  if(MBeanServerFactory.findMBeanServer(null).size()  0)
  {
m_BeanServer = (MBeanServer) BeanServerFactory.findMBeanServer(null).get(0);
  }
  else
  {
m_BeanServer = MBeanServerFactory.createMBeanServer();
  }

  try
  {
ObjectName obname = new ObjectName( userDB );
MBeanInfo info = m_BeanServer.getMBeanInfo( obname );
MBeanOperationInfo opInfo[] = info.getOperations();
MBeanAttributeInfo atribInfo[] = info.getAttributes();
for( int i = 0; i  opInfo.length; i++ )
{
  log( loadUserDatabase, Operation:  + opInfo[i].getName() +  is
defined );
}

for( int i = 0; i  atribInfo.length; i++ )
{
  log( loadUserDatabase, Attribute:  + atribInfo[i].getName() +  =  +
m_BeanServer.getAttribute( obname, atribInfo[i].getName() ) );
}
  }
  catch( Exception e )
  {
e.printStackTrace();
  }
}

Robert S. Harper
801.265.8800 ex. 255
 -Original Message-
 From: Honnavalli, Jyothi [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 3:30 PM
 To: 'Tomcat Users List'
 Subject: How to get a handle to tomcat Mbean Server?
 
 Hi All,
 
 I was just learning 'bt Mbeans. To begin with, I was learning to use and
 test the Mbeans that are already existing in tomcat so I get to know how
 Mbeans work.  I have written my own Agent called UserManager to call the
[snip]




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



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 am using the WinINet (yuck) API on the client and setting the user ID and
password on the connection call.

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



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 the use of the
URL and URI names. Often the end users of our code don't understand why there
has to be a difference between /myapp/servlet/myservlet and
/MYAPP/SERVLET/MYSERVLET.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 23, 2004 2:24 PM
 To: Tomcat Users List
 Subject: RE: getParameter() should be case insensitive?
 
 
 Hi,
 
 This is, however, contrary to other APIs and even the HTML spec (I
 believe).  For example, Apache::Request treats parameter names as case
 insensitive:
 
 As you noted, the HTML spec doesn't apply to servlet containers, only
 user agents.  What ASP/ASP.NET do is also irrelevant.  The Servlet Spec
[snip]




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



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 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



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 Users List'
 Subject: RE: JDBC connections
 
 That would Microsoft Access and Microsoft SQL.
 
 //SIGNED//
 
 Jerry Nelson
 
 PS,
 I can't receive attachments unless you rename them.
 
 -Original Message-
 From: John Villar [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 27, 2004 1:39 PM
 To: Tomcat Users List
 Subject: Re: JDBC connections
 
 
 You need a JDBC driver for your selected DBMS
 
 Nelson, Jerry W, Contractor 146CF, SCB escribió:
 
 What do I need to download to establish/create a JDBC connection?
 
 //SIGNED//
 
 Jerry Nelson
 
 
 
 
 
 --
 John Villar
 Gerente de Proyectos
 Computadores Flor Hard Soft 2058 C.A.
 www.florhard.com
 
 
 
 -
 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: 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 suggest
you check the API docs for more information.

Robert S. Harper
801.265.8800 ex. 255
 -Original Message-
 From: David Wall [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 10, 2004 10:07 AM
 To: Tomcat Users List
 Subject: Re: How to get the context path for a web application?
 
  request.getContextPath();
 
 Is there a way to do it when not serving a web page?  Like in a startup
 servlet that has a ServletConfig/Context, but doesn't have a request?  This
 way, the context could be retrieved once and cached and used in situations
 unrelated to processing a specific HTTP request.
 
 David
 
 
 -
 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: 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 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 10, 2004 10:24 AM
 To: Tomcat Users Group (E-mail)
 Subject: Trouble running Tomcat 5.0.29
 
 Hi,
 
 I just installed Tomcat 5.0.29 on a W2K box.  When trying to start the
 Tomcat service, I get the following error in the
 jakarta_service_20040810.log file.
 
 [2004-08-10 09:21:27] [364  javajni.c] [error] Unsuported JNI version 65537
 
 This install is out of the box with zero modifications.
 
 What am I doing wrong?
 
 Thanks,
 
 Dave
 
 
 
 -
 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: 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 requests are
made if the servlet is started before request arrive. I have done this with
other servlet containers.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: David Wall [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 10, 2004 11:27 AM
 To: Tomcat Users List
 Subject: Re: SOLVED: How to get the context path for a web application?
 
  Someone on the list suggested Request.getContextPath() and it works like a
  charm. Thanks to all.
 
 Agreed, but my follow-up question was if there was such a call to be done
 using a ServletContext/ServletConfig object so that you can get the context
 path in initialization servlets, etc., before a request comes in.
 
 David
 
 
   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
   suggest
   you check the API docs for more information.
  
   But do any of those return the context path?  I didn't see it anywhere
 in
   the javadocs.
 
 
 -
 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: 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
 To: [EMAIL PROTECTED]
 Subject: Bizzare bug with my class and sharing values between different
 instances
 
 Hello, list!
 
 I am currently busting my brain over this problem... I have the following
 class:
 
 package net.olaes;
 
 import java.lang.String;
 
 public class NumAndString {
   private static int iNum;
   private static String sString;
 
   public NumAndString(int iNum, String sString){
 this.iNum = iNum;
 this.sString = sString;
   }
 
   public int getNum(){
 return this.iNum;
   }
 
   public String getString(){
 return this.sString;
   }
 }
 
 When I try to do the following in my JSP:
 
 Vector v = new Vector();
 v.add(new NumAndString(1, a));
 v.add(new NumAndString(2, b));
 v.add(new NumAndString(3, c));
 
 Iterator i = v.iterator();
 while(i.hasNext()){
   NumAndString nasThisOne = (NumAndString) i.next();
   out.println(nasThisOne.getNum());
   out.println(nasThisOne.getString());
 }
 
 I get:
 
 3
 c
 3
 c
 3
 c
 
 I don't understand what I'm doing wrong, my gut says to check my class
 definition, but I don't even know how to google up this problem
 because I've never seen it before.
 
 Anywho, I'll keep checking the net for my problem, but if anyone has a
 quickie solution to my class up above, please help.
 
 Thank you very much for your time and assistance in advance.
 
 -TJ
 
 -
 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: 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 Tomcat
 
 Is it possible to have Tomcat interpret one URL, e.g.
 
 http://www.mysite.com/dir/dir/file
 
 to really load another one, e.g.
 
 http://www.mysite.com/otherdir/otherfile.do
 
 
 I think Apache can do this with mod_rewrite; is there a Tomcat
 equivalent? I need this to maintain backward compatibility for people
 using the old URL.
 
 Thanks,
 Jacob
 
 
 -
 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: 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 7:37 AM
 To: [EMAIL PROTECTED]
 Subject: Beyond bassic form authentication?
 
 So I setup my web app to use Form Authentication with a User Realm in my
 MySQL DB. It all works fine. I type the protected resources URL into the
 browser, I get redirected to the login page, I login and behold it works! ;)
 
 Now how would I give access to a secure resource from an unsecure
 resource. For instance...
 
 My webapp has a front page with recent news, welcome message etc...
 Standard home page stuff...
 Obviously I can put a sign-in link that will try to access the protected
 resource, which will then redirect to the login page...
 But is there a way to put a login form on the home page directly and
 post that form for authentication and from there give access to the
 protected resource?
 
 Thanks
 
 -
 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: 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

 -Original Message-
 From: Dale, Matt [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 16, 2004 10:54 AM
 To: Tomcat Users List
 Subject: RE: relogin question
 
 
 There is no way for tomcat to do this as its all at the client end. But (I
 think) you can use javascript to capture the event of moving away from your
 page and redirect to a page which invalidates your session.
 
 I`m sure this has been asked before so searching the archives might yield some
 results.
 
 Ta
 Matt
 
 -Original Message-
 From: Daxin Zuo [mailto:[EMAIL PROTECTED]
 Sent: 16 July 2004 17:50
 To: Tomcat Users List
 Subject: relogin question
 
 
 I have a relogin problem.
 
 1) I am on the page P,
 2) I click on the Home button of the browser,
 3) and then I click back button on the browser. The page P is displayed
 again.
 
 But at 3) we intend that the application asks for relogin. So after 2), the
 session should be expired. Does Tomcat have a nice way to do it? Any body
 has done it? Please help.
 Thank a lot.
 
 
 -
 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: 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, 2004 10:20 AM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat - MySQL = No suitable driver ERROR
 
 Yeah, I just tried that and still no go.  Still getting:
 
 javax.servlet.ServletException: Unable to get connection, DataSource
 invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
 driver of class '' for connect URL 'null', cause: No suitable driver
 
 -Original Message-
 From: Jan Behrens [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 01, 2004 1:04 AM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat - MySQL = No suitable driver ERROR
 
 
 David is right,
 
 you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to
 {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up
 and running.
 
 Jan
 
 -Original Message-
[snip]



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



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 get Roles in a Principal with JNDIRealm
 
Hello All,
 
 
 I'm using JNDIRealm to authenticate users and it's working well.
 In my java code, I need to retrieve roles associated with the
 authenticated user.
 Here is a sample of this code :
 
 Subject s =
 Subject.getSubject((AccessControlContext)System.getSecurityManager().getSecuri
 tyContext());
 Principal p = (Principal)s.getPrincipals().toArray()[0];
 
 The API only allows me to retrieve, on the Principal, the name (with the
 getName accessor) of the user, not associated roles.
 Nevertheless, when running the code in a debugger, the state of the
 Principal object seems containing all needed informations (name,
 password, realm, roles).
 
 Is there a (standard) way to retrieve these additional information ?
 Or should I develop my own LDAP Realm (JAAS module) and extend the
 Principal interface to add role notions ?
 
 Any help would be appreciated...
 
 RP
 
 
 
 -
 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: 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 credentials as the
logged in user.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: Robert Bateman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 30, 2004 7:39 AM
 To: Tomcat Users List
 Subject: Re: Please Help! Tomcat 5.0.25
 
 This may or may not be totally on topic - apologies if it's not...
 
 On Wednesday 30 June 2004 12:16 am, Aris Javier wrote:
  Still the same error occured after replacing my service.bat with your
  service.bat... (declares tools.jar inside) =|
 
  org.apache.commons.dbcp.SQLNestedException: Cannot create
  PoolableConnectionFactory, cause: General error
 
  When i run startup.bat... it worked fine again... the following are the
  logged
  scripts in MS DOS when i run startup.bat...
 
 
 I've seen similar errors when running programs as services in a Windows
 environment.  One thing that got me over and over was the data base I was
 accessing was not local.  Because the remote data base needed me to map a
 drive letter to it, my program running as service failed.
 
 Are you by chance attempting to access your data base on a network drive?
 
 Bob
 
 -
 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: 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 unexpectedly shuts down
 
 Is anybody working this?
 
 Chris Bliesner
 Lead Oracle DBA/Unix admin
 Wk Phone 915-834-1757
 
 
 -Original Message-
 From: Bliesner, Christopher P
 Sent: Tuesday, June 29, 2004 10:37 AM
 To: Tomcat Users List
 Subject: FW: re: Tomcat unexpectedly shuts down
 Importance: High
 
 Hello-I am working with version 4.1.12 and today, Tomcat shut down
 unexpectedly with the following error:
 
 
 
 2004-06-29 09:32:07 StandardWrapperValve[invoker]: Servlet.service() for
 servlet invoker threw exception
 
 java.lang.NullPointerException
 
 at ewovqa.VqaNcDB.searchVqaNc(VqaNcDB.java:33)
 
 at ewovqa.VqaNcSrv.doGet(VqaNcSrv.java:83)
 
 at ewovqa.VqaNcSrv.doPost(VqaNcSrv.java:116)
 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 at
 org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.
 java:458)
 
 at
 org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:2
 16)
 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:247)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:193)
 
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
 e.java:260)
 
 at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
 nvokeNext(StandardPipeline.java:643)
 
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
 80)
 
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:191)
 
 at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
 nvokeNext(StandardPipeline.java:643)
 
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
 80)
 
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 
 at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
 6)
 
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
 :180)
 
 at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
 nvokeNext(StandardPipeline.java:643)
 
 at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
 lve.java:170)
 
 at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
 nvokeNext(StandardPipeline.java:641)
 
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
 :172)
 
 at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
 nvokeNext(StandardPipeline.java:641)
 
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
 80)
 
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
 java:174)
 
 at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
 nvokeNext(StandardPipeline.java:643)
 
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
 80)
 
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 
 at
 org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
 5)
 
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
 onnection(Http11Protocol.java:380)
 
 at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
 8)
 
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
 .java:533)
 
 at java.lang.Thread.run(Thread.java:484)
 
 
 
 
 
 Is this a BUG or ?
 
 
 
 Chris Bliesner
 
 Lead Oracle DBA/Unix admin
 
 Wk Phone 915-834-1757
 
 
 
 
 -
 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: 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

 -Original Message-
 From: Woodchuck [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 25, 2004 9:29 AM
 To: Tomcat Users List
 Subject: Re: Determination if a client has sessions enabled or not.
 
 hi,
 
 this begs the question, is it bad practice to require users to enable
 cookies?
 
 
 --- Mike Fowler [EMAIL PROTECTED] wrote:
  Ben,
 
  I don't know of any way of checking (someone correct me if I'm
  wrong!).
  What I have done is to attach an attribute to the session, redirect
  to a
[snip]




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



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 other method
should be used. If it is OK with your business model to loose customers/users
due to loss of some feature, then that is OK. Often the sales people and other
managers are not OK with any loss. Just a thought.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: Woodchuck [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 25, 2004 10:16 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: Determination if a client has sessions enabled or not.
 
 it used to be more common to have warnings on websites that say cookies
 are required.  nowadays, these warnings are not there anymore and it's
 assumed cookies will be available.  and if cookies are disabled by the
[snip]




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



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. 
Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 23, 2004 9:58 AM
 To: [EMAIL PROTECTED]
 Subject: Tomcat 5.0 under Windows ME
 
 I just downloaded Tomcat 5.0 to run on my Windows ME system. When I try to
 run the Configure Tomcat program, I get:
 
 The tomcat5w.exe file is linked to missing export
 NETAPI32.DLL:MetwkstaGetInfo.
 
 NETAPI32.DLL seems to be a Windows XP file. I did the same download on my XP
 machine and it is working.
 
 Any idea what my problem is under Windows ME?
 
 Thanks for your help.
 
 
 
 -
 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: 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 new
file is started each day. You could also create your own logger that manages the
file size in some way. I have used the former and have specified the file name
and path so that it easy form me to manage. My logs are separate from the normal
logs as well.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: Veera Sivakumar [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 22, 2004 3:47 AM
 To: Tomcat Users List
 Subject: Managing Tomcat logs
 
 Hi,
 I am using Tomcat as web server for my application. I start Tomcat using
 windows service. All the logs generated by the Application are written in to a
 file called stdout.log which is under tomca/logs folder.
 I have noticed that with continuous use of application,stdout file size
 increasing to a large extent. To delete the it I have to stop the tomcat.
 Is there any way that I can manage the logs date wise automatically(without
 manual intervention). I am not using any third party tool for logging.
 The logging mechanism I use is very simple.
 
 We have class Debug.java that have a method log(String);
 This log() method use System.out.println();
 In the application, I use Debug.log(Exception);
 
 I will be more happy if there is any way to manage logs.
 I have also noticed the following logs generated by Tomcat:
 1.localhost_log.2004-06-18.txt
 2.localhost_access_log.2004_06_22.txt
 
 How to maintain these logs?. Can we off them permanently?
 Thanks in advance.
 
 Regards
 S.V.Sivakumar
 QCA Project
 Tata Infotech Limited
 Tel:  +44 1235 823411
 [EMAIL PROTECTED] / [EMAIL PROTECTED]
 
 Visit our website at http://www.rm.com
 
 This message is confidential.  You should not copy it
 or disclose its contents to anyone.  You may use and apply the information
 only for the intended purpose.  Internet communications are not secure and
 therefore RM does not accept legal responsibility for the contents of this
 message.  Any views or opinions presented are only those of the author and
 not those of RM.  If this email has come to you in error please delete it
 and any attachments.  Please note that RM may intercept incoming and
 outgoing e-mail communications.
 
 This email has been scanned for viruses by Trend ScanMail.



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



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)
{
   m_BeanServer = (MBeanServer)BeanServerFactory.findMBeanServer(null).get(0);
}
else
{
   m_BeanServer = MBeanServerFactory.createMBeanServer();
}

then to add a user:

// build the initial name of the bean to act upon
ObjectName oname = 
  new ObjectName(Users:type=UserDatabase,database=UserDatabase );
// next call one of the methods of the bean. I'll show how to add one
// set up the parameters
String params[] = new String[3];
String types[] = new String[3];

params[0] = strID;
params[1] = strPassword;
params[2] = strName;
types[0] = java.lang.String;
types[1] = java.lang.String;
types[2] = java.lang.String;

// invoke the method
m_BeanServer.invoke( oname, createUser, params, types );
// note this does not return the user bean as the docs say

// find the user and add a role to the user
String param[] = new String[1];
String type[] = new String[1];
param[0] = strID;
type[0] = java.lang.String;

String userBean = (String)m_BeanServer.invoke( oname, findUser, param, type );
// now if you have the user
if( userBean != null )
{
String param[] = new String[1];
String type[] = new String[1];
param[0] = strRole;
type[0] = java.lang.Sring;
ObjectName oname = new ObjectName( userBean );
m_BeanServer.invoke( oname, addRole, param, type );
}

You will have to add some exception handling but this should get you on your way
if you are using Tomcat's user authentication. I hope this helps.


Robert S. Harper

 -Original Message-
 From: Dan Barron [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 18, 2004 4:46 PM
 To: Tomcat Users List
 Subject: Allow user to change password in JDBCRealm
 
 Hello,
 
 I've looked around for some time now for a clear answer on this topic, but
 have not had much luck.
 
 I have user authentication setup using JDBCRealm w/ MySQL and am able to
 login/logout and authenticate users just fine.  My question is, once a user
 is logged in, is the user's login information (uname/pass) available
 somewhere where I can easily grab it and modify it so I can allow my users
 to change their password?
 
 Thanks,
 
 Dan
 
 
 -
 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]



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 MemoryUserDatabase returns the full name
of the user created. The return I get from my call to createUser with the full
name supplied is null.

 

I now have two questions:

 

1.  What is the name of the object I should use to manipulate an individual
user? 
2.  How do I set the desired user active so I can update the correct user? 

 

I have a hard time following the code for the admin app because the code is so
abstracted and I don't know where all of the property strings and attributes are
coming from.

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 

 

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



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 for configuration of my web app
--

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

display-nameMy display name for Tomcat Manager/display-name
description
  Some sort of description
/description

!-- Define your servlets that are included your application --

servlet
servlet-nameMyServlet/servlet-name
servlet-classmy.package.com.MyServlet/servlet-class
/servlet
servlet-mapping
servlet-nameMyServlet/servlet-name
url-pattern/servlet/MyServlet/url-pattern
/servlet-mapping
/web-app

Now that that is set up, you may use the Tomcat administrator to add your app to
the known contexts in Tomcat. After that has been done, try pointing your browse
to http://localhost:8080/myapp/servlet/MyServlet and see what you get. Look at
the servlet-examples tree for more detail and samples. That is why they are
included in the installation.

Robert S. Harper
801.265.8800 ex. 255

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 17, 2004 10:18 AM
 To: tomcat-user
 Subject: Re: question
 
 Hi
 
 I'm sorry but i don't understand.
 
 may someone explain it?
 
 I want to know the procedure of making an application running, please
 
 
 Angelo
 
 
 
  Hi Angelo,
 
  Please read my write-up on Tomcat 5 here :
  http://cymulacrum.net/writings/tomcat5/book1.html
 
  I am currently updating the document, but what you need now is right there.
 
 
  Regards,
  pascal chong
 
 
 
  [EMAIL PROTECTED] wrote:
 
 
  I put my web application under webapps...
  (moved the entire subtree of my application)
  now what do i do to have it running?
  
  How do i connect to it?
  
  Angelo
  
  
  
  
  
  Hi,
  Didn't we discuss this last week? ;)  Anyways, don't put your webapp
  under webapps/ROOT: put it under the webapps folder itself.
  
 
  Put all your classes in packages to establish a good habit.
  
  Use explicit imports for your classes unless they're in the same package
  as the class using the imports.
  
  
  Yoav Shapira
  Millennium Research Informatics
  
  
  
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, June 16, 2004 10:39 AM
  To: tomcat-user
  Subject: question
  
  Question, please.
  
  I have a web application... named matrici/web
  
  
  so i have a tree like this
  
  matrici/web/
  -many jsp files
  -WEB-INF/
  --web.xml
  --classes/
 
  --lib/
  
  my application is under $CATALINA_HOME/webapps/ROOT
  
  I put my extern class, CreaServizio.class in WEB-INF/classes/ is it
  
  
  right?
  
  
  do i have to create a package for that class?
  or do i have to use an explicit import instruction?
  
  It returns me an error
  cannot resolve symbol symbol  : variable CreaServizio
  
  CreaServizio is a class
  
  Angelo
  
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  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]
 
  
  
  
  
  
  
 
 
  -
  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]
 




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



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 access to this
resource to my app. I have added a line like 

 

grant codeBase file:${catalina.home}/webapps/my_appt/WEB-INF/classes/- {

permission java.security.AllPermission;

};

 

to the catalina.policy file. My code compiles but I get a 

 

java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm 

 

error that I assume is due to an access restriction.

 

Any ideas? Thanks in advance.

 

Robert

 



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

 

I only add a role to the database. I need a way to add the role to the user. I
have tried setting the name to 

User:type=UserDatabase,database=UserDatabase,

Users:type=User,database=UserDatabase,

User:type=User,database=User, . etc. 

 

and all I get for this is and exception that the bean cannot be found. What is
the name of the bean used to manage user-roles?

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255

 



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 use the
admin tool?

 

Robert S. Harper

Senior Engineer

1100 East 6600 South, Suite 300

Salt Lake City, UT 84121-7411

801.265.8800 ex. 255