Servlet reload problem
Dear all, I am using Tomcat 1.4.27 and each time after I made some modification to my servlet, tomcat didn't reload the updated one. By the way I already installed the hot patch that is said to solve the reloading problem. Any ideas? Thanks in advance. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Re: Dynamic Authenticator
The authenticator itself is fixed. But the user role tables can be modified on the fly. Ron Andersen [EMAIL PROTECTED] wrote:Does anyone know of a good authentictor plugin for Tomcat. I reviewed the sample(XML based) authentcator from Tomcat, but this authenicator is only used at startup. I need onw that will able to add and delete users on the fly - not just at start up. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: Virtual Host Alias Problem
Suppose your domains are: d1,d2; corresponding ips are ip1, ip2. Host name=d1 debug=0 appBase=webapps unpackWARs=true autoDeploy=true Aliasip1/Alias .. /Host Host name=d2 debug=0 appBase=webapps unpackWARs=true autoDeploy=true Aliasip2/Alias .. /Host Please let me if it works. Srinivasu Gandu [EMAIL PROTECTED] wrote: Hi Lawence, Would you provide sample host tag or server.xml. I have similar issue here. I have 2 domains have different ip addresses with in the same tomcat to set up. will appreciate. Thanks - srini. -Original Message- From: Lawence [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 11:41 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Virtual Host Alias Problem Yes, I just duplicated the host entry and changed the second one from domain to ip. Now both work fine. There should be a better solution but I am happly with it. Wade Chandler wrote:Yeah the ipaddress tag. Also, you'll notice that you'll have to create extra Host tags if you use anything other than www. As the prefix for your domain name. I have yet to figure that one out. But, am planning on looking at the Alias source code. Has anyone else had this type of a problem with Alias? Lawence you may need to make another host tag for this. This is the type of issue I have been having. I have a domain wade.internal.net and rh1.internal.net and these have to be setup as separate Host names to work. You may experience this with your ip addresses as well. Also, if you are using a different ip address and port other than than the standard one you will need to make sure you have your connectors setup correctly for that. Like 192.168.1.10:80 and 192.168.1.11:80 if on the same box needs to connectors one for each IP. Since they are the same port. -Original Message- From: Lawence [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2003 12:20 PM To: Tomcat Users List Subject: Virtual Host Alias Problem Dear all, I have a problem setting the name value for the virtual host entry. Suppose my domain name is my.company.net and the ip is 233.333.333.33. If I set the virtual host as my domain name, I can not access the website using the ip. And if I set it as the IP, I can not visit the website via the domain name. I am wondering if there is a way for me to set alias for the virtual host. Thanks in advance. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Re: JDBC Realm not working with - Please help
Suggestions: 1. Check the log files for possible error messages $CATALINA_HOME/log 2. Write a java application to try the connection, see what you would get [EMAIL PROTECTED] wrote: Hi again, I'm using version 4.1.27 of tomcat, and my login page is taking forever to load. I'm not actually getting any error messages. Thanks again, Rudi Hi, I'm trying to setup my web app to use JDBC Realm. I am using SQL Server 2000. Here is the script to create tables: CREATE TABLE [dbo].[t_Role] ( [RoleId] [int] IDENTITY (1, 1) NOT NULL , [role] [varchar] (12) ) CREATE TABLE [dbo].[t_Usr] ( [UsrId] [int] IDENTITY (1, 1) NOT NULL , [UsrName] [varchar] (10) , [Pwd] [varchar] (10) ) CREATE TABLE [dbo].[t_UsrRole] ( [UsrRoleAdmin] [int] IDENTITY (1, 1) NOT NULL , [UsrName] [varchar] (10) , [RoleName] [varchar] (10) ) Below is the only changes I have made to my server.xml file. driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver connectionURL=jdbc:microsoft:sqlserver://exp468:1433;DatabaseName=Mosaic;user=sa;password=c0mmun1$t; connectionName=rudi connectionPassword=rudi userTable=t_Usr userNameCol=UsrName userCredCol=Pwd userRoleTable=t_UsrRole roleNameCol=RoleName / Any assistance would be greatly appreciated. Cheers, Rudi - 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] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: JavaMail doesn't work
Thanks for all the replies! Placing the mail.jar and activation.jar under $CATALINA_HOME/common/lib/ solves this problem. But I still don't understand the cause of the problem Also what is the searching order of tomcat when it looks for a java class? Phillip Qin [EMAIL PROTECTED] wrote: Use $CATALINA_HOME/common/lib/mail.jar and activation.jar -Original Message- From: John Corrigan [mailto:[EMAIL PROTECTED] Sent: October 7, 2003 7:29 PM To: Tomcat Users List Subject: RE: JavaMail doesn't work I ran into this problem and I think it was related to having installed multiple versions of Sun's JSDK on the Win2K machine in question. I resolved it by removing all installations of Java and Tomcat and then reinstalling. Not sure what the underlying problem was. My solution was probably overkill, but it worked :) -Original Message- From: Lawence [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 8:39 AM To: Tomcat Users List Subject: JavaMail doesn't work Dear all, I installed Tomcat4.1.27 on one win2000 and one winXP. I tried the SendMailServlet that ships with it. The servlet worked fine on win2000 and it gave the following message on winXP:java.lang.NoClassDefFoundError: javax/mail/Message I guess this is because somehow Tomcat can't find the class. (This is wierd since I do not have the problem on win2000). So I downloaded the JavaMail and copied the mail.jar and activation.jar to $CATALINA_HOME/server/lib. But the problem was still there. Any suggestions? Thanks! - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
JavaMail doesn't work
Dear all, I installed Tomcat4.1.27 on one win2000 and one winXP. I tried the SendMailServlet that ships with it. The servlet worked fine on win2000 and it gave the following message on winXP:java.lang.NoClassDefFoundError: javax/mail/Message I guess this is because somehow Tomcat can't find the class. (This is wierd since I do not have the problem on win2000). So I downloaded the JavaMail and copied the mail.jar and activation.jar to $CATALINA_HOME/server/lib. But the problem was still there. Any suggestions? Thanks! - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Re: How to format number
There are some non-standard nice library classes you can use for this purpose. Just google it. These classes enable you to format things like you are working with c/c++. Lee Chin Khiong [EMAIL PROTECTED] wrote: How to format a double in JSP or java ? for example : 10/3=3.3 I want to format it to 3.33. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: Virtual Host Alias Problem
Yes, I just duplicated the host entry and changed the second one from domain to ip. Now both work fine. There should be a better solution but I am happly with it. Wade Chandler [EMAIL PROTECTED] wrote:Yeah the ipaddress tag. Also, you'll notice that you'll have to create extra Host tags if you use anything other than www. As the prefix for your domain name. I have yet to figure that one out. But, am planning on looking at the Alias source code. Has anyone else had this type of a problem with Alias? Lawence you may need to make another host tag for this. This is the type of issue I have been having. I have a domain wade.internal.net and rh1.internal.net and these have to be setup as separate Host names to work. You may experience this with your ip addresses as well. Also, if you are using a different ip address and port other than than the standard one you will need to make sure you have your connectors setup correctly for that. Like 192.168.1.10:80 and 192.168.1.11:80 if on the same box needs to connectors one for each IP. Since they are the same port. -Original Message- From: Lawence [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2003 12:20 PM To: Tomcat Users List Subject: Virtual Host Alias Problem Dear all, I have a problem setting the name value for the virtual host entry. Suppose my domain name is my.company.net and the ip is 233.333.333.33. If I set the virtual host as my domain name, I can not access the website using the ip. And if I set it as the IP, I can not visit the website via the domain name. I am wondering if there is a way for me to set alias for the virtual host. Thanks in advance. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: Send mail cgi script doesn't work under tomcat?
Patrik, So I am not alone. Here are the possible soultions I came up with, hopefully they help. 1. If just a few cgi scripts and they are simple, port them to Java. 2. Integrate Tomcat with Apache, then you don't need to modify the cgi scripts. However, the server configuration becomes more complicated. 3. Hack the useCGI servlet, I am not sure this works. 4. Just port the email portion to java and write it as a filter servlet, which postprocess the requests after your CGI. (This is the one I would like to try but did not try yet). Patrick Willart [EMAIL PROTECTED] wrote: Laurence, I have the same problem and could not figure it out. It seems that the CGI program isn't allowed to open a new socket. You could try to enable the Security Manager and set it up so it allows for opening sockets. However, I don't believe CGI scripts/programs are affected by the Security Manager. Also my CGI program isn't allowed to open a new socket with the Security Manager disabled, so I don't think it will help. I posted the problem on this list yesterday but didn't get back any response. If you figure out a way to get it working please let me know. I wasted a couple of days on it and am currently working on porting the CGI app to Java. grts, Patrick -Original Message- From: Lawence [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 12:56 PM To: [EMAIL PROTECTED] Subject: Send mail cgi script doesn't work under tomcat? Dear all, I know not too many did this before. I enabled cgi support of Tomcat instead of integrating it to apache. Everything worked fine for the old cgi scripts except one fatal thing: the email script failed. Seemed to me Tomcat has some security restriction on openning socket to communicate with a smtp server. Hence all the sendmail perl modules I tried failed at the very first step, trying to connect to the smtp server. I tried those modules as perl scripts instead of cgis under tomcat on the same machie, they all worked perfectly. Anyone knows how to get around this in tomcat? Thanks in advance! - Do you Yahoo!? The New Yahoo! Shopping - with improved product search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Virtual Host Alias Problem
Dear all, I have a problem setting the name value for the virtual host entry. Suppose my domain name is my.company.net and the ip is 233.333.333.33. If I set the virtual host as my domain name, I can not access the website using the ip. And if I set it as the IP, I can not visit the website via the domain name. I am wondering if there is a way for me to set alias for the virtual host. Thanks in advance. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Send mail cgi script doesn't work under tomcat?
Dear all, I know not too many did this before. I enabled cgi support of Tomcat instead of integrating it to apache. Everything worked fine for the old cgi scripts except one fatal thing: the email script failed. Seemed to me Tomcat has some security restriction on openning socket to communicate with a smtp server. Hence all the sendmail perl modules I tried failed at the very first step, trying to connect to the smtp server. I tried those modules as perl scripts instead of cgis under tomcat on the same machie, they all worked perfectly. Anyone knows how to get around this in tomcat? Thanks in advance! - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Re: Integrating Tomcat and Apache on RedHat 9.0
Thanks for sharing. Mike Millson [EMAIL PROTECTED] wrote: FYI, below is an article I wrote on integrating tomcat and apache on RedHat 9.0 that might be of interest. http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html It has a lot of general configuration info as well. It has been fairly well tested recently by a number of individuals who have provided feedback. It was published this month by Linux Gazette, but the link above has the latest and greatest w/ typos fixed and clarifications added. As much as I proofread the copy I sent to Linux Gazette, a few issues and typos were brought to my attention after I submitted it. http://linuxgazette.com/issue95/millson.html Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
form login page does not appear for my custom authenticator?
Dear all, I had a wierd problem working with my own authenticator. The form login page did not appear at all but I got an error message stating Configuration error: Cannot perform access control without an authenticated principal. By checking the log file, I understood how this error was triggered but still could not solve it. Since the login page did not appear, I had no chance to invoke j_security_check (by clicking the submit button). Consequently the request url did not end with the string j_security_check. Somewhere in the program, the following check thus failed. // Is this the action request from the login page? boolean loginAction = requestURI.startsWith(contextPath) requestURI.endsWith(Constants.FORM_ACTION); // No -- Save this request and redirect to the form login page if (!loginAction) { session = getSession(request, true); if (debug = 1) log(Save request in session ' + session.getId() + '); saveRequest(request, session); if (debug = 1) log(Redirect to login page ' + loginURI + '); hres.sendRedirect(hres.encodeRedirectURL(loginURI)); return (false); } So I was redirected to the login page (again it did not appear at all). This time the following check succeeded: // Is this a request for the login page itself? Test here to avoid // displaying it twice (from the user's perspective) -- once because // of the save and redirect and once because of the restore and // redirect performed below. String loginURI = contextPath + config.getLoginPage(); if (requestURI.equals(loginURI)) { if (debug = 1) log(Requesting login page normally); return (true); // Display the login page in the usual manner } I think this code assumes I have been already authenticated. That's why finally I got the error. My questions are: 1. When should the login page appear? I think it should appear before the call of the corresponding authenticator, am I right? 2. Is there some special configuration to bring up the login page for user's custom authenticator? Any suggestions or hints would be greatly appreciated. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Re: Filter for Form Authentication Problem
Thanks for the replies. So this means I have to go with custom realm and authenticator? Actually I first tried with them but got stuck, I guess I was quite close to success though. I posted one article asking for help several days ago but got no response at all. I am reposting it below, hopefully sb. would kindly point me a way out. === Dear all, I wrote my own authenticator (extends FormAuthenticator) realm (extends JDBCRealm). What I need is to check one more field in the database besides password for authentication. Only minor modifications are made on the original codes so I think it should be fine. What I also did include changing the org/apache/catalina/startup/Authenticators.properties file to add the new authenticator; modifying the server.xml and web.xml accordingly. Furthermore, I added the entries for my authenticator and realm in the mbeans-descriptor.xml file. I expected everything to work perfectly but when I tried to access the secured area, I got the following error: HTTP Status 500 - Configuration error: Cannot perform access control without an authenticated principal - type Status report message Configuration error: Cannot perform access control without an authenticated principal description The server encountered an internal error (Configuration error: Cannot perform access control without an authenticated principal) that prevented it from fulfilling this request. This error was triggered instantly. I mean I even did not have a chance to see the login webpage. Now I have several questions: What is the flow of the authentication? Was my authenticator got executed at all? Any suggestions would be greatly appreciated. Bill Barker [EMAIL PROTECTED] wrote: Joerg Heinicke wrote in message news:[EMAIL PROTECTED] Tim Funk wrote: You can't intercept j_security_check with a filter, it violates the spec. -Tim This is at least one answer to my thread started last week: http://www.mail-archive.com/[EMAIL PROTECTED]/msg104931.html. What are the consequences/possibilities to set the request character encoding with servlet standard API mechanisms instead of using the Tomcat proprietary solution of using a Valve? This is a really interesting issue. I would hope that you would send a message to [EMAIL PROTECTED] to hopefully get the expert-team to clarify this before the 2.4 spec goes final. Because the Servlet-2.2 spec lacks the request.setCharacterEncoding method, Tomcat 3.3 jumps through a lot of hoops to try and guess the charset. These were dropped in Tomcat 4+, since the request.setCharacterEncoding method was supposed to solve all of these problems. As you have pointed out, it is not possible to use this in a Filter for the standard Form-auth config (for the simple reason that Auth is called before Filters). Therefore, the j_security_check target is flying blind wrt charset. Joerg Lawence wrote: Dear All, I wrote a filter servlet that does some preprocessing. Basically it intercepts the call of j_secuity_check. The problem is that most of the time it was just bypassed. The only way to trigger it as I found is to first fill the form and got authenticated, then go back and try the authentication again. Anybody knows the solution? Another question is how to sepcify the url pattern of j_security_check. My login page is /secured/login.jsp, I think the url should be /secured/j_security_check, am I right? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Filter for Form Authentication Problem
Dear All, I wrote a filter servlet that does some preprocessing. Basically it intercepts the call of j_secuity_check. The problem is that most of the time it was just bypassed. The only way to trigger it as I found is to first fill the form and got authenticated, then go back and try the authentication again. Anybody knows the solution? Another question is how to sepcify the url pattern of j_security_check. My login page is /secured/login.jsp, I think the url should be /secured/j_security_check, am I right? Thanks in advance. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
Pleas help (Custom Authenticator Reaml Problem)
Dear all, I wrote my own authenticator (extends FormAuthenticator) realm (extends JDBCRealm). What I need is to check one more field in the database besides password for authentication. Only minor modifications are made on the original codes so I think it should be fine. What I also did include changing the org/apache/catalina/startup/Authenticators.properties file to add the new authenticator; modifying the server.xml and web.xml accordingly. Furthermore, I added the entries for my authenticator and realm in the mbeans-descriptor.xml file. I expected everything to work perfectly but when I tried to access the secured area, I got the following error: HTTP Status 500 - Configuration error: Cannot perform access control without an authenticated principal - type Status report message Configuration error: Cannot perform access control without an authenticated principal description The server encountered an internal error (Configuration error: Cannot perform access control without an authenticated principal) that prevented it from fulfilling this request. This error was triggered instantly. I mean I even did not have a chance to see the login webpage. Now I have several questions: What is the flow of the authentication? Was my authenticator got executed at all? Any suggestions would be greatly appreciated. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
(Apache Tomcat) || (Tomcat with CGI Support)?
Dear All, I need to accomondate some old cgi scripts on my website but primarily it uses java. I am wondering which comb is better in terms of simplicity and usability. By the way, I tried to enable CGI support with Tomcat, but since the installation path of Tomcat contains white space, it complaind that c:\programs does not exist (actually it is c:\program files). Anybody had the same experience? Charlie - Do you Yahoo!? The New Yahoo! Shopping - with improved product search