RE: [ot] something similar to phps ?
cool. was showing a few folks in the office here how to set up tomcat (.net converts) and they were looking at the examples provided with the tomcat 5.0.x release. i thought, boy, this would be nice if out of the box, all the examples had some nice colour syntax highlighting, just like php does. it's a nice to have .. i'm sure i can find something out on the net with it. might help a little with people who want to switch over to java .. afterall, lots of people react nicely to colours as opposed to black on white :) On Fri, 17 Sep 2004, Shapira, Yoav wrote: Something like that is trivial to do already -- just serve the JSP with content-type text/plain from a streaming servlet like Tomcat's DefaultServlet. That's not to say something like this isn't useful: it's a nice thing to have (although it would have to be turned off on production systems, because it's a security risk). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to start the server
if ur in windows try setting your environment catalina_home=c:\your_tomcat-folder On Sat, 18 Sep 2004 22:21:53 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have 'jakarta-tomcat-4.1.27-LE-jdk14'server. When i try to startup the server i get an error message Catlina_Home environmental variable is not defined correctly. This environmental variable is needed to run this program.I have no idea how to fix this problem. Is there anybody who can help in this matter. thanks bis - 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 fine within the LAN, but invisible from without
better i give him my remaining gmail invites, hehehe On Sat, 18 Sep 2004 18:11:51 +0100, Mark Thomas [EMAIL PROTECTED] wrote: Lee, You mail server is rejecting all messages to your address because you have exceeded your quota. Hence, you will not receive any messages until this is resolved. Please note that the apache list server will eventually remove addresses from the list the consistently return delivery failure messages. Apologies to the rest of the list subscribers for this message, but I obviously can't e-mail Lee directly. Mark List Moderator -Original Message- From: Lee Hoffner [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 6:30 AM To: [EMAIL PROTECTED] Subject: Re: Tomcat fine within the LAN, but invisible from without For some reason, I'm not getting replies to my posts, although I see them at http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/ Weird! Anyway, in regard to those replies: you can also add www.mydomain.com to your hosts file to test accessing the web server within your lan, if that failed check your dns or if it resolves to a public ip then check your fw On Thu, 16 Sep 2004 13:03:14 -0700, Hassan Schroeder [EMAIL PROTECTED] wrote: Lee Hoffner wrote: I've untarred and setup Tomcat 4.1.30 on my server and can get to index.jsp just fine on my web server's 192.168.x.x:8080 address, but I get a timeout error if I try to browse to www.mydomain.com:8080. Sounds like a basic networking problem -- 1) does host/dig/nslookup resolve 'www.mydomain.com' to your address? 2) if you're really trying this from outside your LAN, what's the firewall/routing setup? (hint: try it from inside first!) HTH, -- Hassan Schroeder - [EMAIL PROTECTED] I don't have a DNS server here, just a /etc/hosts file. www.mydomain.com is listed in the hosts file at 192.168.1.5 nslookup finds www.mydomain.com at the public IP provided by my ISP. Shorewall has the rule: ActionACCEPT Source Zone Net Destination Zone Any Protocol TCP Source Ports Any Destination Ports 8080 DNAT or REDIRECT None Trying to access the domain:8080 from within this LAN results in a timeout. Trying to access the domain:8080 from an office elsewhere results in an alert that the connection was refused. I'm mystified. I'd be grateful for any help. 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]
Linking Sessions
Hi Is there a way to link a session? I have the following scenario: I have multiple domains on a server. Some links on these pages need to switch to another domain, exspecially, when I need to switch to ssl-protected sites, since all these virtual domains share the same ssl domain (one ip only). So my problem is, that inter-domain-links by default loose their session. Is is a problem. (Putting things into a shopping cart is okay, but when switching to ssl for credit card information, the cart my not be lost.) Now, I have special links, that lead to a servlet that puts every attribute of the local session into a hashmap and jumps to another special servlet on the other domain, which itself copies attributes from the hashmap back to the new session. This schema works, but it is a bottleneck in many ways. So I am searching a way to link to a KNOWN session instead if creating a new one. Is there a way for this? Regards, Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: chroot Linux 2.4.20-8 and tomcat 5.0.27
Did you install Java within or without the chroot jail? If it is without the chroot jail, it can't detect certain configuration files, with the abcense of these, it doesn't know how to initialize itself. You could either: Use the parameters for the java executable Copy the needed configuration files (property files) Install Java within the chroot jail Regards, Sjoerd Glen Ezkovich wrote: We are trying to run tomcat 5.0.27 in a chroot jail on Linux 2.4.20-8 . When we start tomcat we always get the following error message: Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location About 50% of the time its worse. Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location Java HotSpot(TM) Client VM warning: Attempt to allocate stack guard pages failed. Fatal: Stack size too small. Use 'java -Xss' to increase default stack size. We get the same error running any java application with chroot. I'm pretty sure this is because some file with important information is not available inside our chrooted file structure. Does anyone have a solution to this problem? Thanks, Glen Ezkovich HardBop Consulting glen at hard-bop.com http://www.hard-bop.com - new and improved site coming soon A Proverb for Paranoids: If they can get you asking the wrong questions, they don't have to worry about answers. - Thomas Pynchon Gravity's Rainbow - 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: chroot Linux 2.4.20-8 and tomcat 5.0.27
Sjoerd, Thanks for your input. We installed Java within the chroot jail and are still having this problem. I have no problem increasing the stack size using Xss but I have no idea what property sets the initial thread stack location or which would allow us to allocate stack guard pages. On Sep 19, 2004, at 8:06 AM, Sjoerd van Leent wrote: Did you install Java within or without the chroot jail? If it is without the chroot jail, it can't detect certain configuration files, with the abcense of these, it doesn't know how to initialize itself. You could either: Use the parameters for the java executable Copy the needed configuration files (property files) Install Java within the chroot jail Regards, Sjoerd Glen Ezkovich wrote: We are trying to run tomcat 5.0.27 in a chroot jail on Linux 2.4.20-8 . When we start tomcat we always get the following error message: Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location About 50% of the time its worse. Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location Java HotSpot(TM) Client VM warning: Attempt to allocate stack guard pages failed. Fatal: Stack size too small. Use 'java -Xss' to increase default stack size. We get the same error running any java application with chroot. I'm pretty sure this is because some file with important information is not available inside our chrooted file structure. Does anyone have a solution to this problem? Thanks, Glen Ezkovich HardBop Consulting glen at hard-bop.com http://www.hard-bop.com - new and improved site coming soon A Proverb for Paranoids: If they can get you asking the wrong questions, they don't have to worry about answers. - Thomas Pynchon Gravity's Rainbow - 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] Glen Ezkovich HardBop Consulting glen at hard-bop.com http://www.hard-bop.com - new and improved site coming soon A Proverb for Paranoids: If they can get you asking the wrong questions, they don't have to worry about answers. - Thomas Pynchon Gravity's Rainbow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: chroot Linux 2.4.20-8 and tomcat 5.0.27
Glen Ezkovich wrote: Sjoerd, Thanks for your input. We installed Java within the chroot jail and are still having this problem. I have no problem increasing the stack size using Xss but I have no idea what property sets the initial thread stack location or which would allow us to allocate stack guard pages. Just for checking, have you mounted /proc in the chroot ? It is a source of valuable information for any program running inside the jail and could explain the misbehaviour. mount -t proc /proc proc as root in the chroot Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot find server
Brian Roberts wrote: QM thanks for your reply the URL is http://127.0.0.1:8080/ . The set up wizard for tomcat server version 5 set up the software. I didn't make any adjustments to the settings. How can I check the DNS etc. as you suggested? I did try a google on that but it was difficult to find something I could try. How can I check that the tomcat server is working and is on port 8080? I think you just did, and it's not :-) If that URL entered into your browser is getting no response, then you can confirm it by using `telnet localhost 8080` to see if you get a server prompt back. I'm pretty sure you won't... When I click on snip A, forget all that wizard nonsense, matey[*1]; open a cmd window (presuming you're on Windows). Change dirs to the bin subdirectory of the directory where tomcat's installed; try to start the server in the foreground using the command catalina.bat run and use that output to determine what's (not) happening. [1] in honor of International Talk Like A Pirate Day :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to start the server
what OS are you using? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 10:21 PM Subject: unable to start the server I have 'jakarta-tomcat-4.1.27-LE-jdk14'server. When i try to startup the server i get an error message Catlina_Home environmental variable is not defined correctly. This environmental variable is needed to run this program.I have no idea how to fix this problem. Is there anybody who can help in this matter. thanks bis - 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]
Sorry, Test, please ignore
PLEASE IGNORE. Hi Some month ago I could not subscribe using my usual mail account, so I subscribed with an alternative one. Now, I test to get on the list again. Since I got a confirmation, that I am on the list using this account, I decided to send a test message. Hope, it works. Sorry, Steffen smime.p7s Description: S/MIME cryptographic signature
why is tomcat-users.xml rewritten ?
Each time tomcat is restarted the file tomcat-users.xml is rewritten. It is horrible since my umask being 0022 the file which stores passwords become world readable. Obviously this file has to be read my the server but I do not see any valuable reason to write it back opening a serious security hole. -- ___ Jean-Paul Le Fèvre * Mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: why is tomcat-users.xml rewritten ?
Hi Each time tomcat is restarted the file tomcat-users.xml is rewritten. It is horrible since my umask being 0022 the file which stores passwords become world readable. Obviously this file has to be read my the server but I do not see any valuable reason to write it back opening a serious security hole. PLEASE, search the archive of this list before mailing. This question, including some ways around it have been on the list recently. See also posting of Yoav below. Regards, Steffen -Ursprüngliche Nachricht- Von: Shapira, Yoav [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. September 2004 20:48 An: Tomcat Users List Betreff: RE: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?... Hi, However, I still wonder: 1. Why does Tomcat re-write the tomcat-users.xml file at startup? This I already answered: Tomcat rewrites the tomcat-users.xml at startup to ensure it has permissions on it, because the admin webapp must have these permissions to allow editing of user information. 2. Why does it use the umask value instead of just leaving the protections as they were before it updated the file? This is the java.io.File default behavior: we don't modify anything and don't want to have platform-specific or native code in Tomcat. If you look at the java.io.File JavaDoc, you'll see there's no portable way to control this. 3. Isn't this a problem for most Tomcat installations, since without the umask I had applied to my tomcat user, the default umask is 002, not 022, so the tomcat-users.xml file would be changed to 664, not merely 644, at each startup? Seems like the default Tomcat behavior introduces a security risk. Judging by the fact this is raised about once a year on the mailing list, I'd say the majority of people don't care. Secure installations take care with their umasks from the beginning, so for them this is not an issue. Yoav smime.p7s Description: S/MIME cryptographic signature
Re: [ot] something similar to phps ?
Syntax highlighting is an editor feature not a language feature. Ed4W at www.getsoft.com takes care of it nicely. Some of the IDEs also have this feature. On Sun, 19 Sep 2004 05:52:51 -0400 (EDT), Alex [EMAIL PROTECTED] wrote: cool. was showing a few folks in the office here how to set up tomcat (.net converts) and they were looking at the examples provided with the tomcat 5.0.x release. i thought, boy, this would be nice if out of the box, all the examples had some nice colour syntax highlighting, just like php does. it's a nice to have .. i'm sure i can find something out on the net with it. might help a little with people who want to switch over to java .. afterall, lots of people react nicely to colours as opposed to black on white :) On Fri, 17 Sep 2004, Shapira, Yoav wrote: -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: chroot Linux 2.4.20-8 and tomcat 5.0.27
Thanks Oliver, that did the trick. I had the feeling that was the directory I needed but for some reason I tried to make a new copy. What was I thinking. On Sep 19, 2004, at 9:42 AM, Olivier Jolly wrote: Just for checking, have you mounted /proc in the chroot ? It is a source of valuable information for any program running inside the jail and could explain the misbehaviour. mount -t proc /proc proc as root in the chroot Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Glen Ezkovich HardBop Consulting glen at hard-bop.com http://www.hard-bop.com - new and improved site coming soon A Proverb for Paranoids: If they can get you asking the wrong questions, they don't have to worry about answers. - Thomas Pynchon Gravity's Rainbow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
persistence after the request response cycle
Hi All, In my present set up I have a servlet serving a HTML page, the HTML page returns the form data via POST which the same servlet saves to a MySQL database. I'd like to extend the present setup so that after receiving the 1st POST data, the servlet responds with HTML page 2. HTML page 2 then returns form data via POST to the same servlet. The servlet would then save the accumulated responses from HTML pages 1 2 to the MySQL database. How can I get the servlet to remember or persist the response of HTML page 1 without writing to the database or to file. Thanks Ian ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linking Sessions
On Sun, Sep 19, 2004 at 12:58:05PM +0200, SH Solutions wrote: [post trimmed for archive's sake] : So my problem is, that inter-domain-links by default loose their session. Is : is a problem. : Now, I have special links, that lead to a servlet that puts every attribute : of the local session into a hashmap and jumps to another special servlet on : the other domain, which itself copies attributes from the hashmap back to : the new session. : : So I am searching a way to link to a KNOWN session instead if creating a new : one. : Is there a way for this? If I understand your setup, you could look into Single Sign-On. Tomcat has a special Valve for this. Search the docs/archives for details. If that doesn't work for you -- granted, there are some limitations -- you could use a shared database for intra-app data sharing. This is similar to your HashMap but lets the various domains live in physically different processes/servers. The shared DB has fewer app-level requirements than single sign-on, but still presents its own set of potential problems (performance, coordination, DB availability, etc.) -QM -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]
Re: [ot] something similar to phps ?
On Sun, Sep 19, 2004 at 05:52:51AM -0400, Alex wrote: : cool. was showing a few folks in the office here how to set up tomcat : (.net converts) and they were looking at the examples provided with the : tomcat 5.0.x release. i thought, boy, this would be nice if out of the : box, all the examples had some nice colour syntax highlighting, just like : php does. It couldn't hurt. If *you* see a need for it, that means at least one person's interested. Put the product out on the 'net for others to see, and you'll likely gain followers. ;) -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]
Re: persistence after the request response cycle
On Sun, Sep 19, 2004 at 07:25:26PM +0100, ian stone wrote: : I'd like to extend the present setup so that after : receiving the 1st POST data, the servlet responds with : HTML page 2. HTML page 2 then returns form data via : POST to the same servlet. The servlet would then save : the accumulated responses from HTML pages 1 2 to the : MySQL database. : : How can I get the servlet to remember or persist the : response of HTML page 1 without writing to the : database or to file. Skim the servlet spec for session, specifically, HttpSession. -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]
AW: Linking Sessions
Hi If I understand your setup, you could look into Single Sign-On. Tomcat has a special Valve for this. Search the docs/archives for details. Sorry, no. Single Sign-On only works on the same domain, as it requires sessions itself. If that doesn't work for you -- granted, there are some limitations -- you could use a shared database for intra-app data sharing. This is similar to your HashMap but lets the various domains live in physically different processes/servers. Actually, it is just about a single application. No intra-app or such things. Thanks anyway, Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
RE: Linking Sessions
I'm just thinking out loud here really as I don't know if this is possible. Obviously the problem you are having is that the session ID is stored in a cookie which is relevant to a particular domain, change the domain and you change the cookie so a different session. My thought would be can you create a replica of the session cookie on domain 1 with the domain 2 URL. Therefore accessing the same session. Problems I would forsee with this is, inability to fully replicate the cookie and there being more tying the session to a domain that just simply the session ID. Ta Matt -Original Message- From: Steffen Heil [mailto:[EMAIL PROTECTED] Sent: 19 September 2004 20:20 To: 'Tomcat Users List' Subject: AW: Linking Sessions Hi If I understand your setup, you could look into Single Sign-On. Tomcat has a special Valve for this. Search the docs/archives for details. Sorry, no. Single Sign-On only works on the same domain, as it requires sessions itself. If that doesn't work for you -- granted, there are some limitations -- you could use a shared database for intra-app data sharing. This is similar to your HashMap but lets the various domains live in physically different processes/servers. Actually, it is just about a single application. No intra-app or such things. Thanks anyway, Regards, Steffen Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ot] something similar to phps ?
Thanks Jarl. I appreciate that. I'll assume I didn't clarify the point I was trying to make and i'll leave it at that... On Sun, 19 Sep 2004, Jarl Skogsholm wrote: Date: Sun, 19 Sep 2004 13:34:40 -0400 From: Jarl Skogsholm [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: [ot] something similar to phps ? Syntax highlighting is an editor feature not a language feature. Ed4W at www.getsoft.com takes care of it nicely. Some of the IDEs also have this feature. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: persistence after the request response cycle
The usual mechanism for this is to persist intermediate data to a session-scope object which is persisted after all data has been accumulated. Struts provides excellent support for this pattern. -Original Message- From: ian stone [mailto:[EMAIL PROTECTED] Sent: Sun 9/19/2004 11:25 AM To: Tomcat Users List Cc: Subject:persistence after the request response cycle Hi All, In my present set up I have a servlet serving a HTML page, the HTML page returns the form data via POST which the same servlet saves to a MySQL database. I'd like to extend the present setup so that after receiving the 1st POST data, the servlet responds with HTML page 2. HTML page 2 then returns form data via POST to the same servlet. The servlet would then save the accumulated responses from HTML pages 1 2 to the MySQL database. How can I get the servlet to remember or persist the response of HTML page 1 without writing to the database or to file. Thanks Ian ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: why is tomcat-users.xml rewritten ?
I've just searched the archives and it seems that this question comes up every few months at least. The behavior of rewriting tomcat-users.xml and changing its permissions to match the Tomcat umask surprises enough people that it seems worth changing if possible. I put a lot of faith in the principal of least astonishment. My understanding is that the only reason for the rewrite is to confirm that the Tomcat admin app will have write access to the tomcat-users.xml file if the admin app is ever used. Two questions: 1. Why not use java.io.File.canWrite()? It confirms the ability to rewrite the file without actually doing so. Works fine on both Linux and Windows 2000, so I assume it is a fully portable solution. 2. Couldn't the rewrite be deferred until necessary? Perhaps when the admin app accepts a valid login? Or when a user tries to use the admin app to modify the tomcat-users.xml file? Why check so far in advance? There is always the risk that the permissions could be modified manually after the check at startup, and before the admin app actually needs to write, so the admin app must be prepared for failure anyhow. Why not just have it check when it needs to and report the error to the user then? --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- Steffen Heil wrote: Hi Each time tomcat is restarted the file tomcat-users.xml is rewritten. It is horrible since my umask being 0022 the file which stores passwords become world readable. Obviously this file has to be read my the server but I do not see any valuable reason to write it back opening a serious security hole. PLEASE, search the archive of this list before mailing. This question, including some ways around it have been on the list recently. See also posting of Yoav below. Regards, Steffen -Ursprüngliche Nachricht- Von: Shapira, Yoav [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. September 2004 20:48 An: Tomcat Users List Betreff: RE: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?... Hi, However, I still wonder: 1. Why does Tomcat re-write the tomcat-users.xml file at startup? This I already answered: Tomcat rewrites the tomcat-users.xml at startup to ensure it has permissions on it, because the admin webapp must have these permissions to allow editing of user information. 2. Why does it use the umask value instead of just leaving the protections as they were before it updated the file? This is the java.io.File default behavior: we don't modify anything and don't want to have platform-specific or native code in Tomcat. If you look at the java.io.File JavaDoc, you'll see there's no portable way to control this. 3. Isn't this a problem for most Tomcat installations, since without the umask I had applied to my tomcat user, the default umask is 002, not 022, so the tomcat-users.xml file would be changed to 664, not merely 644, at each startup? Seems like the default Tomcat behavior introduces a security risk. Judging by the fact this is raised about once a year on the mailing list, I'd say the majority of people don't care. Secure installations take care with their umasks from the beginning, so for them this is not an issue. Yoav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
linux, tomcat5, jsvc, chroot and jsvc error:Invalid user name 'nobody' specified
I'm trying to run tomcat in chroot jail using jsvc. I can run tomcat inside chroot by its self without any problems. I also can run tomcat using jsvc as various users outside of chroot. When I attempt to run tomcat with jsvc inside of a chroot jail, I get the folowing error message: jsvc error: Invalid user name 'named' specified No mater what user I specify I get the same error message. I assume that jsvc is getting an error when changing the processes uid. Obviously, I am missing user information inside my jail. I've tried adding copies of /etc/group, /etc/passwd and /etc/shadow but that didn't work. (not really surprised). So, how are users verified and what do I need to do to get them rcognized in the chroot jail? Glen Ezkovich HardBop Consulting glen at hard-bop.com http://www.hard-bop.com - new and improved site coming soon A Proverb for Paranoids: If they can get you asking the wrong questions, they don't have to worry about answers. - Thomas Pynchon Gravity's Rainbow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: persistence after the request response cycle
The other common approach is to re-send the data for page 1 as hidden form fields with the page 2 form submission. That way, the second time the servlet is executed, it is getting all the required data as part of request. As a general rule (which is broken often for one reason or another!), if the amount of data is somewhat large (or could be, like a textarea's entry perhaps), then session tends to be frowned upon because it becomes a performance concern and a potential problem in a distributed environment. But if the size is small, session makes life easier, but be aware that server resources are being eaten with sessions, therefore if you envision a rather large client load, it can become an issue (but this tends to be solvable just by throwing hardware at the problem most of the time). -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Sun, September 19, 2004 6:02 pm, Craig Berry said: The usual mechanism for this is to persist intermediate data to a session-scope object which is persisted after all data has been accumulated. Struts provides excellent support for this pattern. -Original Message- From: ian stone [mailto:[EMAIL PROTECTED] Sent: Sun 9/19/2004 11:25 AM To: Tomcat Users List Cc: Subject: persistence after the request response cycle Hi All, In my present set up I have a servlet serving a HTML page, the HTML page returns the form data via POST which the same servlet saves to a MySQL database. I'd like to extend the present setup so that after receiving the 1st POST data, the servlet responds with HTML page 2. HTML page 2 then returns form data via POST to the same servlet. The servlet would then save the accumulated responses from HTML pages 1 2 to the MySQL database. How can I get the servlet to remember or persist the response of HTML page 1 without writing to the database or to file. Thanks Ian ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.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: linux, tomcat5, jsvc, chroot and jsvc error:Invalid user name 'nobody' specified
On Sun, Sep 19, 2004 at 05:24:02PM -0500, Glen Ezkovich wrote: : I'm trying to run tomcat in chroot jail using jsvc. I can run tomcat : inside chroot by its self without any problems. I also can run tomcat : using jsvc as various users outside of chroot. When I attempt to run : tomcat with jsvc inside of a chroot jail, I get the folowing error : message: : : jsvc error: Invalid user name 'named' specified : [snip] : Obviously, I am missing user information inside my jail. I've tried : adding copies of /etc/group, /etc/passwd and /etc/shadow but that : didn't work. (not really surprised). There's more to recognizing user info than just passwd and shadow; apps these days make calls through system libraries rather than process those files directly. Start with {chroot}/etc/nsswitch.conf: what's in there? In turn, the calls that load nsswitch.conf will likely involve a trip through the resolver libraries (/lib/libnss_*)... You could start there and see what else comes up. I've found it invaluable to (temporarily) install strace under the chroot area to see what files programs try to open behind the scenes. -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]
Re: AW: why is tomcat-users.xml rewritten ?
On Sun, Sep 19, 2004 at 06:19:57PM -0400, Fred Stluka wrote: : I've just searched the archives and it seems that this question : comes up every few months at least. The behavior of rewriting : tomcat-users.xml and changing its permissions to match the : Tomcat umask surprises enough people that it seems worth : changing if possible. I put a lot of faith in the principal of : least astonishment. True, but what's the purpose of the MemoryRealm? Is it meant for production use, where this file rewrite/perms issue could be a problem? I always took MemoryRealm for a basic Realm implmentation: test how Realms work without adding database/LDAP debubbing to the mix; and mine it for sample Realm code. If the Manager app's user-management feature works with JDBC, give HSQLDB [1] + JDBCRealm a try. You could lock the user/password info in a file accessible only to the Tomcat user, and not have to worry about the Manager app handling file perms. As an added bonus, you could deploy your webapp as a WAR file. [1] = HSQLDB: on-disk/in-memory, JDBC-compliant database written in Java. http://hsqldb.sourceforge.net/ -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]
Tomcat vs BEA Weblogic?
I am taking over a project that's running on Weblogic 8.1 SP3 today.. They are only using the jsp-container and it is time to renew the support agreement with BEA. So I was just wondering, is it worth it? Or is Tomcat as good as WL or maybe better? Does WL have features that is missing in Tomcat? When the time comes to use EJB, is JBoss as good as/better than WL? So basically, I would like some advice on why I should/shouldn't continue with Weblogic? :) Regards, BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED] --- Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs BEA Weblogic?
The one comment I would make is that with BEA, you have a certain degree of accountability that you don't have with an open-source product. That can be important in a business environment. I'm probably starting a religious war by posting this, but to some companies it is frankly more important to have someone that's on the hook for problems that arise (and ultimately someone that is legally liable should it really go bad), and you just don't have that with an open-source project. This may or may not be important in your environment, and to be sure there are plenty of advantages that OSS has over commercial offerings and you need to weigh those against the downside(s). I'm not sure I can really comment in terms of how they compare from a technological standpoint. I can tell you that WebLogic is a very robust platform (having previously had some apps running on it), and one benefit that you might see is that having all the various pieces coming from the same vendor might make it more stable (think BEA vs. Tomcat w/JBoss and Axis all pieced together). This isn't necasserily true, but could be. On the flip side, all that functionality comes at the price of added complexity. Tomcat really is very simple to get going with and to administer and tune, and if it has all the functionality you need, this can be a boon to your work. I do have one app hosted on Tomcat. It's what I would call a low-to-mid-size app load-wise (around 75 concurrent users at any given time, on the order of 5,000 requests per day). Tomcat gives us fantastic performance with that load, so my guess it that it will scale quite a bit further. The other thing to be careful about, since you said you are inheriting this app, is if the programmers did anything that is WL-specific that you'd have to deal with to convert. If there's nothing, the decision is in some ways harder because you can justify Tomcat a little bit easier (on cost if nothing else). If there's ANYTHING that's WL-specific, if I were in your shoes, I'd probably stick with WL, just to try and minimize any problems I might get blamed for. It might be tough to figure out if there's anything that might be a problem or not, so possibly it's better to play it safe. In short, I'm a big fan of Tomcat, I use it exclusively during development and use it in production as well, but since you have an existing app already running on WL, and since it is a business environment, all things considered, I'd tend towards the side of sticking with WL. Especially if your company doesn't have a problem with the price, I think my lean would increase! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Sun, September 19, 2004 7:31 pm, Bjørn T Johansen said: I am taking over a project that's running on Weblogic 8.1 SP3 today.. They are only using the jsp-container and it is time to renew the support agreement with BEA. So I was just wondering, is it worth it? Or is Tomcat as good as WL or maybe better? Does WL have features that is missing in Tomcat? When the time comes to use EJB, is JBoss as good as/better than WL? So basically, I would like some advice on why I should/shouldn't continue with Weblogic? :) Regards, BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED] --- Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows --- - 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 vs BEA Weblogic?
JBOSS is as good as any EJB container out there on the market, if not better. The only different is support. You have to pay BEA a small fortune for support and they will help you every step of the way. On the other hand, if you use JBOSS, you are pretty much on your own. Although you can hire the JBOSS consulting team to assist you, but you have to have a team of developers/admin in-house who are very knowledgeable and know what they are doing. Hope this helps. -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:32 PM To: Tomcat Users List Subject: Tomcat vs BEA Weblogic? I am taking over a project that's running on Weblogic 8.1 SP3 today.. They are only using the jsp-container and it is time to renew the support agreement with BEA. So I was just wondering, is it worth it? Or is Tomcat as good as WL or maybe better? Does WL have features that is missing in Tomcat? When the time comes to use EJB, is JBoss as good as/better than WL? So basically, I would like some advice on why I should/shouldn't continue with Weblogic? :) Regards, BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED] --- Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows --- - 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 vs BEA Weblogic?
I have to agree with epyonne. JBoss has lousy documentation doesn't have good support. Tomcat is a very fine JSP/Servlet container. There isn't anything it can't do. -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 4:32 PM To: Tomcat Users List Subject: Tomcat vs BEA Weblogic? I am taking over a project that's running on Weblogic 8.1 SP3 today.. They are only using the jsp-container and it is time to renew the support agreement with BEA. So I was just wondering, is it worth it? Or is Tomcat as good as WL or maybe better? Does WL have features that is missing in Tomcat? When the time comes to use EJB, is JBoss as good as/better than WL? So basically, I would like some advice on why I should/shouldn't continue with Weblogic? :) Regards, BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED] --- Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows --- - 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 vs BEA Weblogic?
as long as you know what you are doing and understand every aspect of the software you will be using, you wont need any support from any vendor. at least thats what i understand from using tomcat vs bea. On Sun, 19 Sep 2004 19:09:46 -0500, epyonne [EMAIL PROTECTED] wrote: JBOSS is as good as any EJB container out there on the market, if not better. The only different is support. You have to pay BEA a small fortune for support and they will help you every step of the way. On the other hand, if you use JBOSS, you are pretty much on your own. Although you can hire the JBOSS consulting team to assist you, but you have to have a team of developers/admin in-house who are very knowledgeable and know what they are doing. Hope this helps. -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:32 PM To: Tomcat Users List Subject: Tomcat vs BEA Weblogic? I am taking over a project that's running on Weblogic 8.1 SP3 today.. They are only using the jsp-container and it is time to renew the support agreement with BEA. So I was just wondering, is it worth it? Or is Tomcat as good as WL or maybe better? Does WL have features that is missing in Tomcat? When the time comes to use EJB, is JBoss as good as/better than WL? So basically, I would like some advice on why I should/shouldn't continue with Weblogic? :) Regards, BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED] --- Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows --- - 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 vs BEA Weblogic?
Not so when going to a full blown application server vs a JSP/Servlet container. I've worked with iPlanet, Sun's application Server(built on iPlanet) JBoss. JBoss is a PIA when compared. Poor documentations few resources. -Original Message- From: Big Chiz [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 5:42 PM To: Tomcat Users List Subject: Re: Tomcat vs BEA Weblogic? as long as you know what you are doing and understand every aspect of the software you will be using, you wont need any support from any vendor. at least thats what i understand from using tomcat vs bea. On Sun, 19 Sep 2004 19:09:46 -0500, epyonne [EMAIL PROTECTED] wrote: JBOSS is as good as any EJB container out there on the market, if not better. The only different is support. You have to pay BEA a small fortune for support and they will help you every step of the way. On the other hand, if you use JBOSS, you are pretty much on your own. Although you can hire the JBOSS consulting team to assist you, but you have to have a team of developers/admin in-house who are very knowledgeable and know what they are doing. Hope this helps. -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:32 PM To: Tomcat Users List Subject: Tomcat vs BEA Weblogic? I am taking over a project that's running on Weblogic 8.1 SP3 today.. They are only using the jsp-container and it is time to renew the support agreement with BEA. So I was just wondering, is it worth it? Or is Tomcat as good as WL or maybe better? Does WL have features that is missing in Tomcat? When the time comes to use EJB, is JBoss as good as/better than WL? So basically, I would like some advice on why I should/shouldn't continue with Weblogic? :) Regards, BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED] --- Someone wrote: I understand that if you play a Windows CD backwards you hear strange Satanic messages To which someone replied: It's even worse than that; play it forwards and it installs Windows --- - 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]
Re: Tomcat vs BEA Weblogic?
On Mon, Sep 20, 2004 at 01:31:52AM +0200, Bj?rn T Johansen wrote: : So basically, I would like some advice on why I should/shouldn't continue : with Weblogic? :) I've used Tomcat and Weblogic, and can offer a brief comparison: 1/ Co$t. You can't beat Tomcat's price. WL licensing is based on the number of CPUs in the machine. (Doesn't sound too bad until you have 40+ CPUs involved. ;) 2/ Spec compliance/upkeep: Tomcat 5.x implements servlet spec 2.4, while (IIRC) Weblogic 8.1 is still 2.3. Granted, BEA has several reasons to take the Corporate slow and steady Pace; but it's nice that I can use the servlet 2.4/JSP 2.0 features *now* instead of waiting. 3/ Clustering: Weblogic wins here, not so much because WL clustering is any better but because it's been tried and tested. I've been using WL clusters for more than 4 years now, since v5.1. By comparison, Tomcat clustering appeared in v5.0 (last year, was it?) so it hasn't experienced nearly as much road-testing. 4/ Webserver connectivity: I've never had a problem with mod_jk; but based on list posts, I'm the pathological case. (The ratio of jk flaws vs pilot error is beyond me.) Setting up the Weblogic Proxy Plugin was a complete no-brainer, vs mod_jk which was a partial no_brainer. 5/ All-In-One package: What are your long-term app dev goals? WL provides EJB and other features out of the box. As others have mentioned, doing that with Tomcat involves adding other products to the mix, which can slow down a pre-product RD effort. 6/ Hand-holding: for a fee, BEA can send a pro-serv team to your site and/or provide training. There is no official (Apache-based) Tomcat consulting/pro-serv, as far as I know. While unofficial services are certainly available, you'd have to shop around, check credentials, etc. That said, don't let the open source vs vended labels fool you. The support models aren't too different as long as you don't deviate too far from the norm with your app/setup, and you're conservative about upgrades. What you really have to worry about is in it for the long run vs fly-by-night; and neither Tomcat nor Weblogic show any signs of disappearing for the forseeable future. -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]
Re: cannot find server
Hassan Schroeder Shiver me timbers, me cocky just fell off its perch.[1] Thanks Hassan, I love it when you talk command line. Yep I tried 'catalina.bat run' at the bin directory of tomcat and the reply was. 'catalina.bat' not recognized as an internal or external command, operable program or batch file I think version 5 is a lot different from version 4. I've tried to install both version without success. At different times but I'm trying to get the most recent one up. I appreciate your help and would still like further input from anyone. I'm determined to get the little blighter going. For anyone else I'm trying without success at getting the server (version 5 )running and opening the welcome page. Thank you Brian Roberts [1] make that 2 days. At 07:50 AM 19/09/2004 -0700, you wrote: Brian Roberts wrote: QM thanks for your reply the URL is http://127.0.0.1:8080/ . The set up wizard for tomcat server version 5 set up the software. I didn't make any adjustments to the settings. How can I check the DNS etc. as you suggested? I did try a google on that but it was difficult to find something I could try. How can I check that the tomcat server is working and is on port 8080? I think you just did, and it's not :-) If that URL entered into your browser is getting no response, then you can confirm it by using `telnet localhost 8080` to see if you get a server prompt back. I'm pretty sure you won't... When I click on snip A, forget all that wizard nonsense, matey[*1]; open a cmd window (presuming you're on Windows). Change dirs to the bin subdirectory of the directory where tomcat's installed; try to start the server in the foreground using the command catalina.bat run and use that output to determine what's (not) happening. [1] in honor of International Talk Like A Pirate Day :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] See you later, Brian Roberts - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: unable to start the server
Thank you for your suggestion. My operating system is windows 98. What i have sets so far in my autoexec file are JAVA_HOME variable and class path(my installed directory\common\lib\servlet.jar). After receiving your mail I set CATALINA_HOME=c:\my installed directory in my autoexec file but I am receiving the same error message. Any further suggestion/advice is highly appreciated. Bis From: Big Chiz [EMAIL PROTECTED] Date: 2004/09/19 Sun AM 06:34:55 EST To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: unable to start the server if ur in windows try setting your environment catalina_home=c:\your_tomcat-folder On Sat, 18 Sep 2004 22:21:53 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have 'jakarta-tomcat-4.1.27-LE-jdk14'server. When i try to startup the server i get an error message Catlina_Home environmental variable is not defined correctly. This environmental variable is needed to run this program.I have no idea how to fix this problem. Is there anybody who can help in this matter. thanks bis - 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: Re: unable to start the server
I am using windows 98. Any suggestion or advice is highly appreciated. Bis From: [EMAIL PROTECTED] Date: 2004/09/19 Sun AM 10:57:24 EST To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: unable to start the server what OS are you using? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 10:21 PM Subject: unable to start the server I have 'jakarta-tomcat-4.1.27-LE-jdk14'server. When i try to startup the server i get an error message Catlina_Home environmental variable is not defined correctly. This environmental variable is needed to run this program.I have no idea how to fix this problem. Is there anybody who can help in this matter. thanks bis - 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]
session-timeout is out by factor of 100?
Hi, Is anyone successfully using the web.xml session timeout configuration with Tomcat 5.0.25? Testing seems to indicate that this setting is out by a factor of 100 however using session.setMaxInactiveInterval seems to yield the desired result. E.g. Printing the time remaining (in ms) in a session when using: session.setMaxInactiveInterval(180) // 3 min in seconds --- presents 179226 == ~3 min however, setting session-config session-timeout5/session-timeout /session-config --- presents 29992101 == ~500min Thanks, PJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Basic Action Question (I need more sets of eyes)
Hi I've been staring at this for a while and I can't see what's wrong. Maybe one of you can help me out. I'm trying to create a basic login form. The form validation part is working (comes back and tells me that uid or pw has to be entered if I neglected to) but it SEEMS that the LoginAction.execute() is not getting called. When I click login with username and password filled out, I get sent to a blank screen with minimal html. Help Could it be a problem with my deployment? Am I missing something else? Note that I do in fact have success.jsp and error.jsp in a subdirectory /pages Here are the parts that seem to not be working. This should be a really simple thing, no? I'd even send my WAR file to get some help at this point.. // * Action Class package com.blah.login; import javax.servlet.http.*; import org.apache.struts.action.*; public final class LoginAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ System.out.println(Text that is never seen); LoginForm f = (LoginForm) form; String userName=f.getUserName(); String password = f.getPassword(); // Will implement real PW checking when this is working :-( if(userName.equals(admin) password.equals(admin123)){ return (mapping.findForward(success)); }else{ return (mapping.findForward(failure)); } } } // !-Login.jsp -- %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html headtitleYale New Haven Health Services/title/head body h3YNHHS Login Page/h3 html:errors/ html:form action=login.do User Name:html:text property=userName/br Password:html:password property=password/br html:submit/ /html:form /body /html // Struts Config.xml * !-- == Form Bean Definitions -- form-beans form-bean name=loginForm type=com.ynhhs.login.LoginForm/ /form-beans !-- Action Mapping Definitions -- action-mappings !--Action Mappings for Login-- action path=/login type=com.ynhhs.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/pages/success.jsp/ forward name=failure path=/pages/error.jsp/ /action /action-mappings // The weird nothing HTML page I end up at after loggin in !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML
Re: Basic Action Question (I need more sets of eyes)
John Mattos wrote: Hi I've been staring at this for a while and I can't see what's wrong. Maybe one of you can help me out. I'm trying to create a basic login form. The form validation part is working (comes back and tells me that uid or pw has to be entered if I neglected to) but it SEEMS that the LoginAction.execute() is not getting called. When I click login with username and password filled out, I get sent to a blank screen with minimal html. Help Could it be a problem with my deployment? Am I missing something else? Note that I do in fact have success.jsp and error.jsp in a subdirectory /pages Here are the parts that seem to not be working. This should be a really simple thing, no? I'd even send my WAR file to get some help at this point.. // * Action Class package com.blah.login; import javax.servlet.http.*; import org.apache.struts.action.*; public final class LoginAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ System.out.println(Text that is never seen); LoginForm f = (LoginForm) form; String userName=f.getUserName(); String password = f.getPassword(); // Will implement real PW checking when this is working :-( if(userName.equals(admin) password.equals(admin123)){ return (mapping.findForward(success)); }else{ return (mapping.findForward(failure)); } } } // !-Login.jsp -- %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html headtitleYale New Haven Health Services/title/head body h3YNHHS Login Page/h3 html:errors/ html:form action=login.do User Name:html:text property=userName/br Password:html:password property=password/br html:submit/ /html:form /body /html // Struts Config.xml * !-- == Form Bean Definitions -- form-beans form-bean name=loginForm type=com.ynhhs.login.LoginForm/ /form-beans !-- Action Mapping Definitions -- action-mappings !--Action Mappings for Login-- action path=/login type=com.ynhhs.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/pages/success.jsp/ forward name=failure path=/pages/error.jsp/ /action /action-mappings // The weird nothing HTML page I end up at after loggin in !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML I would suggest that you debug the content of your ActionForward before it is returned. My guess is that is the problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Basic Action Question (I need more sets of eyes) - ignore please.
Man, I'm obviously tired. Please ignore that email. Wrong list. Oops!