Re: Reg form based authentication
thank you all Sreekanth On 10/1/05, Mark Thomas <[EMAIL PROTECTED]> wrote: > > sree kanth wrote: > > Hi all, > > i have been developing on JSP's for the last one year,but still i have > never > > implemented form based authentication. > > Can any one help me in implenting form based authentication? > > Thank you all > > Sreekanth > > Very basic example: > Put login.jsp and error.jsp in the root of your application and add > the web.xml snippet to your application's web.xml file. > > Mark > > login.jsp > > > Login > > > > > > > > > > > > error.jsp > > > Login Error > > > Login failed. > > > > web.xml snippet > > FORM > Test > > /login.jsp > /error.jsp > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: Re: Stopping users from getting a directory listing
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Graham Reeds > Subject: Re: Stopping users from getting a directory listing > > I tried copying the default servlet definitions and when that failed, > the proceeding filters, to the application specific web.xml but that > causes an exception to be thrown. Don't copy anything - just edit conf/web.xml to set the value of "listings" for the default servlet to false. Nothing else needs to be changed. - 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]
Re: Getting tomcat instance information into webapp
Ah! Yes. See! I did mention I wasn't an expert. :) Yes, multiple instances, in my outlaid scenario equates to multiple installs. Whereas, multiple running instances doesn't necessarily. Sorry. Let me have a think about that for an hour or 4. How do you tell tomcat which port to listen on unless you have separate server.xml's (with defined connectors) each mentioning the port on which TC should listen? K David Kerber wrote: You have multiple instances of tamcat running. This means you will have multiple server.xml's (meaning multiple "Engine"s in which you can set up your multiple realms and direct each different realm to whichever db you want to direct it to. As server.xml is unique (in std. format config.) to a tomcat instance, you have complete control over which port-instance looks at which db. Then how do I isolate the instances of tomcat (and their respective server.xml's? Do I need multiple installations of tomcat on my disk? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to logout after login with JDBCRealm?
The webapp is enabled with JDBCRealm. After login, how to logout without closing the browser? Thnx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MyServlet as default servlet in tomcat 5.0.27
Rename your war to ROOT.war and deploy it. Or you can manually deploy the app and point the default Host element to the new appBase location. Doug - Original Message - From: "Partheeban Boopathy" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, September 30, 2005 5:06 PM Subject: MyServlet as default servlet in tomcat 5.0.27 Hi How to set my servlet as a default for my Tomcat5.0.27 instance which runs in a machine name testmachine. I want my servlet to make it as default one,i changed web.xml under tomcatinstalldir/conf folder. It works,but i dont want to change that web.xml under conf folder.Is there any way on that. My main requirnment is How to make my servlet available for the url below http://testmachine:8050 I dont want to give any application name after the port number whereas tomcat5.0.27 is running in testmachine. Note : I packed my servlet inside a war file and deployed under tomcatinstalldir/webapps as test.war Thanks Parthi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting tomcat instance information into webapp
Kyle wrote: I may be misunderstanding the question, but it seems to me that this shouldn't really be an issue. It's more likely that I don't know enought about tomcat to ask an intelligent question! You have multiple instances of tamcat running. This means you will have multiple server.xml's (meaning multiple "Engine"s in which you can set up your multiple realms and direct each different realm to whichever db you want to direct it to. As server.xml is unique (in std. format config.) to a tomcat instance, you have complete control over which port-instance looks at which db. Then how do I isolate the instances of tomcat (and their respective server.xml's? Do I need multiple installations of tomcat on my disk? Again, because you have multiple instances, you will (should) have multiple contexts/context.xml's (dependent upon your tomcat version) in which you can set up your jdbc resources and the various connect criteria for the different db's. Ok, I didn't know that. Right now, my jdbc connection criteria is hard-coded in the application (I didn't write it; just inherited it). It is set up to look for a specific ODBC DSN. I can easily change the app to look for a configurable DSN, but don't know how to get that config info into the application. I may be mistaken, but if the app. is written correctly _and_ the different resources in the different contexts are all set up with the same names, you could even then get away with just having the one context root/appbase with the one jdbcURL context-param in web.xml. In this way, the same code would hit and serve up the different data dependent upon which port-instance of tomcat it was hitting. I'll have to do some more careful reading about my context and server.xml entries. DISCLAIMER: I haven't tried this and I'm no tomcat expert, but I personally, at my lvl of expertise, am unaware of any reason why this wouldn't work. Hopefully, someone more knowledgeable will jump in and correct me if I'm way off base. K. Thanks for the response! Dave David Kerber wrote: This question is part tomcat and part java; I'm running on a Windows 2000 server. I have a situation where I am going to need to run multiple instances of tomcat on a single machine, listening on different ports, but running the same application and hitting a different instance of an identical database (same schema, but on a different server). So what I will need to do is be able to tell each instance of the application on its respective instance of tomcat which database to hit. Can I pass a parameter into tomcat from a conf file based on what port that instance of tomcat is listening on, and then get that parameter into my application? If so, how? Another option is for my application to grab the machine name and port that it is handling, and hit a "common" database to get the information on what copy of the production to use. But again, I need my app to be able to find port information from tomcat, and I don't know how to do that. It seems like a 3rd option might be to run each instance of tomcat as a service, logged on with different accounts, and use a user DSN instead of a system DSN, with the same DSN name, but different connection info. Is that possible? If necessary, I could install multiple instances of my app at different context paths, but I still don't know how to tell them to pick up the correct database connection info. I guess I could make a code change in the first page they hit, the logon.jsp, for each instance, but I'd rather not have to do that unless there really is no other way, because that would be easy to screw up when making changes later on... Any suggestions as to which of the above approaches would be the best, or another one I haven't thought of? 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting tomcat instance information into webapp
I may be misunderstanding the question, but it seems to me that this shouldn't really be an issue. You have multiple instances of tamcat running. This means you will have multiple server.xml's (meaning multiple "Engine"s in which you can set up your multiple realms and direct each different realm to whichever db you want to direct it to. As server.xml is unique (in std. format config.) to a tomcat instance, you have complete control over which port-instance looks at which db. Again, because you have multiple instances, you will (should) have multiple contexts/context.xml's (dependent upon your tomcat version) in which you can set up your jdbc resources and the various connect criteria for the different db's. I may be mistaken, but if the app. is written correctly _and_ the different resources in the different contexts are all set up with the same names, you could even then get away with just having the one context root/appbase with the one jdbcURL context-param in web.xml. In this way, the same code would hit and serve up the different data dependent upon which port-instance of tomcat it was hitting. DISCLAIMER: I haven't tried this and I'm no tomcat expert, but I personally, at my lvl of expertise, am unaware of any reason why this wouldn't work. Hopefully, someone more knowledgeable will jump in and correct me if I'm way off base. K. David Kerber wrote: This question is part tomcat and part java; I'm running on a Windows 2000 server. I have a situation where I am going to need to run multiple instances of tomcat on a single machine, listening on different ports, but running the same application and hitting a different instance of an identical database (same schema, but on a different server). So what I will need to do is be able to tell each instance of the application on its respective instance of tomcat which database to hit. Can I pass a parameter into tomcat from a conf file based on what port that instance of tomcat is listening on, and then get that parameter into my application? If so, how? Another option is for my application to grab the machine name and port that it is handling, and hit a "common" database to get the information on what copy of the production to use. But again, I need my app to be able to find port information from tomcat, and I don't know how to do that. It seems like a 3rd option might be to run each instance of tomcat as a service, logged on with different accounts, and use a user DSN instead of a system DSN, with the same DSN name, but different connection info. Is that possible? If necessary, I could install multiple instances of my app at different context paths, but I still don't know how to tell them to pick up the correct database connection info. I guess I could make a code change in the first page they hit, the logon.jsp, for each instance, but I'd rather not have to do that unless there really is no other way, because that would be easy to screw up when making changes later on... Any suggestions as to which of the above approaches would be the best, or another one I haven't thought of? 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]
Getting tomcat instance information into webapp
This question is part tomcat and part java; I'm running on a Windows 2000 server. I have a situation where I am going to need to run multiple instances of tomcat on a single machine, listening on different ports, but running the same application and hitting a different instance of an identical database (same schema, but on a different server). So what I will need to do is be able to tell each instance of the application on its respective instance of tomcat which database to hit. Can I pass a parameter into tomcat from a conf file based on what port that instance of tomcat is listening on, and then get that parameter into my application? If so, how? Another option is for my application to grab the machine name and port that it is handling, and hit a "common" database to get the information on what copy of the production to use. But again, I need my app to be able to find port information from tomcat, and I don't know how to do that. It seems like a 3rd option might be to run each instance of tomcat as a service, logged on with different accounts, and use a user DSN instead of a system DSN, with the same DSN name, but different connection info. Is that possible? If necessary, I could install multiple instances of my app at different context paths, but I still don't know how to tell them to pick up the correct database connection info. I guess I could make a code change in the first page they hit, the logon.jsp, for each instance, but I'd rather not have to do that unless there really is no other way, because that would be easy to screw up when making changes later on... Any suggestions as to which of the above approaches would be the best, or another one I haven't thought of? Thanks! DAve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stopping users from getting a directory listing
Caldarale, Charles R wrote: From: news [mailto:[EMAIL PROTECTED] On Behalf Of Graham Reeds Subject: Stopping users from getting a directory listing What is the setting in the web.xml for stopping users from getting a directory listing? I'm pretty sure I've seen it somewhere before but I can't for the life of me find where. A brief look at the comments near the beginning of conf/web.xml would answer that question. Ahh. I was looking in the application specific web.xml for it and google searches weren't bring up much fruit. I tried copying the default servlet definitions and when that failed, the proceeding filters, to the application specific web.xml but that causes an exception to be thrown. What needs to be done (I'm a total noobie at this)? G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FAQ? shutdown.bat not killing java process on Windows
I started Tomcat using startup.bat. Everything goes fine. I use shutdown.batto bring it down. The server fields the request and shuts down a bunch of services (as evidenced by the messages I see). Sure enough, the server no longer responds to any requests. Unfortunately, the java process does not die. I have this problem whether I start Tomcat by hand or if I use the Sysdeo Eclipse plugin. This problem has been a thorn in my side for some time but since it only affects my development environment (we use it as a service in production and there are no problems) and I can kill the process by hand, I've not worried about it. It's annoying as heck though and I'm wondering if someone can shed some light. I searched around but (surprisingly!!) I didn't find anything similar to my situation.
Tomcat 5.5.9 bugs?
Greetings All Does anyone know of bugs in the 5.5.9 release of Tomcat with regards to recompiling Jsp's or incorrectly send SQL statements? The reason I ask is, I do some development of Jsp's in Dreamweaver and use the synchronization utility to synchronize my local files with the files within Tomcat. Now, after having done this and refreshing the page, or triggering the link, Tomcat still runs the old file. If I delete everything from the work directory then it recompiles the Jsp and shows the new Jsp. Also, I have a .jsp file used a resource for SQL queries. Once a page is run that calls one of these SQL queries, I continually get a SQL error that some column was not found. However, if I run the exact same query directly on the SQL server or via phpMyAdmin, the query executes successfully without any error. Any aware of these issues? Or is there something else that might be causing these problems? Thank you in advance. -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j log viewer for tomcat
lf5 regards Leon On 10/2/05, matador <[EMAIL PROTECTED]> wrote: > win200x > tomcat 5.5.9 > jdk 1.5.x > log4j 1.2.9 (i think) > > standard log4j setup with logs going into logs dir under tomcat install. > > does anyone have any recommendations for a webapp or workaround that allows > me to view these files. the obvious ways (e.g. ftp, ssh, etc) are not an > option. > > thx > > > - > 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]