Re: Accessing resource in WEB-INF outside servlet
I am not sure where this discussion is coming from or going, but I have no difficulty with reading resources inside WEB-INF. First, I use a Classpath class and the given classloaders something like the following: package com.whatever.classpath; public final class Classpath { public static final String HERE = Classpath. class. getClassLoader(). getResource("com" + File.separator + "whatever" + File.separator + "classpath" + File.separator + "Classpath.class").getFile(); } Other classes can then use this class and HERE as well as other paths such as CLASSES, MESSAGES, or whatever, inside WEB-INF. Is this helpful? Jack On Sun, 07 Nov 2004 16:50:37 +0100, Morkeleb <[EMAIL PROTECTED]> wrote: > Hi. > > I have a file in WEB-INF which I want to access. > However, this is done in a static class which is not a servlet, > so I do not have the servlet context. > > Is there a way to access the servlet context non the less? > Is there a way to make getResource find the file anyway? > > I know a resource is found when it's in /WEB-INF/classes, > but it is only in /WEB-INF/ and it is not an option to move > it to the classes directory. > > Can you help me? > Thanx in Advance, > Lukas Österreicher > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FAIL - No context exists for path /blog
I thought I would do a quick little test on a roller blog. So I just popped the application into webapps and thought I would give it a little whirl. No whirl! I got a 503 error and when I tried to start it with manager?path=/blog, I got the error message in the Subject line of this email. I have no context defined in my server.xml because I run my existing app as ROOT. What's up and what do I need to do? Jack -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FAIL - No context exists for path /blog
Thanks for the quick turnaround, Yoav. There is no error in the logs. All that is in the logs is: StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] StandardContext[/manager]Manager: init: Associated with Deployer 'localhost' StandardContext[/manager]Manager: init: Global resources are available StandardContext[/manager]Manager: start: Starting web application at '/blog' StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] StandardContext[/manager]Manager: init: Associated with Deployer 'localhost' StandardContext[/manager]Manager: init: Global resources are available StandardContext[/manager]Manager: start: Starting web application at '/blog' Odd? Jack On Mon, 22 Nov 2004 12:30:58 -0500, Shapira, Yoav <[EMAIL PROTECTED]> wrote: > > Hi, > If the startup fails with a 500-class error, one thing that's pointless > is to try starting it up again ;) Instead, look at your logs to see the > cause for the error, and fix it. Until then there's nothing to start, > stop, or restart. > > If you're unsure what to do after looking at the log, post it here and > we can try to help. > > Yoav Shapira http://www.yoavshapira.com > > > > > >-Original Message- > >From: Dakota Jack [mailto:[EMAIL PROTECTED] > >Sent: Monday, November 22, 2004 12:27 PM > >To: Tomcat Users List > >Subject: FAIL - No context exists for path /blog > > > >I thought I would do a quick little test on a roller blog. So I just > >popped the application into webapps and thought I would give it a > >little whirl. No whirl! I got a 503 error and when I tried to start > >it with manager?path=/blog, I got the error message in the Subject > >line of this email. I have no context defined in my server.xml > >because I run my existing app as ROOT. > > > >What's up and what do I need to do? > > > >Jack > > > > > >-- > > > > > >"You can't wake a person who is pretending to be asleep." > > > >~Native Proverb~ > > > >"Each man is good in His sight. It is not necessary for eagles to be > >crows." > > > >~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, proprietary > and/or privileged. This e-mail is intended only for the individual(s) to > whom it is addressed, and may not be saved, copied, printed, disclosed or > used by anyone else. If you are not the(an) intended recipient, please > immediately delete this e-mail from your computer system and notify the > sender. Thank you. > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FAIL - No context exists for path /blog
I am running Tomcat 5.0, by the way on a Presario 2500 PC desktop with Windows XP. Jack On Mon, 22 Nov 2004 12:30:58 -0500, Shapira, Yoav <[EMAIL PROTECTED]> wrote: > > Hi, > If the startup fails with a 500-class error, one thing that's pointless > is to try starting it up again ;) Instead, look at your logs to see the > cause for the error, and fix it. Until then there's nothing to start, > stop, or restart. > > If you're unsure what to do after looking at the log, post it here and > we can try to help. > > Yoav Shapira http://www.yoavshapira.com > > > > > >-Original Message- > >From: Dakota Jack [mailto:[EMAIL PROTECTED] > >Sent: Monday, November 22, 2004 12:27 PM > >To: Tomcat Users List > >Subject: FAIL - No context exists for path /blog > > > >I thought I would do a quick little test on a roller blog. So I just > >popped the application into webapps and thought I would give it a > >little whirl. No whirl! I got a 503 error and when I tried to start > >it with manager?path=/blog, I got the error message in the Subject > >line of this email. I have no context defined in my server.xml > >because I run my existing app as ROOT. > > > >What's up and what do I need to do? > > > >Jack > > > > > >-- > > > > > >"You can't wake a person who is pretending to be asleep." > > > >~Native Proverb~ > > > >"Each man is good in His sight. It is not necessary for eagles to be > >crows." > > > >~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, proprietary > and/or privileged. This e-mail is intended only for the individual(s) to > whom it is addressed, and may not be saved, copied, printed, disclosed or > used by anyone else. If you are not the(an) intended recipient, please > immediately delete this e-mail from your computer system and notify the > sender. Thank you. > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FAIL - No context exists for path /blog
I was using roller .98. I switched to the RC 1.0 and have no trouble. I followed all installation instructions previously. I'm moving on with 1.0 and will grab the final when it comes. Thanks for your time, Yoav. Still wondering about the logging. If you happen to come up with a theory on what happened, let me know. Jack On Mon, 22 Nov 2004 13:00:47 -0500, Shapira, Yoav <[EMAIL PROTECTED]> wrote: > > Hi, > Yeah, I'd classify that as "odd" and beyond. A 500-class error, > specifically a 503, is an UnavailableException. Tomcat always logs > those and their root cause, precisely because they're a dead-end as > you've noticed. > > The Roller installation instructions call for Tomcat and work for me: > http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuide. > Try following them, starting with a clean install from scratch. > > > > Yoav Shapira http://www.yoavshapira.com > > >-Original Message- > >From: Dakota Jack [mailto:[EMAIL PROTECTED] > >Sent: Monday, November 22, 2004 12:37 PM > >To: Shapira, Yoav > >Cc: Tomcat Users List > >Subject: Re: FAIL - No context exists for path /blog > > > >Thanks for the quick turnaround, Yoav. There is no error in the logs. > > All that is in the logs is: > > > >StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: > >init(): ruleChain: [org.apache.webapp.balancer.RuleChain: > >[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: > >News / Redirect URL: http://www.cnn.com], > >[org.apache.webapp.balancer.rules.RequestParameterRule: Target param > >name: paramName / Target param value: paramValue / Redirect URL: > >http://www.yahoo.com], > >[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: > >http://jakarta.apache.org]] > >StandardContext[/manager]Manager: init: Associated with Deployer > >'localhost' > >StandardContext[/manager]Manager: init: Global resources are available > >StandardContext[/manager]Manager: start: Starting web application at > >'/blog' > >StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: > >init(): ruleChain: [org.apache.webapp.balancer.RuleChain: > >[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: > >News / Redirect URL: http://www.cnn.com], > >[org.apache.webapp.balancer.rules.RequestParameterRule: Target param > >name: paramName / Target param value: paramValue / Redirect URL: > >http://www.yahoo.com], > >[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: > >http://jakarta.apache.org]] > >StandardContext[/manager]Manager: init: Associated with Deployer > >'localhost' > >StandardContext[/manager]Manager: init: Global resources are available > >StandardContext[/manager]Manager: start: Starting web application at > >'/blog' > > > >Odd? > > > >Jack > > > > > >On Mon, 22 Nov 2004 12:30:58 -0500, Shapira, Yoav > <[EMAIL PROTECTED]> > >wrote: > >> > >> Hi, > >> If the startup fails with a 500-class error, one thing that's > pointless > >> is to try starting it up again ;) Instead, look at your logs to see > the > >> cause for the error, and fix it. Until then there's nothing to > start, > >> stop, or restart. > >> > >> If you're unsure what to do after looking at the log, post it here > and > >> we can try to help. > >> > >> Yoav Shapira http://www.yoavshapira.com > >> > >> > >> > >> > >> >-Original Message- > >> >From: Dakota Jack [mailto:[EMAIL PROTECTED] > >> >Sent: Monday, November 22, 2004 12:27 PM > >> >To: Tomcat Users List > >> >Subject: FAIL - No context exists for path /blog > >> > > >> >I thought I would do a quick little test on a roller blog. So I > just > >> >popped the application into webapps and thought I would give it a > >> >little whirl. No whirl! I got a 503 error and when I tried to > start > >> >it with manager?path=/blog, I got the error message in the Subject > >> >line of this email. I have no context defined in my server.xml > >> >because I run my existing app as ROOT. > >> > > >> >What's up and what do I need to do? > >> > > >> >Jack > >> > > >> > > >> >-- > >> > > >> > > >> >"You can't wake a person who is pretending to be asleep."
Re: Re: Can I send response to browser even after the doGet returned?
Why do you want to put the request in the queque? I do something similar in a messaging application that runs in the background. I have the message related matters bundled in an interface called Message that is passed to the multithreaded queque. Is there an advantage to passing the request to the queque instead of something engineered to handle that task? I guess I have Frank's question: why, why, why? ;-) Jack On Sat, 27 Nov 2004 13:28:31 +0530, Santhosh Thomas <[EMAIL PROTECTED]> wrote: > >Or, are you trying to run some long-running process and think it would > >be better off as it's own thread? If that's the case, you probably want > >to look into some sort of queueing mechanism with either status polling > >or some sort of callback when the task is complete. Again, more details > >would be helpful. > > No my process is not time consuming. It will finish in milliseconds and in > the worst case can take a few seconds. I am not spawning a thread from each > servlet request, but the request processor is another independent > thread(started at web init) proecssing a queue of requests. I am only > putting the request into the queue from doGet(). After putting into queue, > the doGet() returns. The request processor thread then forms the response > and tries to flush the output later. My experience is, sometimes I get the > output in the browser, sometimes not. I thought it was a broser catching > problem (I am not sure..). > I cant do a polling in the servlet, bacause it will block my servlet. > > Has there any way to implement asynchronous request/response using servlets? > > thanks and regards > Santhosh > > - > > > Couple of things... > > No, I don't believe you can do anything with request/response after you > exit doGet(). Well, let me amend that... you MIGHT be able to get away > with it, but I wouldn't expect it to work all the time. What I mean is, > once your servlet is done it's work, the container takes over again, and > even if you do have a valid reference to the object, I wouldn't expect > that you could make any safe assumptions about the state of that object. > You might get away with it sometimes, but probably not every request. > > The other point I wanted to make is that there is a pretty standard rule > against spawning threads to service requests. Simply stated, you aren't > supposed to do it. The container is supposed to spawn threads as > appropriate to service requests, and if your doing it on your own you > are more or less "competing" with the container. Bad Things (tm) tend > to happen under those circumstances. > > I'm not really sure what you are trying to accomplish, but I'm taking a > guess that you think that by spawning the threads you will be able to > handle more requests concurrently. If that's not the case, please > explain you goals further. > > But, assuming that is correct, I think you may have a fundamental > misunderstanding at work... A servlet is supposed to be thread-safe, and > the reason for that is that the container will spawn as many instances > of it as needed to service requests (to whatever configured limits there > are of course). In other words, every request essentially has it's own > thread executing your servlet, hence the need for it to be thread-safe. > > In other words, you spwaning threads is superfluous because the > container is already doing essentially what your trying to do on your > own. So, just make sure your code is thread-safe, and your fine. > > Or, are you trying to run some long-running process and think it would > be better off as it's own thread? If that's the case, you probably want > to look into some sort of queueing mechanism with either status polling > or some sort of callback when the task is complete. Again, more details > would be helpful. > > As I said, I'm making assumptions here, so I could be completely wrong! > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > Santhosh Thomas wrote: > > > > > > Hi > > > > I know this is a basic question. I am passing the request and response > > object to another thread from the doGet() and after that the Get method > > returns. So that the processing is done in the thread and response to > > client will be flushed later. But by that time the servlet method would > > have returned. My question is, is it possible to flush the output to the > > client even after the servlet method returned (or response is commited) by > > tomcat. I am not talking about any server push but it is a simple http > > question. > > > > If http does not support this, how can I implement this? can i do this by > > extending the generic servlet instead of HttpServlet? > > > > Any help is greatly appreciated > > > > thanks and regards > > Boolee > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Eac
Service Not Starting Up with Start bar icon but only with a reboot
I built an application running in Tomcat 5.0 which starts up as a service. I built it on my laptop and it runs fine. When I shutdown Tomcat, I can just hit the icon on the Start menu and things start right up again. However, when I move this to a standalone machine it works when I start up the machine. And, if I stop Tomcat it shows that hitting the icon on the Start button starts up the service. However, hitting the icon won't start Tomcat. If I restart the machine it will restart Tomcat however. Any ideas? Do I need to provide any more information? There is nothing in the logs. Jack -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Service Not Starting Up with Start bar icon but only with a reboot
Hi, Doug, I am talking about the regular Tomcat logs. If that is not what you mean, then I am not aware of the "windows logs". Where are they? My server.xml is: factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml Jack On Mon, 6 Dec 2004 07:15:59 -0500, Parsons Technical Services <[EMAIL PROTECTED]> wrote: > Jack, > > > However, hitting the icon won't start Tomcat. If I restart the > > machine it will restart Tomcat however. > > > > Have you tried starting it from the services window? > > > Any ideas? Do I need to provide any more information? There is > > nothing in the logs. > > > > Which logs? Have you looked in the windows logs and do you have then > enabled? > > Doug > www.parsonstechnical.com > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat mailing list is full of non tomcat topics
Hi, Roberto, Understanding a problem before solving it is good policy, I think. If the problem is noise (and I don't thnk so) on the list, then maybe the following would be helpful. These attempts at monitoring the hallways are seemingly always the longest threads. I also don't believe the 30% figure. That does not come close to what I see. I would be surprised if that were not greatly inflated. I would like to see a percentage determination of the percentage of posts which are about the list and about other peoples' questions. I would bet that is fairly large. If we want to shorten lists, I would encourage people to give better information on their questions and to ask people to think about their answers. A quick perusal of the lists shows me that this is the biggest inflator of the list. Even the present question or statement is not going to end up with a thing happening. That is almost guaranteed. If real answers were given to real questions, presumably there would be many two email exchanges. These are not, I think, the norm. Anyway, if noise is a problem, then an analysis would be the way to go. What do you think? This is just my take, and I am probably full of monkey doo. Jack On Wed, 8 Dec 2004 22:44:11 +0100, Roberto Cosenza <[EMAIL PROTECTED]> wrote: > Hi cats worldover. > It's been a while that I've reading the posts on this mailing list and I can > easily say that about 30% are not pertinent to tomcat but are related to web > technology in general. Isn't it time to route this traffic to other mailing > lists? Can't the tomcat project host new list for those users lookin for > other kind of help? > It will sure enhance the quality of the list a lot. > /Roberto > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat mailing list is full of non tomcat topics
The first thing I do when someone starts a thread about list noise is to run that persons name through my gmail search engine and see what their posts are like. I always find this to be revealing. Indeed, I run my own name through and get equally embarrassed about what an ass I can be. If we take an objective look at what expands traffic, both through sins of commission and omission, I think we will get surprising results. I have a suggestion that we expand the areas of non-Tomcat to the following: [OT] -- Off Topic [SA] -- Smart Ass threads with self-congratulatory replies to other peoples' questions which really are not meant to help as much as to deride. [HM] -- Hallway Monitor threads about the list and other people. Until people get used to these, the user should put in the Subject the explanation, e.g. [HM] -- Hallway Monitor -- blah blah. If this were done we could read less than 50% of the posts. Seriously, however, if we all look at our posts and see how helpful they are and how likely they are to contribute or to make worse list noise, I think that we would all be better off. Jack On Wed, 8 Dec 2004 22:44:11 +0100, Roberto Cosenza <[EMAIL PROTECTED]> wrote: > Hi cats worldover. > It's been a while that I've reading the posts on this mailing list and I can > easily say that about 30% are not pertinent to tomcat but are related to web > technology in general. Isn't it time to route this traffic to other mailing > lists? Can't the tomcat project host new list for those users lookin for > other kind of help? > It will sure enhance the quality of the list a lot. > /Roberto > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat & threads
Have you looked at Doug Lea's stuff? I personally would never have a server thread wait on anything from another thread. The idea of two threads running together makes little sense where one is just waiting. This may seem too strict, but I follow it to the letter. Jack On Fri, 10 Dec 2004 08:04:12 -0700, Robert Harper <[EMAIL PROTECTED]> wrote: > > > Robert S. Harper > > > 801.265.8800 ex. 255 > > -Original Message- > > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > > >I have an app that must wait for a return from another machine that > > > > Yikes ;( I hope you realize that fragility of this design, given that > > J2EE apps (which includes Servlet webapps) are not supposed to create > [Robert Harper] > The extra thread is from the return side of the RMI link to the remote > computer. > I do not directly spawn a thread. If you know of an event library for this > version of the JVM, I would be happy to use that because I think things run > more > efficient and the code looks cleaner. > > > > > > > >The problem is that it also blocking > > >the > > >return thread until the loop is terminated. > > > > So Thread.currentThread().sleep(1000) blocks a thread other than the > > current thread? Is the "return thread" a child of the request > > processing thread? If so, you should make it NOT a child by > > pre-creating it (or possibly a pool of these return threads) at app > > startup. > > > > But really, you should consider an alternative design. Blocking > > container threads is never good. > > > > [Robert Harper] It looks like the blocking was due to my lack of understanding > of how synchronized works. I thought, wrongly, that if I added the > synchronized > modifier to a method definition, that the method would be synchronized. It > also > made the member data field blocking. I am used to writing Win32 multithreaded > apps. and I am having a hard time making the switch to the Java way of doing > things. > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display of Static Resources
Hello, Looks like you need to read an overview of how web based HTTP technology works. Essentially, in the typical and simple case, a request holding name/value pairs in a request object, HttpServletRequest in your case, and other information from the client makes a request and then your application either provides a static HTML page in the HttpServletResponse object or constructs an HTML page dynamically from an HttpServlet or a JSP page, which ultimately is a Servlet as well. Thus, a page never "gets displayed and continues back to the servlet". The page only would return to the servlet if it has a refresh or something akin to that. Jack On Fri, 10 Dec 2004 18:10:37 -0800, Ram Sriram <[EMAIL PROTECTED]> wrote: > Hi, > I use jakarta-tomcat-5.0.19 and Apache HTTP Server 2.0.49. I am having > problem displaying static resources such as gif. When I have gif in the > HTML, not only it doesn't display the gif, the page also doesn't wait > for user input. The page gets displayed and continues back to the servlet. > I am using form elements in the page and those gets displayed properly. > When I remove the gif from the page, everything works as expected. I > have a feeling this is some sort of a Tomcat config issue. I am not able > to figure what config it is and how to do the config. I looked at > Web.xml both in the conf directory and webapps\ROOT\WEB-INF directory. I > tried looking up the documentation in the Tomcat site and couldn't get > much help. > I am using XML for data from the server and XSL (and transformation) for > generating the HTML. I don't think it has any impact, but just to > complete the details, I am using Oracle Database with the Oracle Thin > JDBC driver. > Can someone help me solve this problem or point me to some reading > material that I could refer to. > Thanks...Ram > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Hello, Shilpa, With Wade, I wonder what you want. Apparently you have a client making and order and being informed about the status of the order. You say you have to develop a "client application" which looks to the database. Since this is a Tomcat list, that would seem to be a "server application"?Maybe by "client application" you mean a "server application" to help clients? If you are using a web, browser, based application, then you have to wait for the client to check with you rather than "send the status to the remote client". Blah, blah, blah. The point, I guess, is that you really need to say in more detail what you are doing. What does your client look like? Can you create a rich client? Etc. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is tomcat (java) so memory intensive?
Why, then, does the Tomcat 5.0 say in the RELEASE-NOTES "JAVAC leaking memory" is an issue? On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley <[EMAIL PROTECTED]> wrote: > i think (from memory) it had to do with registering requests with jk. anyway, > like i say, upgrade and you'll see that leak go away i am pretty sure. > > > -Original Message- > > From: Allistair Crossley > > Sent: 21 December 2004 16:00 > > To: Tomcat Users List; [EMAIL PROTECTED] > > Subject: RE: Why is tomcat (java) so memory intensive? > > > > > > you are right, tomcat 5.0.19 did have a memory leak. some > > dispute it, but it is there, i had it also and used a > > profiler to show it. you should upgrade to 5.0.28. > > Thanks, Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is tomcat (java) so memory intensive?
Sorry, misread what you said. Jack On Tue, 21 Dec 2004 08:40:01 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > Why, then, does the Tomcat 5.0 say in the RELEASE-NOTES "JAVAC leaking > memory" is an issue? > > > On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley > <[EMAIL PROTECTED]> wrote: > > i think (from memory) it had to do with registering requests with jk. > > anyway, like i say, upgrade and you'll see that leak go away i am pretty > > sure. > > > > > -Original Message- > > > From: Allistair Crossley > > > Sent: 21 December 2004 16:00 > > > To: Tomcat Users List; [EMAIL PROTECTED] > > > Subject: RE: Why is tomcat (java) so memory intensive? > > > > > > > > > you are right, tomcat 5.0.19 did have a memory leak. some > > > dispute it, but it is there, i had it also and used a > > > profiler to show it. you should upgrade to 5.0.28. > > > > > > Thanks, > > Jack > > -- > "You can lead a horse to water but you cannot make it float on its back." > > ~Dakota Jack~ > > "You can't wake a person who is pretending to be asleep." > > ~Native Proverb~ > > "Each man is good in His sight. It is not necessary for eagles to be crows." > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > > --- > > "This message may contain confidential and/or privileged information. > If you are not the addressee or authorized to receive this for the > addressee, you must not use, copy, disclose, or take any action based > on this message or any information herein. If you have received this > message in error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation." > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is tomcat (java) so memory intensive?
Is there any reason not to upgrade to 5.5? Is that ready for prime time? Thanks. Jack On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley <[EMAIL PROTECTED]> wrote: > i think (from memory) it had to do with registering requests with jk. anyway, > like i say, upgrade and you'll see that leak go away i am pretty sure. > > > -Original Message- > > From: Allistair Crossley > > Sent: 21 December 2004 16:00 > > To: Tomcat Users List; [EMAIL PROTECTED] > > Subject: RE: Why is tomcat (java) so memory intensive? > > > > > > you are right, tomcat 5.0.19 did have a memory leak. some > > dispute it, but it is there, i had it also and used a > > profiler to show it. you should upgrade to 5.0.28. > > > > Allistair. > > > > > -Original Message- > > > From: Philippe Deslauriers [mailto:[EMAIL PROTECTED] > > > Sent: 21 December 2004 15:47 > > > To: Tomcat Users List; [EMAIL PROTECTED] > > > Subject: RE: Why is tomcat (java) so memory intensive? > > > > > > > > > > > > Actually no, I tough it was 256Mb. Thanks. > > > It will go out of memory around 125Mb 140Mb in the task > > > manager. It depends. > > > > > > But your point just prove my problem to be even stanger: if > > > 64 Mb shoulb be > > > the limit > > > where did the other 60Mb+ go? (the JVM itself never takes > > > that much memory, > > > not from my experience). > > > > > > What I did not mention in the orgininal post is that I have > > > the same problem > > > with an app running on 5.0.18 sam jdk, using -Xms256m > > > -Xmx1024m, it will > > > also run OOM, and again profiling the app did not show any > > > leak, and a large > > > gap between the total heap and whatever the task manger reports. > > > > > > My main issue here is where does the gap come from? > > > > > > > > > -Original Message- > > > From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, December 21, 2004 10:22 AM > > > To: Tomcat Users List > > > Subject: Re: Why is tomcat (java) so memory intensive? > > > > > > > > > Philippe Deslauriers wrote: > > > > I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03. > > > > > > > > I have a serious memory problem with Tomcat, it just EAT > > > memory without > > > > explanation, until OOM error occurs. > > > > > > > > The Java.exe process in the windows task manager reports > > > using between > > > 95Mb > > > > and 105Mb after the startup of the webapp. I do not use Xms > > > Xmx options in > > > > dev mode. > > > > > > You do know that the VM will only allocate 64 mb for heap > > if you don't > > > use the Xmx option, do you? > > > After the 64 mb are used up the vm will throw an oom error. > > > How much memory does the taskmanager report before the oom > > > error happens? > > > > > > > > > Christoph > > > > > > > > - > > > 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] > > > > > > > > > > > > > > --- > > QAS Ltd. > > Developers of QuickAddress Software > > http://www.qas.com";>www.qas.com > > Registered in England: No 2582055 > > Registered in Australia: No 082 851 474 > > --- > > > > > > > > - > > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory Leak with Javac and Tomcat v. 4.0.28
I was going to update my Tomcat from 4.0.19 because it says there is a javac leak in the RELEASE-NOTES. However, I noticed that 4.0.28 says the same thing. Is it fixed/ Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Leak with Javac and Tomcat v. 4.0.28
Thanks, all! Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
You can just use the messaging classes in COS. Jack On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley <[EMAIL PROTECTED]> wrote: > no, and I believe doing so it bad practice. use some OS controlled timer like > cron to issue a HTTP call to your servlet. I once wrote a shell script that > calls a http address on the local machine but cannot remember how ;) if you > are using oracle then you can setup this timer thread inside the database > itself. don't add a thread into your web application. > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: 21 December 2004 16:14 > > To: Tomcat Users List > > Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30 > > > > > > Thanks for the reply... > > > > The application which i am trying to write is a standalone > > utility.. Client > > does not hit this servlet. > > > > Instead my application which is a servlet, will make some > > database calls-- > > and if the required data is present in the database, then > > that data is sent > > to the client via xmlrpc call and the response from the xmlrpc call is > > updated back into the dataabse. > > > > So we want this utility preferably servlet in our Tomcat > > container to be run > > every 30 minutes like a cron job, to do the database updates.. > > > > There are so many other classes deployed on Tomcat and i want > > to use those > > classes to write this servlet utility. > > This is the reason why chose to use servlet, but is there any > > configurable > > parameter to run servlet for every 30 minutes... > > > > -Original Message- > > From: Wade Chandler [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 21, 2004 11:03 AM > > To: Tomcat Users List > > Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30 > > > > > > Shilpa Nalgonda wrote: > > > Hi, > > > I am using Tomcat4.1.30 version. > > > I have to develop a client application which looks in the > > database every > > 30 > > > minutes, > > > to retrieve the status of an order and send the status to the remote > > client. > > > Again waits for the > > > The client's response and insert the repsonse back to the database. > > > > > > I wanted to do this in a servlet, so is there any way that > > i could run > > this > > > servlet automatically inside the > > > Tomcat container, or is it configurable in servlet mapping? > > if so can > > > someone please suggest me with examples... > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > Wellit's kind of not extremely clear what you are asking, but why > > does the servlet need to do anything except listen for a > > client which is > > threaded to do this every 30 minutes, in other words...why > > not have the > > servlet do what it naturally does...sit there and get hit by client > > requestsget the infoand send it back? I mean...the servlet > > can't push to the client unless you want to use something > > besides http, > > or unless you are using servlets on both ends and http servers on both > > ends. You could use keep alives I guess.I wouldn't thoughonly > > so many tcp/ip connections. > > > > Wade > > > > > > - > > 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] > > > > > > > --- > QAS Ltd. > Developers of QuickAddress Software > http://www.qas.com";>www.qas.com > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > --- > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
+1 Jack On Tue, 21 Dec 2004 10:40:59 -0600, Billy Talton <[EMAIL PROTECTED]> wrote: > Why are you writing a servlet for this? If the application does not > use any of the services confined to the Servlet API and Tomcat, just > write a stand-alone application and setup up a cron job to run it. > Seems like overkill to me. > > On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley > <[EMAIL PROTECTED]> wrote: > > no, and I believe doing so it bad practice. use some OS controlled timer > > like cron to issue a HTTP call to your servlet. I once wrote a shell script > > that calls a http address on the local machine but cannot remember how ;) > > if you are using oracle then you can setup this timer thread inside the > > database itself. don't add a thread into your web application. > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: 21 December 2004 16:14 > > > To: Tomcat Users List > > > Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30 > > > > > > > > > Thanks for the reply... > > > > > > The application which i am trying to write is a standalone > > > utility.. Client > > > does not hit this servlet. > > > > > > Instead my application which is a servlet, will make some > > > database calls-- > > > and if the required data is present in the database, then > > > that data is sent > > > to the client via xmlrpc call and the response from the xmlrpc call is > > > updated back into the dataabse. > > > > > > So we want this utility preferably servlet in our Tomcat > > > container to be run > > > every 30 minutes like a cron job, to do the database updates.. > > > > > > There are so many other classes deployed on Tomcat and i want > > > to use those > > > classes to write this servlet utility. > > > This is the reason why chose to use servlet, but is there any > > > configurable > > > parameter to run servlet for every 30 minutes... > > > > > > -Original Message- > > > From: Wade Chandler [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, December 21, 2004 11:03 AM > > > To: Tomcat Users List > > > Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30 > > > > > > > > > Shilpa Nalgonda wrote: > > > > Hi, > > > > I am using Tomcat4.1.30 version. > > > > I have to develop a client application which looks in the > > > database every > > > 30 > > > > minutes, > > > > to retrieve the status of an order and send the status to the remote > > > client. > > > > Again waits for the > > > > The client's response and insert the repsonse back to the database. > > > > > > > > I wanted to do this in a servlet, so is there any way that > > > i could run > > > this > > > > servlet automatically inside the > > > > Tomcat container, or is it configurable in servlet mapping? > > > if so can > > > > someone please suggest me with examples... > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > Wellit's kind of not extremely clear what you are asking, but why > > > does the servlet need to do anything except listen for a > > > client which is > > > threaded to do this every 30 minutes, in other words...why > > > not have the > > > servlet do what it naturally does...sit there and get hit by client > > > requestsget the infoand send it back? I mean...the servlet > > > can't push to the client unless you want to use something > > > besides http, > > > or unless you are using servlets on both ends and http servers on both > > > ends. You could use keep alives I guess.I wouldn't thoughonly > > > so many tcp/ip connections. > > > > > > Wade > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > ---
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Why don't you guys use something like Lea's multithreading queues? Jack On Tue, 21 Dec 2004 18:14:30 +0100, Jorge Sopena <[EMAIL PROTECTED]> wrote: > Hi, > I'm having a similar problem in my application. > I've got several servlets called by the users. Every requets save some > information in DB, that has to be sent to another server later and in a > compress format. > So I need sth similar toShilpa is asking, a process which runs every X > minutes to recover the information and send it to the Server. > > My solution to this problem was to implement a "ServletContextListener" > inside Tomcat. > When Tomcat starts my application the "contextInitialized" method is > called, and then a thread is started to do the task explained above. > I use "Thread.sleep(step)" to wait for the next execution. > > I didn't find anyway to set a timer for a servlet, and I didn't like the > option of creating an external script . > > Any other suggestions to solver this problem? > > Thanks > > Jorge > > > Ben Souther wrote: > > >On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote: > > > > > >>no, and I believe doing so it bad practice. use some OS controlled timer > >>like cron to issue a HTTP call to your servlet. I once wrote a shell script > >>that calls a http address on the local machine but cannot remember how ;) > >>if you are using oracle then you can setup this timer thread inside the > >>database itself. don't add a thread into your web application. > >> > >> > >> > > > >I concur. It's certainly possible to write a treaded java object that > >fires a command every so often but there would be no point in making > >that object a servlet (servlets exist to answer client requests). > >It's also, IMHO, more aggravation than it's worth to manage your own > >daemon threads in a webapp. > > > >It would take all of 2 minutes to write a timer with crontab and wget > >that could call your servlet whenever you want. > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
but nothing due tomcat. > > > > Back to original question. > > > > > >> [EMAIL PROTECTED] wrote: > >>I am using Tomcat4.1.30 version. > >>I have to develop a client application which looks in the database > > > > every 30 > > > >>minutes, > > > > > > ApplicationContextListener + Timer + TimerTask > > > > > > > >>to retrieve the status of an order and send the status to the remote > > > > client. > > > >>Again waits for the > >>The client's response and insert the repsonse back to the database. > > > > > > What is that remote client? Is actually another server and your > > application is client. If so, just add client code for server in > > TimerTask (http-, web service- or whatever client). > > > > - Jukka - > > > > - > > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Use java.util.Timer and java.util.TimerTask. Create a Timer object. Timer timer = new Timer(). Then create a TimerTask object. SomeTask task = new SomeTasK(). private class SomeTask extends TimerTask { public void run() { // do stuff } } Schedule the task: timer.schedule(task, 10, 400). Wallah! I do this all the time. You have to know what you are doing. If you do, then do it. This is what the apps like Quartz do anyway. This is just lightweight. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including jsp files that exist outside of the web application
I cannot understand your situation. If you use the include directive, then the JAVA Servlet file will include the info in the JSP file which is included. If you use the include element, then the included JSP file will have its own separate JAVA Servlet file. Accordingly, the include element requires a JAVA Servlet file to be loaded with a class loader. So, you must be using JSP files that are edited outside the web application and then inserted into the web application, where they are then compiled and "included" via reference by other Servlets. Right? I am not sure what the problem is with "overwriting". I am also not sure what you mean by them "existing" outside the web application. If by being edited outside and included in a web application is what you mean by "existing outside", what is the problem? Sorry to be dark, but this is a mysterious discussion to me. You guys clearly understand what you are talking about. I don't. Consider this a "subquestion" in an attempt to be helpful. ;-) Jack On Mon, 27 Dec 2004 12:22:50 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > We have a web application that is overwritten each time we push a new > version of the code into production. However, we have jsp files that are > included by the web application (dynamically via a jsp:include), but are > edited outside of the web application... and should not be overwritten > just because the core code is updated. > > What is the best practice for including jsp files that exist outside the > web application? I have seen a couple of threads of putting these > "included" jsp files in a separate web application that is not > overwritten... but I was wondering if there was a better solution. > > Thank you, > -Raiden Johnson > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including jsp files that exist outside of the web application
What if you don't include the JSP file but "include" the related JAVA file and use CLASSPATH? Will that work? You cannot, of course, make this dynamic, since you have class loader issues. The biggest issue is the class loader issue. You might create a set of interfaces and implemenations outside your web application that allow dynamic reloading. I don't see, however, why your edited files are not just popped into your web application without issues? Jack On Mon, 27 Dec 2004 12:22:50 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > We have a web application that is overwritten each time we push a new > version of the code into production. However, we have jsp files that are > included by the web application (dynamically via a jsp:include), but are > edited outside of the web application... and should not be overwritten > just because the core code is updated. > > What is the best practice for including jsp files that exist outside the > web application? I have seen a couple of threads of putting these > "included" jsp files in a separate web application that is not > overwritten... but I was wondering if there was a better solution. > > Thank you, > -Raiden Johnson > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- ------ "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
The minimum thread priority is 1, maximum is 10 and medium or normal is 5. See: http://java.sun.com/j2se/1.4.2/docs/api/constant-values.html#java.lang.Thread.NORM_PRIORITY You can set a "good neighbor poilicy with MIN_PRIORITY. Hunter on Servlets covers this with a daemon servlet. Jack On Tue, 28 Dec 2004 11:49:13 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > Dennis Payne wrote: > > Frank, > > I'm using threads and didn't know I was vulnerable. > > I'm not sure "vulnerable" is really the right word, but I'll go with it :) > > > Here's how I've > > done it. I created a class that implements runnable and call its > > initialize method from a servlet init method at application startup. > > The initialize method creates a thread and sets a low priority for it. > > Roughly what I do too, except that my class extends Thread and I kick it > off from a Struts plug-in. Same effect though. > > > The run method sleeps the thread and wakes it every two minutes. > > A processing class contains the methods that queries the database > > (postgres). > > Same here. I think I wake my threads every minute though. > > > 1. Is this what you call a daemon thread? > > Nope. If you take a peak at the javadocs for the Thread class, you'll > see a method setDaemon(boolean). This marks a thread as a daemon > thread. The difference, if I remember correctly, is that the JVM won't > shut down until all remaining threads are daemon threads. Threfore, if > you spawn a "normal" thread, you can hold up the JVM from shutting down > properly. > > This is in fact the situation I had... My Tomcat instance could never be > properly shut down because the threads I had spawned where not daemon > threads. Marking them as such solved that problem. > > To the best of my knowledge, being a daemon thread doesn't implicitly > say anything about a threads priority. I think you could have a daemon > thread set at high priority if you wanted. I suspect most daemon > threads are bumped to a lower priority though, as I do. > > > 2. Is this better done using cron? if so how do I ensure that it runs > > > > with a lower priority than my application code? > > Phil > > This is a matter of opinion, and there are some reasonable arguments for > both points of view. > > My personal opinion is that if you have some periodic process that is > going to need portions of your system, whether it's resources available > in the container or shared code, as you do, then a low-priority daemon > thread spawned at application startup is a good approach, assuming you > write it carefully and solidly. > > For instance, in my case, my daemon threads do some record aging in the > database, so to me it makes sense to share the same connection pool as > the application itself. I also use a number of classes and functions > that are part of the webapp itself, and I don't like the idea of > duplicating the code for a cron job to use (sure, could just be a matter > of setting up a classpath to those classes, but it's an extra > dependency, and that doesn't thrill me). > > But, if these tasks were volatile in any way, or they had to run > independently of the app itself no matter what, the cron job approach > would probably be preferable. > > As for ensuring it runs at a lower priority than your application code, > when running via cron, that's an answer I can't give you. I'm frankly a > Unix newbie, more or less, so someone else out there would be better > suited to answer that. I think you'd have to have it run at a lower > priority than your app server, and I'm sure there's switches to set > priority of jobs, but I don't know them. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder
I put EVERYTHING under WEB-INF except one index.jsp file, which merely passes the first incoming request to the secret stash! By "everything" I mean everything! Jack On Sun, 26 Dec 2004 22:31:32 +0800, Koon Yue Lam <[EMAIL PROTECTED]> wrote: > Hi, I want to protect my JSP from direct access, so they can only > access by Struts action. > but > > If I want to include some Javascript or CSS to a JSP, I can't ! > Because .js and .css needed to place directly under WebRoot > > My solution is to use to include all those Javascript > and CSS to JSP, but then the JSP will look very ugly and fill up with > long long non HTML stuffs .. which is not so nice > > Is there any any to solve this or I just need to accept this trade-off? > > Any help would be appreciated > > Regards > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- ------ "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder
I don't know why you are saying that css and/or js must be placed directly under "WebRoot". Why do you? I can give you various solutions, once I find out what the problem is supposed to be. There is no issue, by the way, with putting your JSP files under WEB-INF. There are other ways to protect access, but this is, I think, a good one too. Jack On Sun, 26 Dec 2004 22:31:32 +0800, Koon Yue Lam <[EMAIL PROTECTED]> wrote: > Hi, I want to protect my JSP from direct access, so they can only > access by Struts action. > but > > If I want to include some Javascript or CSS to a JSP, I can't ! > Because .js and .css needed to place directly under WebRoot > > My solution is to use to include all those Javascript > and CSS to JSP, but then the JSP will look very ugly and fill up with > long long non HTML stuffs .. which is not so nice > > Is there any any to solve this or I just need to accept this trade-off? > > Any help would be appreciated > > Regards > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- ------ "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrading from 5.0.19 to 5.0.28 with a Service Startup
I want to upgrade from Tomcat 5.0.19 to 5.0.28. I am using script to startup a service. Where is a good place to lookup what it takes to do this so that I can decide one way or the other. Is it pretty simple with small changes or will I have to rewrite the script, etc.? Thanks for any assistance or a reference to what I need to look at to see what to do. Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Website downloading old file
Clear your browser cache. Jack On Mon, 17 Jan 2005 17:26:41 +, Paul Taylor <[EMAIL PROTECTED]> wrote: > I think it is a browser problem because I got a friend to download from > his computer and he received the correct file. Im using Firefox and > still get the same problem. > > Ben Souther wrote: > > >Also, in the interest of not overlooking the obvious... > >Did you verify that the FTP write actually worked and that you didn't > >accidentally ADD another file with a slightly different name? > > > > > > > > > >On Mon, 2005-01-17 at 09:56, Parsons Technical Services wrote: > > > > > >>File permissions may be part of your problem. > >> > >>What OS is Tomcat running on? > >> > >>As for the showing the file after deleting it from the server, did you do a > >>restart of Tomcat after deleting the file? I remember something on the list > >>awhile back similar to this. > >> > >>Doug > >> > >>- Original Message - > >>From: "Paul Taylor" <[EMAIL PROTECTED]> > >>To: > >>Sent: Monday, January 17, 2005 7:42 AM > >>Subject: Website downloading old file > >> > >> > >> > >> > >>>Puzzled. > >>> > >>>I have a Tomcat 5 application, associated with it a file that can be > >>>downloaded from the website, which is in the root directory of the > >>>context. (So if the context is called myapp the file is in myapp). > >>> > >>>Everything was fine but then I realised that there was a problem with the > >>>file so I ftped a new file to replace it. > >>>But when I try to download the file from the website it still refers to > >>>the earlier (larger) file. > >>>This still happens even though I have: > >>>shutdown tomcat, > >>>restarted tomcat, > >>>deleted tomcat work directory, > >>>clerared out my browser cache > >>>used a different browser. > >>> > >>>It even still allows the file downloads if I delete the file from the > >>>server, how can this be ? > >>> > >>>- > >>>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] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
karjera@m-1.lt
Is anyone else getting personal responses from this address after every submission to tomcat-user? Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Re: Test]
I don't know what you guys are talking about. I have been getting messages. Jack On Tue, 18 Jan 2005 16:31:39 -0800, Alan Deikman <[EMAIL PROTECTED]> wrote: > I wouldn't go that far. I posted a question twice since joining but > haven't seen anything yet. Maybe the list server was eating stuff? > > Regards, > > Alan Deikman > ZNYX Networks > > >20 hours and counting. > > > >This is spooky. > > > >No wait, I understand now, we the open source community have solve all the > >problems. Well Tomcat issues at least. > > > >Take that M$! > > > >Doug > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is it mean that "Java code does not belong in well designed JSP pages"?
There are lots of reasons why this is not the way to code JSPs, Dola. Let's start with one: REUSABILITY. If I can read "between the lines" in your code, you are essentially using these classes to write HTML in sort of a Tiles way. This is clearly a good thing and your ideas might be really worthwhile. That is not at issue in what I have to say. I am also not, at the moment, talking about the <%= whatever %> expression code, but rather only the <% whatever %> scriptlet code. You don't use <%! whatever %. declaration code. The only way to reuse the code you wrote is to copy and paste. (Often this is called "cut and paste" which makes no sense.) If you consolidated and generalized the code off the page in some, say, Process class, then you could have something like <%= Process().process([whatever]) %> where "whatever" represents what is peculiar to this page alone and what is common to all like pages is included in the off-JSP-page Process process method code. If you only made this change, then your page person, which might be the same person, would only have to write <%= Process.process([whatever]) %> on each page and would not have to write the code elsewhere either because that would already have been abstracted and done. If we cannot all agree this is progress, then we probably cannot agree on the whole idea of getting code off the page at all. I also like what Tim had to say because he recognizes that sometimes we have to write the particular code and abstract later as a business decision. However, he does it in a way that recognizes that adhering as close to the principles of OOP as possible will make the later transition easy when duplicating code becomes an issue. I hope this helps. Let me say that I find that the principles of OOP can be defended and need not be adhered to out of blind faith. It is better to find out what is up than to just follow the dictates of whomever. Once again, good question. I hope this engenders a long and useful thread. If it did, we could save a lot of "ink" on the list. Jack On Sun, 23 Jan 2005 07:07:21 -0800 (PST), Dola Woolfe <[EMAIL PROTECTED]> wrote: > I just read this thread and didn't quite understand > it. If it means what it seems to mean on the surface, > I'm doing everything wrong. > > Schematically, my typical JSP page looks like the > following (basically 100% code). Is this what Craig is > advising against? > > <%@ page errorPage="ErrorPage.jsp" import="html.*"%> > <[EMAIL PROTECTED] file="InitializePage.jsp"%> > <% > Table table = new Table() > .pAddH("#").pAddH("Action").pLN() > .pAddC("1").pAddL(new Anchor("HelloPage.jsp", "Say > hello to my friend.")).pLN() > .pAddC("2").pAddL(new Anchor("GoodByePage.jsp", > "Say good bye to my friend")).pLN() > ; > > MyTemplate template = new MyTemplate ("Main > Actions", table); > Page pAgE = new Page(new MyHead("Data Tools"), new > Body(template)); > %> > > <%= pAgE %> > > __ > Do you Yahoo!? > Read only the mail you want - Yahoo! Mail SpamGuard. > http://promotions.yahoo.com/new_mail > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is it mean that "Java code does not belong in well designed JSP pages"?
On Sun, 23 Jan 2005 12:09:39 -0800 (PST), Dola Woolfe <[EMAIL PROTECTED]> wrote: > On the subject of your hope that "this engenders a > long" can the English be fixed in the subject before > this is archived? It's embarrassing. Too late. Don't worry about it. What we type in here rarely has much to do with our real understanding of English. I don't bother to change a lot and assume the regular corrections for others as well. Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is it mean that "Java code does not belong in well designed JSP pages"?
> Debugging code in JSPs is very painful. Debugging tag libraries is the same > as debugging any ordinary Java object. > I pretty much agree with everything Harry says and I do so "in spades" as they say. You can, as a tip, make debugging JSP easier by putting the whole page in a try/catch exception trap. Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sharing webapplication
You can have the various application URLs point to the same webserver app, as Parsons pointed out. However, why don't you want them to share, except the "skin", everything on the website? As long as the "skin" is different, they won't know they are sharing anything. Jack On Mon, 24 Jan 2005 16:48:37 +0100, Omar Adobati <[EMAIL PROTECTED]> wrote: > nobody can help me too? > > > On Mon, 24 Jan 2005 11:08:36 +0100, Omar Adobati <[EMAIL PROTECTED]> wrote: > > Hi to everybody, > > > > I need an idea. suppose I have some webapp that i need to share > > among some other webapplication. For example, suppose I have three > > customer website each that need the access to a reserved area. Suppose > > thet I want to use just on login webapp shared among all my customers; > > suppose I need that every login page need to by skinned as the rest of > > the website. > > > > The main issue I want to obtain is to manage just one shared webapp > > fot all customers to better menaging upgrades, bug fixing and so on. I > > think that skin the website is not a problem... I shoud use XML + > > XSL(T) to skin... the matter is how to share. > > > > What are the best way to do this? > > > > (sorry bad english) > > > > -- > > Adobati Omar > > > > -- > Adobati Omar > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Virtual domains
Yes. Check the documentation. On Mon, 24 Jan 2005 12:40:19 -0800 (PST), Dola Woolfe <[EMAIL PROTECTED]> wrote: > Recently I asked whether Tomcat can be used w/o > Apache, and the answers that I received convinced me > that for my project using Tomcat by itself is the > right thing to do. > > But does Tomcat support virtual domains? > > Aaron Fude > > __ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging remote IP address
I don't know what you mean by "I've seen on some webpages [sic] that My [sic] IP is displayed as both exernal and internal". The IP address is for the internet and there is only one. You may have internal routing. That is different. I don't know what you mean about webpages displaying your internal routing, if that is what you mean. That sounds sort of impossible to me. See below: On Fri, 28 Jan 2005 08:21:15 -0800 (PST), Mark <[EMAIL PROTECTED]> wrote: > I'm just tring to see if http request that came from one IP address > has more then 1 client behind it. I've seen on some webpages that My > IP is displayed as both external and internal - so it means it's > doable - but the question is how to get this info in Tomcat. There is good news and bad news. First, the bad. You cannot get internal (e.g. intranet information) routing information from the request. Second, the good: which has two parts. First part: thank God, because this would expose you mercifullessly to the outside if the request had this information. Second part: thank God, because you don't need this information in the request If you want to see the direction back to a machine that is sending a request from any network, that will be in the request without the internals of the network being there. The responder will know how to get to your network and your network will know how to get to the machine. So, all is well that ends well. Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Advertising website
On Fri, 28 Jan 2005 08:04:57 -0800 (PST), t t <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know a easy and cheap (even free) way to advertise a website? > Thanks. > > T.T. This is easy: build a SUPERIOR product and sell it for a REASONALBE price under conditions that will give the CLIENTS WHAT THEY WANT. Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging remote IP address
Richard Mixon is, as usual, dead-on right. A good primer is http://webserver.cpg.com/ws/3.4/ > A major purpose of a NAT style firewall is to hide the private ip > addresses behind the firewall. If it allowed this information out it > would be a security compromise - the network topology behind the > firewall is to be kept secret. > > I may be wrong, but I believe any web page you have been to that also > showed in the browser/client's internal private IP address must have had > a plugin - either an ActiveX or other type of plugin was probably > involved. > > HTH - Richard Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reading encoded JPEG Stream
This is in the archives on this: http://marc.theaimsgroup.com/?l=tomcat-user&m=100348895830765&w=2 Jack On Fri, 28 Jan 2005 20:08:29 +, Didier McGillis <[EMAIL PROTECTED]> wrote: > > StandardWrapperValve[view]: Servlet.service() for servlet view threw > exception > javax.servlet.ServletException: java.io.IOException: reading encoded JPEG > Stream > > ar not sure if this is a problem but I get a ton of these. > this is in an old part of the application that I didnt write and the other > developer has no idea either. > > any have any idea on what could be the issue here. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging remote IP address
If it is the same IP address, it probably is the same person. The alternatives are highly unlikely, if possible. Jack > I have two entries in access log file within 30 second from the same > IP, but different logon id - my question is how to track it down that > it's a different person? Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: reading encoded JPEG Stream
>From the code you sent me privately, I suspect that the problem is that you are using Java code which does not encode JPEGs to do so, viz. ImageIO, although I don't know if the licensing on that has yet led to a change.. To make sure what is happening, I would have to see more of your ImageViewer servlet which is named com.dynamic.servlet.ImageViewer. The problem seems to be on line 304 in sendJpeg(...). I don't know if this is your code or not. Let me know. At any rate, I have changed the subject to OT as I am reasonably sure that this is not a Tomcat issue. Jack -- -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder
On Tue, 28 Dec 2004 13:57:33 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > I think his problem is probably linking to stylesheets and such... > Actually, now I have to ask you... if you put *everything* under > WEB-INF, I assume you are serving all graphics from a fronting web > server then? Otherwise, any document returned to the user that links > back to a resource under WEB-INF won't be reachable, which was the crux > of his problem as I understood it, that's why he was talking about > includes and such all over the place. But, if you really are serving > everything from there, how are you doing it? Just curious at this point :) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > Dakota Jack wrote: > > I don't know why you are saying that css and/or js must be placed > > directly under "WebRoot". Why do you? I can give you various > > solutions, once I find out what the problem is supposed to be. There > > is no issue, by the way, with putting your JSP files under WEB-INF. > > There are other ways to protect access, but this is, I think, a good > > one too. > > > > Jack Frank, are you still interested in this? I just noticed it. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder
On Sat, 29 Jan 2005 09:00:39 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Just from a curiosity standpoint Jack... I've already decided it's not > an approach I'd advocate, but I am interested to know how you serve > things like graphics and stylesheets from under WEB-INF. I assume all > your graphics are actually server by an Action (a trick I've pulled when > serving images from a database), and I further assume your stylesheets > aren't just linked in... You can also put this sort of Struts protocol into Flash ActionScript, etc. To be complete on this list: public final class ResourceAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String file = request.getParameter("file"); String ext = file.substring(file.lastIndexOf('.') + 1); String type = null; String path = null; if ("gif".equals(ext)) { type = "image/gif"; path = path("gif"); } else if ("jpg".equals(ext)) { type = "image/jpeg"; path = path("jpeg"); } else if ("css".equals(ext)) { type = "text/css"; path = path("css"); } else if ("flash".equals(ext)) { type = "application/x-shockwave-flash"; path = path("flash"); } else if ("text".equals(ext)) { type = "text/plain"; path = path("text"); } else if ("js".equals(ext)) { type = "text/javascript"; path = path("js"); } else if ("png".equals(ext)) { type = "image/png"; path = path("png"); } else if ("html".equals(ext)) { type = "text/html"; path = path("html"); } else if ("applet".equals(ext)) { type = "application/x-java-applet"; path = "classes" + File.separator + "com" + File.separator + "crackwillow" + File.separator + "applet"; } String name = Classpath.WEB_INF + path + file; response.setContentType(type); response.setHeader("Cache-Control", ""); response.setHeader("Pragma", ""); response.setHeader("Expires", ""); response.addHeader("Content-Disposition","filename=" + name); try { FileInputStream fis = new FileInputStream(name); BufferedInputStream bis = new BufferedInputStream(fis); byte[] bytes = new byte[bis.available()]; OutputStreamos= response.getOutputStream(); bis.read(bytes); os.write(bytes); os.flush(); os.close(); } catch (IOException ioe) { StdOut.log(SiteConstant.ERROR_LOG,"ResourceAction: problem file is: " + name + "\n" + StackTrace.trace(ioe) + "\n" + ioe.getMessage()); } return null; } private String path(String fileType) { return "resource" + File.separator + "content_type" + File.separator + fileType + File.separator; } } ///;-) -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging remote IP address
On Fri, 28 Jan 2005 20:43:20 -0500, Parsons Technical Services <[EMAIL PROTECTED]> wrote: > Definitely possible. Not as unlikely as you think. I know of shops that put > a whole bunch of users on the same IP. > > Then there are schools that put a hundreds of classroom machines on one IP. > > Doug If you remember the context in which I am working here, this is not so clear. I know why you think it is and from the context in which you are talking, I understand why you say that. However, remember that each person or machine that has access to a server in order to make a request must be uniquely identified or that person or machine cannot get a response. This could take quite a while to discuss, actually. The IP address that is exposed to the public, which is the one I use, has to be different or there would be no way to get back to the client machine. So, we may be talking about same IP in a different sense. Remember that distinctions you may be making in URLs I am making in IPs. There might not even be a URL (i.e. non-number URI) in my case. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder
On Sat, 29 Jan 2005 17:17:03 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > One thing worth pointing out about this is that you'll lose the benefit > of fronting your app server with a web server... You won't be able to > offload the serving of images, stylesheets and such, from the app server > to the web server. That's probably not a big problem in many cases > where a single server with a decent set of specs can handle the load > anyway, but in a more robust "enterprise" environment, your really kind > of defeating the purpose of a fleet of web servers in front of a number > of app servers. Lo, Frank. You really don't lose anything. You just gain a choice. There is a lot more to be said on this, but you probably would know everything on this anyway, so I will leave it at that. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
hat effect this might have in a true distributed > environment (i.e., might it be a problem if one request, say for an > image, is serviced by one machine, while another services the JSP > execuetion itself?). This might never arise, or it might not be a > problem at all even if it does, but it could be something for someone to > explore is my point. Certainly there are things one would have to do in a distributed environment, but the fact that there is a complete decoupling by using a protocol rather than a URL makes all these problems easily solveable. You can do wonders with this sort of thing which you would never consider prior to doing this. You ought to try it on some project and watch where you will be surprised. This is so efficient and flexible. Remember, the code src='resource.do?file='my.css' is stricly HTML. Now, if someone wants to get in a fight, they will jump into the semantic heaven of debating what "strictly" means. However, please note that I am talking about syntax and not semantics. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
Well, I sure got excited, though. Back to reality! ;-) > What I was getting at is the fact that if I return a page to the browser > that have ten images, all referencing ResourceAction, what's happening > is that the browser is making ten separate requests TO THE APP SERVER, > whereas in a "typical" setup, these requests would be handled by the > fronting web servers. It's clearly more resource-intensive in your > approach. I am not clear what part of the process you are referring to, Frank. We both agree that the first delivery of the page is via the "front server" (I tend to only use the "back server" anyway). If there are ten calls to ten images, as you assume for discussion purposes, then there will be ten calls either way. I think you are saying that in addition there will be a penalty of a pass to a server that can handle Servlets or an equivalent technology that will respond to the ProtocolPage by routing the call to some Action, Command, or whatever in some language, in the way I suggest. Is that right? If so, let me know and we will go from there after you confirm. > Agreed. I do see the advantage of this approach, but it's the minuses > I'm more concerned with. No matter which way you slice it, there's more > server resources being utilized. That's a big minus when your talking > about scalability. I wouild need, as you would too I assume, more information on the actual penalty. I suspect that it is relatively small and, when you introduce sophisticated state and caching options, it may be faster. I don't dismiss what you are saying. Don't get me wrong. I just have learned to get the data and then to see what the real difference is. When considering costs and so on, I am not sure whether the balance goes to which side. I would suspect, from my experience, that software maintenance and so on would clearly outweigh the hardware and associated requirements. > I think you point out some valid advantages... if nothing else, just > doing away with having to deal with URLs is a very good thing. But I > think the performance hit, and certainly the server load, in a "typical" > Enterprise environment, would make this not a great idea. I am surprised at this. You may be right, but my sense is that this difference is not really that important when everything else is taken into account. Even if you had to cluster multiple machines instead of one, say, as a ratio, that would seem to be *probably* cheaper as a GUESS. I don't know. We could look at some data and if you have any handy I would love to see it. > Then again, I say the exact same thing about ASP.Net and JSF because the > whole idea of calling a server for relatively simple UI events strikes > me as a horrible idea until we have far better networks than we have > today, and I seem to be in the minority there, so if I might be wrong > there, I might be wrong here too :) I think the bigger hit is reading the danged thing. This obviously is especially so when there is an ongoing use of changing the JSP page. This has no penalty with ProtocolPages. > My wife wouldn't agree with the listening part :) Well, I bet you are being too humble. I am happy to say that my wife just thinks I am the most adorable, wonderful, guy. Go figure, eh? > I think in enterprise-type environments this is a pretty standard > approach with fairly well agreed upon benefits. Anything that breaks it > has to exceed those benefits. As my father used to say, that's a tough > nut to crack! Nothing wrong with trying to build the hammer though :) Technology seems to get ahead of rumor in our little world of web work. So, I definitely would like to revisit this. I am going to squeeze getting the *facts* in here soon. > Absolutely it is, but as I pointed out, it's being interpreted on the > browser side. That's where the issue comes in to play I think, > especially in a distributed environment. I'd be interested to hear your > thoughts on this point... This seems to be false to me. Maybe I misunderstand you. I don't think the browser has a clue whether we are looking at src='myCss.css' or src='resource.do?file=myCss.css'. Right? Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addres
Re: [OT]Re: logging remote IP address
On Sat, 29 Jan 2005 22:58:01 -0500, Parsons Technical Services > "Not true - the combination of IP address and PORT must be unique, not just > the IP address. This is the essence of how NAT and proxies work." Yes, once again, I agree with this. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
sers, so you've reduced your overall server > capacity (as viewed by outside clients) by 90%. Ouch. Now just one moment, Bub! LOL ;-) You really are not seeing the ways you can save time here. For example, there is such a thing as caching, pragmas and expiry headers which can be set with a response in a way that the meta tags just cannot handle. There will be savings of creating no calls where pure HTML would be lost. There will be other things like this too. Remember too that the ResourceAction class is acting as a multithreaded alternative mini-server. Indeed, the approach allows us to get the images, for example, from some other server that is maximized to do just this. Conceivably that could be quicker for cached images. Remember I said "conceivably". The ability to be flexible can make for great rewards in efficiency and fluidity that are not immediately obvious. I don't say you are mistaken. I just think that this is going to be an interesting little inquiry, if you want to chase it to its end, which is my normal proclivity. > I fully acknowledge those are rough, worst-case numbers... I certainly > don't mean to imply that your approach is 90% worse. Not at all! Just > trying to illustrate the problem, as I see it, in certain environments. I understand. All your comments are quite fair, in my opinion. We'll look around and learn a bit here. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
I think the worst case is 22 versus 32, Frank. with 10 images. See your note and then my reasoning below that. > Even if it's all done in the most efficient way, those ten requests > look, for all intents and purposes, like 10 simultaneous USERS (assuming > 1 request per user). So, maybe your app server can handle 100 > concurrent requests... If the web server was allowed to serve the > images, your app server still has 100 slots available to service > requests, which corresponds generally to 100 concurrent users... If it's > serving 10 images for each physical user though, now you can only > service 10 concurrent users, so you've reduced your overall server > capacity (as viewed by outside clients) by 90%. Ouch. > > I fully acknowledge those are rough, worst-case numbers... I certainly > don't mean to imply that your approach is 90% worse. Not at all! Just > trying to illustrate the problem, as I see it, in certain environments. app server = (AS) struts server = (SS) req = request --> = pass res = response With ResourceAction ___ First case HTML = req (AS) res (AS) = 2 Second image JPEG (say) = req (AS) --> res (SS) = 3 . Tenth image JPEG (say) = req (AS) --> res (SS) = 3 WIthout ResourceAction ___ First case HTML = req (AS) res (AS) = 2 First image JPEG (say) = req (AS) res (AS) = 2 Second image JPEG (say) = req (AS) res (AS) = 2 . Tenth image JPEG (say) = req (AS) res (AS) = 2 This is 22 versus 32. Apparently you "forgot" (I think?) that the app server has to handle ten images too. They don't just go out with the page, although we are looking at this in a very oversimplified sense. There is no question that the AS is quicker with HTML than the SS, but I am not so sure about the images. The SS may be faster. There is lots of room here for tuning. -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
> > I think that the ResourceAction class actually acts as the web server > > and that is why the return is null. The class writes to the responses > > output stream and that is all the server does, right? > > I thought so too at first, but upon further reflection I'm not so > sure... If a request comes in to the web server and then it forwards it > on to the app server, that would mean at some very low level that the > web server was passing along the connection to the app server... I'm not > so sure it's anything that complex... It may be that the app server > "renders" the response stream, but then passes it back to the web server > to return to the client. The bottom line though is that we're talking a > level low enough that I don't know the answer for sure. I am certain on this one, because you can do this sort of thing *without* the web or app servers at all. I do this fairly frequently with code not unlike and heavily borrowing in principle from Jason Hunters HttpMessage and HttpsMessage in COS. The ResourceAction sends the response and ends the whole process by returning null. > I too await the data :) But, I think you'd have to agree that for your > approach to wind up being faster, much like when Java programs are > faster than C programs, it must be due to some hidden optimization going > on. I mean, on an operation-per-operation basis, C will ALWAYS beat > Java... Well, maybe on on an "operation" basis. An operation by any other name is still an operation. However, I don't disagree and would merely quibble about the language and the description. > Simply put, there will always be less machine code ops going on > with a C program at the lowest levels (assuming they algorithmically > equivalent) than a Java program. Well put! Yes! > But, because a Java program can be > optimized at runtime, that's where the speed gains occur that you can't > get with C. At the very least this is a main place to gain speed: the Tortoise and the Hare come to mind. >ceteris paribus Heh, I meant to tell you last time, this is Latin, not Greek. LOL ///;-) www.m-w.com Main Entry: ce·te·ris pa·ri·bus Pronunciation: 'kA-t&r-&s-'par-&-b&s, 'ke-, 'se- Function: adverb Etymology: New Latin, other things being equal : if all other relevant things, factors, or elements remain unaltered > But now your pushing those caching decisions back on the browser, right? > I thought one of your basic premises was to not trust the browser to > construct URLs and such? Wouldn't you have the same distrust for > caching? (and probably worse since that is at least at the users' > discrection) The answers are no, yes, no. Setting caching in the response object is not equivalent to setting caching in the tags. This is why the ResourceAction has an edge. Note also that the setting of cache, pragma and expires are runtime alterable, and can override the tags, in ResourceAction. I left those decisions out of the code I sent you. Did you notice where I added in it response to someone's query on that? > Granted, some additional flexibility might outweigh any problems. If > you rolled my BLOBServerAction into your ResourceAction, then you could > transparently serve images from WEB-INF *or* a database, transparently > to the user and front-end. That's a nice bit of flexibility to be sure. And, if you imagined more radical uses of images for whole pages, etc., then you might start thinking about BufferedImages cached in sessions, etc. > I leave the leg-work to you :) You got it! Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
Too late when I sent this. Let me make the necessary alterations to the nomenclature. Sorry! web server = df. (WS) app server = df. (AS) request= df. req response = df. res > = df. passing the control With ResourceAction 1.0 WS req WS res HTML [2] 1.1 WS req > AS res [3] 1.2 WS req > AS res [3] 1.3 WS req > AS res [3] 1.4 WS req > AS res [3] 1.5 WS req > AS res [3] 1.6 WS req > AS res [3] 1.7 WS req > AS res [3] 1.8 WS req > AS res [3] 1.9 WS req > AS res [3] 1.10 WS req > AS res [3] Total 32 Without ResourceAction 1.0 WS req WS res HTML [2] 1.1 WS req AS res [2] 1.2 WS req AS res [2] 1.3 WS req AS res [2] 1.4 WS req AS res [2] 1.5 WS req AS res [2] 1.6 WS req AS res [2] 1.7 WS req AS res [2] 1.8 WS req AS res [2] 1.9 WS req AS res [2] 1.10 WS req AS res [2] Total 22 However, let me note, once again, that we can make it 22 to 22 by simply sending the attributes that are relevant back to a different server. For example, we could have Doing this, if we are talking about serving images to a large-scale site, we could get rid of both the WS and the AS and use a SCS (small custom server) optimized for this situation. I do this sort of thing constantly, *sub rosa*, on my sites. This is probably quicker than using WS to serve the images, and certainly so if the images are in any way dynamic in nature and if we make use of the multithreading opportunities that crop up in this situation. But, this is going afield. And, this is only looking at the upside too. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
> The question that's in my mind though is what happens when you have a > web server in front of Tomcat? Just "rendering to the response" in a > servlet might not be enough in that case... *Before* ResourceAction returns null, the response output stream has been written, flushed, and closed. The only thing that the app server or the web server have left to deal with is that null. There is no wrapper in this case and no proxy in the sense you are talking. The OutputStream from an HttpResponse object writes to the client. > The point being, just because the app server CAN serve everything, > doesn't necasserily mean it WILL with a web server in front. But, in this case, the OutputStream does and there is no "pass it on" functionality in there that would incorporate any reference or use of the web or app server. The fact that this OutputStream ends the process might be one of the factors favoring ResourceAction. > >>ceteris paribus > > > > > > > > Heh, I meant to tell you last time, this is Latin, not Greek. LOL ///;-) > > Really?? Well, I have something to yell at my Macroeconomics professor > for then! I know for sure she said it was Greek! :) > > Funny aside... My Macroeconomics professor... her last name, and I > couldn't have made this up, is Economopolous. That just rules! LOL Economopolous! Hilarious Remember "My Big Fat Greek Wedding" where the Greek guy has a way of turning everything to Greek history, etc.? Well, Ms. "Economopolous" is clearly Greek and her name is Economic-city. (Plato's "Republic" was really "Politia" which means "The City". "Republic" comes from "Republica" which was a Latin translation.) Anyway, this is ALL ceteris paribus. (You can tell Latin from the endings, "ibus" is the dative plural.) > I did notice, but my point is that the browser settings would override > any tags or headers you set. I might be wrong about that, but that > would be my expectation. After all, what good is a setting in my > browser that says don't cache anything if a web site designer can come > along and overrule that? Surely the FOSS community would be up in arms > over their loss of freedom, right?!? ;) The good is that the web site designer knows when a change has been made and the assumption is that you are going to see what the web site designer has to offer. No? Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows. We are poor . . . but we are free." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
On Sun, 30 Jan 2005 14:11:24 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > I still don't understanding the 32 and 22... What do the [2] and [3]'s > represent? A total of three possible processes (1) getting the request; (2) passing the request to another server; (3) handling the response. If you have them all, you have a three. If only 1 and 3, then you have a two. > If we are talking about dynamically-created resources, then I would tend > to agree with your view. But we have, at least as far as I was > concerned, been talking about strictly static resources. If there are static resources, then we can get it down to 22 versus 22 by sending the images to a separate server. Not only can we do this, but we can send the images to a super efficient separate server if we are talking about static images only. > An app server running ResourceAction can serve resources more > efficiently than a web server. Not that an app server is faster under any circumstances tha a web server. That really is not close to true. I've seen the stats on that one and I would doubt that they will ever be the same or close to the same. I would be as SCHOCKED as you (is this an Italian-Jewish SHOCKED? ///;-) ) in that case. What I am talking about is a custom server for images which gets rid of a LOT of baggage, including WEB-INF but having the same protections as being under WEB-INF. > Again, strictly talking about static resources, I would be absolutely > SCHOCKED to learn this is the case under most circumstances. That would > be like saying a Cadillac could beat a NASCAR vehicle in 1 ten-lap > race... It might be able to under some circumstances, like the NASCAR > driver being drunk!, and certainly there are some very nice trade-offs > to driving the Caddy like more room and a better stereo, but in general > you wouldn't expect the Caddy to lose. In this case the analogy, IF apt, is the reverse. The custom server is the NASCAR. All the doodads needed on an app or a web server can be pealed off and serious savings with multithreading, parsing presumptions, etc. can be realized. > A bit of hyperbole there, but the underlying point is what's important. I enjoyed the ride in the caddy. Had the stereo on a good jazz station in my mind with Lead Belly growling at me. The metaphor is apt but really, when you are talking a mini-quick-custom server, reversed. I am actually surprised that there are not more of these little speedy and specialized servers around. Jack "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging remote IP address
> Let's not equate IPs with users. The fact of the matter is there are a > lot of places that use cable routers to share one internet IP with a > number of different clients. You probably did not have time to read all of the posts, David, but, the fact of the matter, I think everyone was clear on this one. > The facts of the matter are you have two different sessions with two > different login. Personally I would consider that enough to determine > there are two different people regardless of the common IP. Different sessions do not indicate two different people or two different machines anymore than the same ip address indicates the same person. I think that the original question, however, would have been happy with identifying two different machines. And, of course, one can do thatl So we do not have to make your assumption. Jack -- "You can lead a horse to water but you cannot make it float on its back." "Heaven has changed. The Sky now goes all the way to our feet. ~Dakota Jack~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)
In regard to our caching discussion, Frank, I think you will like the following article. The prior article about two essential filters is interesting too. http://www.onjava.com/pub/a/onjava/2004/03/03/filters.html?page=1 One thing seems certain: there is complete serverside cache control. -- "You can lead a horse to water but you cannot make it float on its back." "Heaven has changed. The Sky now goes all the way to our feet. ~Dakota Jack~ "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Windows service shutdown not invoking destroy()?
Yes. I have also experienced the same thing with unhappy results. On Fri, 4 Mar 2005 19:54:13 -0500, Daniel Rabe <[EMAIL PROTECTED]> wrote: > I'm running Tomcat 5.0.28 on Windows XP Pro as a Windows service. If I use > shutdown.bat to stop Tomcat, then the destroy() method of my servlet is > invoked. If I simply "stop" the Windows service, destroy() apparently is NOT > called. The behavior is not consistent; I've seen it work on one machine, but > not on another. I uninstalled and re-installed on the machine where it wasn't > working, and it didn't make a difference (still doesn't work). > > Has anyone else run into this? > > Thanks, > --Dan > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mime mappings to extensions
Anyone know where to get a comprehensive live of file extensions to mime types? I have 1020 file extensions and 175 mime types but have found only 85 mappings. Thanks for any assistance. This is for a download application. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Slightly OT] MVC approach when JSP are not allowed
Out of curiosity only, why were JSPs banned? That seems to be a bit of a mystery. Do they ban html too? Jack On Fri, 18 Mar 2005 23:33:02 -0500, Elihu Smails <[EMAIL PROTECTED]> wrote: > I am working on a project that uses servlets exclusively. I would > like to take advantage of a Model-View-Controller system in order to > develop my servlets. For the last servlet project I worked on, I was > in charge of the "back-end" data processing and did not have to mess > with HTML. This time I do have to roll up my sleeves and play with > HTML. > > So I ask the question. Since the requirement that I have is to use > servlets only, can I use something like Struts or Java Server Faces? > I am reading some information and it looks like they both rely on JSP > to ge the job done. > > Thank you for your time... > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat rookie needs help building application
First of all, welcome to the wonderful, wacky world of Java web programming. Second, Tomcat is the server that "serves up" your application. You are so new it is hard to tell what you know and don't know. Do you know the basic structure a web application must have in Tomcat including where web.xml is, whre the WEB-INF is, etc.? Third, you seem to be focusing on compiling classes, right? Tomcat does not build or compile web applications for you. Tomcat "serves up" the applications that are already running. Many times you have a development Tomcat server on which you run your applications so that you can easily test the applications. Different people have different levels of experience doing different things regarding compiling. The best thing you can do to learn about class compiling and loading is to learn all about CLASSPATH and ClassLoaders in Java. Then you can choose what to do, such as use Ant for compiling your classes, etc. Fourth, you might want to think about using a standard web framework at the start to assist your building a web application. A web framework, like Struts, codes some things you would have to do for yourself anyway. You can take the time it would take you to write all that framework code to pick out a good one that is pre-built for you. So, don't worry if it takes a little time. Jack On Sun, 20 Mar 2005 10:11:08 -0500 (Eastern Standard Time), Barry Kimelman <[EMAIL PROTECTED]> wrote: > > > I need help building my 1st Tomcat application. > > My system is a Windows XP PC. My version of Tomcat is 5.5.8. > I have tomcat installed under the directoryC:\Tomcat5.5 > > I have verified that the installation of Tomcat was successfull by visiting > http://localhost:8080. > Once at the test page, I also ran some of the JSP examples to verify that > everything was working correctly. > > My problem is that I can't build an application successfully. I have > searched the Tomcat documentation and several mailing list archives, but I > have not found any documentation that states, "This is how to build a Tomcat > application". I have organized my source code as described/recommended in > the Tomcat documentation. > I did have some success with Tomcat 5.0.16 under Linux Redhat9 a year ago, > and as I recall, you compiled your application from the command line using > the "Ant" utility. So I changed my current directory to the toplevel of my > project and issued the command "ant compile". I received the following error > message : > > BUILD FAILED > C:\barry\myproject\build.xml:146: taskdef class > org.apache.cataline.ant.DeployTask cannot be found > > Line 146 of my build.xml file is as follows : > classname="org.apache.catalina.ant.DeployTask"/> > > > I searched the JAR files under my Tomcat installation and found that the JAR > file located at > C:\Tomcat5.5\server\lib\catalina-ant.jar conatins the "missing" class. > > According to the Tomcat documentation that I read, JAR files placed under > $CATALINA_HOME/common/lib > are available both to web applications and internal Tomcat code. So I copied > the JAR file under that directory and once again attempted to build my > project/application. However, I received the same error message > > What do I need to do in order to build/compile my Tomcat5 project ? Is there > a "How to build a Tomcat5 Project" document ? > > Please help a confused rookie. > > * > > Barry Kimelman > Toronto, Ontario, Canada > email : [EMAIL PROTECTED] , [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Returning a different .jsp than the one the browser asked for...
I don't know if this is helpful, but if you have a front controller in your architecture, which would be normal,, this sort of behavior would be simple to code. Do you have a front controller? On Apr 11, 2005 9:43 AM, Kurt Overberg <[EMAIL PROTECTED]> wrote: > > Gang, > > I've scoured the net looking for something that would help me do this- > currently > looking at Wrapping the HttpServletRequest, but not having much luck. > > Environment: tomcat 5.0.28 on linux, also using struts 1.1 > > I'm trying to make my system so that if a user asks for something like > /pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists > and if it does, it returns (executes, whatever) that page. Otherwise it will > return /pages/testing.jsp. It seems like the tomcat (or was it struts?) used > to > do something like this where if testing_fr.jsp existed, and the person's > locale > was set to "FR" it would return that, but that appears to have gone away and I > can't really find anything on it. ANY help or pointers would be greatly > appreciated! Thanks! > > /kurt > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session object not the same in different JSP's
Is there any chance that you are finding these results while running two instances of the same browser on the same client machine? On Apr 11, 2005 9:56 AM, Adam Lipscombe <[EMAIL PROTECTED]> wrote: > Folks, > > I have an odd problem the manifests intermittently with TC 5.0.27 and Struts > 1.1. I am not sure if it's a TC problem or Struts. I think its TC, but > apologies if this is not the correct forum. > > The problem is this: > > If validation errors are detected the app code stores them in the Struts > ActionError(s) object in the usual manner. The source JSP is then > re-displayed and a modal dialog box (another JSP) is popped (via calling a > Struts .do URL) to display the errors. > > The ActionErrors object is passed from the ,ain JSP to the modal dialog box > JSP by storing it in the session object. The dialog code then fishes out the > ActionErrors object and loops through the errors, displaying each one. > > Most of the time this works fine. However occasionally the session object > that is used by the caller (i.e. the JSP) and the dialog are not the same > instance. i.e. The ActionErrors Object is stored in session X but the modal > dialog JSP uses session Y. > > I was surprised by this to put it mildly. I thought the session had to be > the same. > > If I restart TC having cleared out the work dir it all seem OK again. > > Does anyone have any ideas? > > TIA - Adam > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I restrict access to webapps applications from browser users?
The best way to insure safety, in my opinion, is to use a front controller that acts as a traffic cop, sending all traffic to a presentation tier kept under WEB-INF. On 4/13/05, Ikonne, Ike <[EMAIL PROTECTED]> wrote: > Hi Fritz, > > So, are you saying that I have to have basic authentication enabled in order > to restrict > access to certain directories? > > Thanks, > > Ike > > > -Original Message- > From: Fritz Schneider [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 13, 2005 11:04 AM > To: 'Tomcat Users List' > Subject: RE: How do I restrict access to webapps applications from > browser users? > > Ike. > > You need to complete your with authorization, login, > and role information. Here is what works for me: > > > > > Restricted Files > /* > > > >app1 > > > > > > BASIC > My Application > > > > > > The role that is required to log in to the application > > app1 > > > You might also want to check out the single login valve. > > Fritz > > - > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reflection for custom taglibs killing performance...
1000 on a page? Really? That seems very odd to me given my experience. What would a page like that look like? Do you have examples? On 4/17/05, Kevin Burton <[EMAIL PROTECTED]> wrote: > QM wrote: > > >On Sun, Apr 17, 2005 at 03:44:59PM -0700, Kevin Burton wrote: > >: We've had a few bottlenecks in our code that have since been removed but > >: the remaining big bottleneck is Tomcat. The JSP engine is creating > >: compiled code that is heavily relying on reflection. > >: [snip] > >: > >: Is there ANY way to get Tomcat to not use reflection in this situation. > > > >How could a tag work without reflection? > >For example, if you use any of the expression-language features, how is > >Tomcat supposed to react to, say, > > > > ${request.somvar.something} > > > >without dynamic invocation? > > > > > > > I'm not sure about this mechanism but if you take a function like: > > > > and rewrite it to use > > > > > > Then it won't use reflection. > > This is why c:set and c:choose and so forth work so well. > > There isn't a perf penalty here. > > So this means I'll have to rewrite all my function calls to elements > that are in tight loops. > > There's also no reason that it MUST use reflection. I mean its a CODE > generator so all you have to do is generate code that doesn't use > reflection and calls the methods directly. > > There.s about a .5ms overhead for reflected functions and if you have > 1000 on a page (EASY!) then it will be DOG slow. > > >While I doubt you could make Tomcat not use reflection (without > >completely hacking the source) perhaps you could share more details of > >what you're doing... that may give the rest of us insight to help you > >trim the bottlenecks more. i.e. you mention lots of looping and > >tag nesting; is there any way to change how that's done? > > > > > > > Well I think I'm going to have to review all forms of code that cause > this and rewrite them. > > The BIGGEST problem as I currently see it is with .tag files. These use > reflection but I can't figure out a way to rewrite them. > > I think if i were to do this it would yield DRAMATIC performance > improvements. > > The REAL issue is that enabling developers to shoot themselves in the > foot like this is really irresponsible and probably needs to be removed > or a HUGE warning be placed before examples. > > Kevin > > -- > > Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. > See irc.freenode.net #rojo if you want to chat. > > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reflection for custom taglibs killing performance...
Why would you have to have an entirely new "reflection" for more than one database call? That sound like a design SNAFU to me. Looks to me like you should be having one use of reflection instead of 1000. Jack On 4/17/05, Kevin Burton <[EMAIL PROTECTED]> wrote: > Dakota Jack wrote: > > >1000 on a page? Really? That seems very odd to me given my > >experience. What would a page like that look like? Do you have > >examples? > > > > > So psuedo code... > > - get a list of objects from your DB.. Say 500 > - for each object >tag A >tag B >tag C >fn:length > > And so forth... Thats 2000 reflection calls and about 500ms. REALLY > slow. Horribly slow in fact :-/ > > Kevin > > -- > > Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. > See irc.freenode.net #rojo if you want to chat. > > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reflection for custom taglibs killing performance...
Why don't you break it down and find out where the time is going? On 4/18/05, Kevin Burton <[EMAIL PROTECTED]> wrote: > QM wrote: > > >On Mon, Apr 18, 2005 at 02:19:15PM -0700, Kevin Burton wrote: > >: So its clearly not JUST reflected methods its something else on top of > >: it > > > >What does your profiler report? > > > >-QM > > > > > > > I can't for the life of me figure it out! > > It certainly reports that doTag is taking a LOT of time but not WHY its > taking a lot of time. > > Its reporting that reflection is hurting performance but this is only > about 200ms vs 2500ms for the tag stuff. > > So I might have been wrong that Reflection is causing the problem and it > MIGHT be a problem with the tag constructor or some other issue which is > causing performance problems. > > Are there any options or any other ways to make .tag files which could > change this behavior? > > I'm all ears... > > -- > > Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. > See irc.freenode.net #rojo if you want to chat. > > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Temp File Bloat
I am getting a major build up in my temp directory: c://application/j2se c://application/server c://application/server/webapps/ROOT c://application/temp The files being stored there are keeping resources, e.g. thumbnail images, "in the air", making them unavailable for modication. Can someone tell me what is up? Thanks. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Temp File Bloat
This "bloat" appears to be related to fonts. The files all seem to refer to various fonts. On 4/18/05, Dakota Jack <[EMAIL PROTECTED]> wrote: > I am getting a major build up in my temp directory: > > c://application/j2se > c://application/server > c://application/server/webapps/ROOT > c://application/temp > > The files being stored there are keeping resources, e.g. thumbnail > images, "in the air", making them unavailable for modication. Can > someone tell me what is up? Thanks. > > Jack > > -- > "You can lead a horse to water but you cannot make it float on its back." > ~Dakota Jack~ > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic to static conversion
There is no reason I can think of to build static pages dynamically. I know what you are asying, but it makes little sense, I think. However, if you want to get the static equivalent of a dynamic page, all you have to do is to build a little application browser which gets the output of your pages and saves them. You can get the code for doing this pretty much from the COS message classes. Jack On 4/29/05, Dola Woolfe <[EMAIL PROTECTED]> wrote: > Hi, > > A friend of mine has asked me to help him build an > "eBay store". So I need to build a bunch of static > pages. > > I think that it is still a good idea to do so > programmatically (the only way I know how to do it!) > through jsp. Do you agree? > > How would I then convert pseudo-dynamic pages to > static in an automated fashion? > > Or if you have any other ideas or experiences, please > share! > > Many thanks in advance, > > Dola > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving files using tomcat
gt; > > If I can just redirect the browser to a file in the tomcat temp directory > > (can I do that, will the use have access to that directory), then how do I > > translate the location of the temp directory to a url that is accesible > > outside. > > > > If not then what other suggestions can people give me. > > > > Thanks in advance > > > > Steve > > > > > > > > - > > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic reference to files on server
Your code looks pretty good. What is the trouble? Do you have something like the following? fontStream = new FileInputStream(file); font = Font.createFont(Font.TRUETYPE_FONT,fontStream); font = font.deriveFont(attributes); where attributes sets the logical and family font names? On 5/6/05, Daniel Watrous <[EMAIL PROTECTED]> wrote: > Hello, > > I am writing an application which needs to load font files. The font > files are deployed with other classes on the server (i.e. under the > WEB-INF/classes directory). Currently I have the reference built in > like this > > //private static final String pathToWebapp = > "/var/tomcat/jakarta-tomcat-5.0.25/webapps/words2walls"; > private static final String pathToWebapp = "C:\\Program > Files\\Apache Software Foundation\\Tomcat 5.0\\webapps\\words2walls"; > //private static final String pathToPackage = > "/WEB-INF/classes/com/words2walls/fonts/"; > private static final String pathToPackage = > "\\WEB-INF\\classes\\com\\words2walls\\fonts\\"; > > and I use the above variables as follows: > > File fontFile = new File (pathToWebapp+pathToPackage+filename); > FileInputStream fis = new FileInputStream(fontFile); > font = Font.createFont(Font.TRUETYPE_FONT, fis); > > I tried unsuccessfully to use the class loader, but this might just be > my ineptitude. Can someone suggest a way for me to reference these > font files dynamically so that I can more easily deploy it in > different locations? Thanks! > > Daniel > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trouble with Font objects in Tomcat
I agree 100% with Farhad. The problem is not with headless but with your code. The exception tells you exactly what is happening. Your code is not finding the font. If you want to build fonts, you have to upload the font files with the right TextAttribute settings. On 5/7/05, Daniel Watrous <[EMAIL PROTECTED]> wrote: > Is there at least someone that could tell me where to find more > information about the option "JAVA_OPTS=-Djava.awt.headless=true"? > What exactly is its purpose? Thanks in advance. > > Daniel > > On 5/6/05, Daniel Watrous <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I have a web application that uses java.awt.Font objects to render > > images. The application will run in tomcat and that is where I have > > done development. When I first tried to run the application on a > > Linux box with Tomcat 5.0.25 I got the following error: > > > > java.lang.NoClassDefFoundError > > at com.words2walls.customquote.CustomQuote.getQuoteFontName(Unknown > > Source) > > at > > com.words2walls.webapp.filters.SessionQuoteFilter.doFilter(Unknown Source) > > > > Here is the code call that throws the error: > > public String getQuoteFontName() { > > return QuoteFontType.getInstance(this.quoteFontCode).toString(); > > } > > > > And the class that is being called: > > /* > > * QuoteFontType.java > > * > > * Created on April 15, 2005, 9:41 AM > > */ > > > > package com.words2walls.customquote; > > > > import java.awt.Font; > > import java.awt.FontFormatException; > > import java.util.*; > > import java.io.*; > > > > import com.words2walls.customquote.exceptions.FontNotFoundException; > > > > /** > > * Type safe enumeration of available fonts > > * > > * @author Daniel Watrous > > */ > > public class QuoteFontType { > > > > private static final String pathToWebapp = "C:\\Program > > Files\\Apache Software Foundation\\Tomcat 5.0\\webapps\\words2walls"; > > private static final String pathToPackage = > > "\\WEB-INF\\classes\\com\\words2walls\\fonts\\"; > > private String fontName; > > private int fontCode; > > private Font font; > > private static org.apache.log4j.Category cat = > > > > org.apache.log4j.Category.getInstance(QuoteFontType.class.getName()); > > > > public static final QuoteFontType ADORABLE = new > > QuoteFontType(1,"Adorable","adorable.ttf"); > > private static final Map INSTANCES = new HashMap(); > > > > static { > > cat.debug("Enter Static block to place fonts in INSTANCES Map"); > > INSTANCES.put (ADORABLE.toInteger(), ADORABLE); > > cat.debug("Exit Static block with INSTANCES.size() = " + > > INSTANCES.size()); > > } > > > > /** Creates a new instance of QuoteFontType */ > > private QuoteFontType(int code, String fontName, String filename) { > > // create a font from the font file > > try { > > File fontFile = new File (pathToWebapp+pathToPackage+filename); > > FileInputStream fis = new FileInputStream(fontFile); > > font = Font.createFont(Font.TRUETYPE_FONT, fis); > > } catch (Exception e) { > > throw new FontNotFoundException(e); > > } > > // set member variables > > this.font = font; > > this.fontCode = code; > > this.fontName = fontName; > > } > > > > public String toString() { > > return fontName; > > } > > > > public Integer toInteger() { > > return new Integer(fontCode); > > } > > > > public static QuoteFontType getInstance(int code) { > > return (QuoteFontType) INSTANCES.get(new Integer(code)); > > } > > > > public Font getFont() { > > return font; > > } > > > > } > > > > After some googling I found that if I set an environment variable > > "JAVA_OPTS=-Djava.awt.headless=true" that this error would go away. > > I'm not sure why this is the case, but it worked. > > > > I am now trying to test the application on a windows machine with > > Tomcat 5.0.30 and I get the same error. I have set a Windows XP > > environment variable the same as mentioned above. I have also added > > the option to the Java tab of the Tomcat monitor under Java Options:. > > > > What is the cause of this error? Is there some way that I can make it > > work on both Windows and Linux? Thanks in advance. > > > > Daniel > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trouble with Font objects in Tomcat
trying to test the application on a windows machine with > Tomcat 5.0.30 and I get the same error. I have set a Windows XP > environment variable the same as mentioned above. I have also added > the option to the Java tab of the Tomcat monitor under Java Options:. > > What is the cause of this error? Is there some way that I can make it > work on both Windows and Linux? Thanks in advance. > > Daniel > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Common vs. Shared
I have not read all the responses, but: Bootstrap | System | Common / \ Catalina Shared / \ Webapp1 Webapp2 ... On 5/5/05, Michael Oliver <[EMAIL PROTECTED]> wrote: > > > > I am quite sure this has been asked and answered but I googled a bunch of > combinations and didn't find the answer, so I am sure someone here will know > and share. > > > > What is the difference between the /common/ and /shared/ > > > > I understand this is a class loader issue, and I have read the comments in > catalina.properties. > > > > What would go into 'common' that wouldn't go into 'shared' and vice versa? > > > > If a jar is in /common/lib/ and a different version of that jar is in > /shared/lib/ what will be the effect? > > > > Similarly, if I modify catalina.properties and add something to 'common' > that is already in 'shared', etc. > > > > Understanding the relationship between 'common' and 'shared' and the > intended use thereof should be of interest to more than just me. > > > > Ollie > > > > > > > > > > > > Loosely Coupled > > > > > > > > Mike Oliver > CTO > > Alarius Systems LLC > 6800 E. Lake Mead Blvd > Apt 1096 > Las Vegas, NV 89156 > > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > IM: [EMAIL PROTECTED] > http://www.alariussystems.com/ > > > tel: > fax: > mobile: > > (702)643-7425 > (702)974-0341 > (518)378-6154 > > > > > > > > > > > > > > Add me to your address book... > > Want a signature like this? > > > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Illegal IMail List Server Command! SPAM?
Getting rid of the thirty or so deadend emails from this would be nice? On 5/16/05, List Server <[EMAIL PROTECTED]> wrote: > New Atlanta List Server General Help File > - > > Lists hosted by this server are: > >bluedragon-interest >servletexec-interest >jturbo-interest > > Use one of these list names where you see in the command syntax > below. > > All list server commands must be addressed to: > >[EMAIL PROTECTED] > > Commands must be placed on the first line of the message body and may not be > preceded by blanks, whitespace, or other characters. > > Valid Commands are: > >To subscribe to a list: > >subscribe > >For example: > >subscribe servletexec-interest John Smith > >If you don't include your name in the subscribe command you'll receive an > "Invalid Syntax" error message from the list server. > >To unsubscribe from a list: > >unsubscribe > >To receive help send after subscribing to a list: > >help > > If you have any questions or need additional help, send email to: > >[EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a servlet receive its own request?
Requests from from a browser or any other suitable socket based mechanism that sends requests. Servlets and servers don't send requests, although you can have a client in a server that does send requests. You could, I suppose, even build a request making mechanism inside a servlet or as a field for a servlet. But, that does not mean the servlet is making the request qua Servlet. Servlets handle requests and return responses. Responses are not requests. Responses tend to be HTML and requests are name value pairs and streams. On 5/18/05, Michael Mehrle <[EMAIL PROTECTED]> wrote: > Simple question, but it's driving me nuts. I really don't want to get into > the whole web service business - all I need is for a servlet to be the > recipient of its own request. Or - in other words - can a servlet act like a > web browser - just without the GUI? > > Use case: > > - Servlet issues https request to an outside server (via > getServletContext().getRequestDispatcher(https://www.someoutsideserver/) ) > - Outside server processes request and responds with POST response (also via > https). > - Servlet [somehow] is able to be the recipient of the response. > - Servlet parses the response and stores data to the database. > > Notes: > > - The servlet is not the default servlet on that tomcat instance. > - Everything happens via https and I expect the outside server will listen > on 443 and tomcat on 8443 > > ANY suggestions would be very helpful - this seems to be a tricky one. > > TIA, > > Michael > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a servlet receive its own request?
You might want to look at the COS message classes. On 5/18/05, Michael Mehrle <[EMAIL PROTECTED]> wrote: > Simple question, but it's driving me nuts. I really don't want to get into > the whole web service business - all I need is for a servlet to be the > recipient of its own request. Or - in other words - can a servlet act like a > web browser - just without the GUI? > > Use case: > > - Servlet issues https request to an outside server (via > getServletContext().getRequestDispatcher(https://www.someoutsideserver/) ) > - Outside server processes request and responds with POST response (also via > https). > - Servlet [somehow] is able to be the recipient of the response. > - Servlet parses the response and stores data to the database. > > Notes: > > - The servlet is not the default servlet on that tomcat instance. > - Everything happens via https and I expect the outside server will listen > on 443 and tomcat on 8443 > > ANY suggestions would be very helpful - this seems to be a tricky one. > > TIA, > > Michael > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a servlet receive its own request?
Those classes are "browsers" without a GUI. I do this sort of thing all the time. On 5/18/05, Dakota Jack <[EMAIL PROTECTED]> wrote: > You might want to look at the COS message classes. > > On 5/18/05, Michael Mehrle <[EMAIL PROTECTED]> wrote: > > Simple question, but it's driving me nuts. I really don't want to get into > > the whole web service business - all I need is for a servlet to be the > > recipient of its own request. Or - in other words - can a servlet act like a > > web browser - just without the GUI? > > > > Use case: > > > > - Servlet issues https request to an outside server (via > > getServletContext().getRequestDispatcher(https://www.someoutsideserver/) ) > > - Outside server processes request and responds with POST response (also via > > https). > > - Servlet [somehow] is able to be the recipient of the response. > > - Servlet parses the response and stores data to the database. > > > > Notes: > > > > - The servlet is not the default servlet on that tomcat instance. > > - Everything happens via https and I expect the outside server will listen > > on 443 and tomcat on 8443 > > > > ANY suggestions would be very helpful - this seems to be a tricky one. > > > > TIA, > > > > Michael > > > > ----- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > "You can lead a horse to water but you cannot make it float on its back." > ~Dakota Jack~ > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Apache
The dynamic aspect of Tomcat is used to write HTML dynamically. This is unrelated to the service of applets. If all you are doing is serving an applet, you don't need Tomcat, as your HTML is static. I don't know what some of the other replies mean, but this much is clear. On 5/18/05, Anthony E. Carlos <[EMAIL PROTECTED]> wrote: > I think I need to ask a question before offering any information. > > When you say applet, do you mean a java applet that runs in a client's > browser window? Or, do you have a web application comprised of > servlets/jsps (or some analogous configuration)? > > -Anthony > > On May 18, 2005, at 10:37 AM, Chris wrote: > > I've been working with Tomcat for a while now, but I haven't messed > with Apache yet. Could someone explain or point me to something > explaining the differences between Tomcat and Apache? I have a large > applet hosted on Tomcat, and am investigating using Apache instead. Is > this feasable? TIA. > > Chris > > - > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Apache
For my own education, what the heck is "off-roading"? On 5/18/05, Chris <[EMAIL PROTECTED]> wrote: > > Apache is not a J2EE container - you are off-roading on this one ;-) > > Thanks. That was pretty much what I wanted to find out. BTW, I keep > hearing of people using Apache and Tomcat in conjunction. How does that > work? > > Chris > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Apache
I think there is not much question that the Apache server is far more efficient serving static html. Is there really any issue on that? If so, things sure have changed. I thought the comparison was like 5 to 1. Is that no longer true? On 5/18/05, Jason Bainbridge <[EMAIL PROTECTED]> wrote: > On 5/18/05, Chris <[EMAIL PROTECTED]> wrote: > > > If all you're doing is serve static pages, both are equivalent. > > > However, if you ever need dynamic content, either client or server > > > side, for example a page whose content is extracted from a database, or > > > a form for which you need to record the values, you need some kind of > > > intelligence. > > > > > > For that job, Apache relies on cgi and php, while Tomcat relies on > > > Servlets and JSP, both based on Java. > > > > > > Unless you have a good reason to switch to Apache, you should stick to > > > Tomcat. > > > > Ah, okay. The only reason we were considering switching to Apache was > > to possibly improve the performance of our Java applet. > > However the Apache Web Server may well have better performance when > serving large files, I don't believe I have seen any benchmarks > dealing with large files only smaller ones that you typically see > included in a web page like images. I would recommend at least doing > some testing by serving your applet under Apache. > > Just out of curiosity what does your large applet do? From the sound > of it it was like 60mb, which is quite a large applet to say the > least... > > -- > Jason Bainbridge > http://kde.org - [EMAIL PROTECTED] > Personal Site - http://jasonbainbridge.com > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java and Java 1.5 on same machine
Just use different ports. On 5/19/05, Didier McGillis <[EMAIL PROTECTED]> wrote: > How can Java 1.4.2 and Java 1.5 co-exist on one server. I need to run > Tomcat 55 with Java 1.5 and my development Tomcat with java 1.4.2 on the > same machine. > > I have just installed Java 5 and Tomcat 5.5.9 for evaluation and testing > before migrating to the newer versions. However I only have one test > machine and that is also used for the existing development server and so > therefore has Tomcat 5.0.18 and Java 1.4.2. > > Even though I went in to the profile and added JAVA5_HOME and > CATALINA55_HOME and JRE5_HOME, and substituted those in the catalina.sh > file. When I run startup.sh it will show JRE5_HOME as java1.5... but doing > a ps will show that its actually using java1.4. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java and Java 1.5 on same machine
Don't change the name of the variables but the value. On 5/19/05, Didier McGillis <[EMAIL PROTECTED]> wrote: > How can Java 1.4.2 and Java 1.5 co-exist on one server. I need to run > Tomcat 55 with Java 1.5 and my development Tomcat with java 1.4.2 on the > same machine. > > I have just installed Java 5 and Tomcat 5.5.9 for evaluation and testing > before migrating to the newer versions. However I only have one test > machine and that is also used for the existing development server and so > therefore has Tomcat 5.0.18 and Java 1.4.2. > > Even though I went in to the profile and added JAVA5_HOME and > CATALINA55_HOME and JRE5_HOME, and substituted those in the catalina.sh > file. When I run startup.sh it will show JRE5_HOME as java1.5... but doing > a ps will show that its actually using java1.4. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing images through FrontController Servlet
You are right that a call for an image, or css for that matter, is another call to the server. And, this call is really not anything special, except that it returns a stream. If you want to get a response from a URL, then you have to follow the rules in doing this. If you instead want to get a response from a protocol, like using a servlet, then you have different rules. There is nothing really magical going on. Why are you using this "init" business? On 5/21/05, William BC Crandall <[EMAIL PROTECTED]> wrote: > Thanks Robert, > > Hard-coding the images works fine, but I'm leery of this, > as they will of course all need to be changed when the app > goes up on a public server; changes could be localized, but... > > Is there really no way to declare calls in the web-app > that would allow images to use relative path names? > > The init-param 'imgURL' sounds like it should allow this, > but I'm not familiar with it. > > Thanks for your suggestion, which gets things moving again. > Thanks too for the pointer to Ethereal; looks like a useful tool. > > Best, > > -BC > > William BC Crandall > bc.crandall [around] earthlink.net > > > > - Original Message - > From: "Robert r. Sanders" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: 20 May 2005 8:36 PM > Subject: Re: Accessing images through FrontController Servlet > > > > Do you have any logs of what's going on? Also, make sure the pages are > > using the tag (or equivalent), as the image paths need to be > > relative to the url that the client browser see - should be able to hard > > code the path to be /ntrr/images/whatever.jpg > > > > To check for bad paths first view page source from your browser, then > > you can get the image urls and see if they map to the correct path. > > There are also some nice tools that you can run to see what's going on, > > for instance the "Live Headers" extension for Firefox, or Ethereal for a > > more general solution > > > > William BC Crandall wrote: > > > > >Hello, > > > > > >I'm starting a new project, using a FrontController servlet > > >(http://java.sun.com/j2ee/patterns/FrontController.html), > > >and am unable to access image files. > > > > > >My understanding is that each invokes another call > > >to the server/servlet, which, due to the mapping in web.xml, > > >is channeled through the controller servlet, which rejects > > >the call because it does not point to a sub-servlet. > > > > > >How can I access images in webapps/ntrr/images/ ? > > > > > >My web.xml: > > > > > > > > > > > > > > > > > > controller > > > > > > > > > org.ntrr.core.ControlServlet > > > > > > > > > > > > > > > > > > controller > > > > > > > > > /* > > > > > > > > > > > > > > > > > >I have tried, without success, adding: > > > > > > > > > imageUrl > > > http://localhost:8080/ntrr/images/ > > > > > > > > >The files in webapps/ntrr/images/ ARE accessible from > > >webapps/ntrr/css/ntrr.css, when called as background > > >page images, for example. > > > > > >Any suggestions welcomed. > > > > > >Thanks, > > > > > >-BC > > > > > >William BC Crandall > > >bc.crandall [around] earthlink.net > > > > > > > > >- > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > -- > > Robert r. Sanders > > Chief Technologist > > iPOV > > (334) 821-5412 > > www.ipov.net > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat 5.0.28 batch files?
I am running out of memory when running some imaging ops with Tomcat 5.0.28 and need to set the java command with the attributes -Xms32m, -Xmx256m, and -Xrs. However, danged if I can figure out how to do that. I am using the simple startup.bat and shutdown.bat. Where is the place I plugin with those values? Thanks? -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New to struts
Raja you would be much better off to read the manuals and books already available on Struts. They will be more helpful to you than some offhand stuff here on the list. Also, there is a Struts list which would be more appropriate and more helpful to you than this list on this question. Good luck! On 5/22/05, raja buddha <[EMAIL PROTECTED]> wrote: > Hi, > I am new to struts, I have installed tomcat on my system. Can any body > please let me the steps how to configure and run the struts on my tomcat > server. > > Please exaplane me what are the jar files are need and let me know where to > keep thouse jar files. Please explain indetail. > > Thanks in advance > > Raj > > _ > Express yourself instantly with MSN Messenger! Download today - it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat 5.0.28 batch files?
Thanks for the assistance. I finally figured this out, for future people trying to find the same answer. The environmental variables at the top of catalina.bat can be set there. So, I added: SET CATALINA_OPTS=-Xms512m -Xmx512m -Xrs after rem rem CATALINA_OPTS (Optional) Java runtime options used when the "start", rem "stop", or "run" command is executed. rem in catalina.bat. On 5/23/05, Parsons Technical Services <[EMAIL PROTECTED]> wrote: > Jack, > > To use the batch files you need to set it as an Environment Variable. The > catalina.bat file will the pick it up and add it to command line. > > If you are wanting to do some quick testing, I think you MAY be able to > include it on the command line with startup.bat. I don't run on Windows so I > can't test it. > > If you look in the catalina.bat you will see the comments at the top talking > about the variables. If you look in startup.bat you will see where it picks > up the command line variables. > > The .sh files are the nix OS equivalent to the Windows .bat files. > > Doug > > - Original Message - > From: "Edao, Aliye" <[EMAIL PROTECTED]> > To: "Dakota Jack" <[EMAIL PROTECTED]> > Cc: "Tomcat Users List" > Sent: Monday, May 23, 2005 2:57 AM > Subject: AW: Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat 5.0.28 > batch files? > > > Hi Jack, > > The answer is CATALINA_HOME/bin/catalina.sh > > CATALINA_OPTS="-Xmx512m -Xss1024k -XX:+PrintGCDetails -server" ... > > > > Mit freundlichem Gruß / kind regards > > SBS ORS GD AHS OA42 > Otto-Hahn-Ring 6 > D - 81739 München > Tel. (089) 636-41024 > Fax (089) 636-49347 > > Dr. Aliye Edao > mailto:[EMAIL PROTECTED] > > > > -Ursprüngliche Nachricht- > Von: Dakota Jack [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 23. Mai 2005 08:48 > An: Tomcat Users List > Betreff: Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat 5.0.28 batch > files? > > > I am running out of memory when running some imaging ops with Tomcat > 5.0.28 and need to set the java command with the attributes -Xms32m, > -Xmx256m, and -Xrs. However, danged if I can figure out how to do > that. I am using the simple startup.bat and shutdown.bat. Where is > the place I plugin with those values? Thanks? > -- > "You can lead a horse to water but you cannot make it float on its back." > ~Dakota Jack~ > > - > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat 5.0.28 batch files?
Hi, again, Frank, Where can I get a copy of the code/binaries for Java Service Manager (the update of Tomcat Service Manager)? I went to this site but there seems to be no reference to any downloads. On 5/23/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > And just to let you know, should you ever need/want to run Tomcat as a > service, it's a different story at that point. At least on Windows, those > settings are stored in the registry. If you ever need to go down that > road, I highly suggest a look at Tomcat Service Manager: > > http://web.bvu.edu/staff/david/index.jsp?section=software&subsection=tcservcfg&page=overview > > Of course, if your not on Windows or not running as a service, you already > have your answer :) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > On Mon, May 23, 2005 10:11 am, Dakota Jack said: > > Thanks for the assistance. > > > > I finally figured this out, for future people trying to find the same > > answer. The environmental variables at the top of catalina.bat can be > > set there. So, I added: > > > > SET CATALINA_OPTS=-Xms512m -Xmx512m -Xrs > > > > after > > > > > > rem > > rem CATALINA_OPTS (Optional) Java runtime options used when the > > "start", > > rem "stop", or "run" command is executed. > > rem > > > > in catalina.bat. > > > > > > > > On 5/23/05, Parsons Technical Services <[EMAIL PROTECTED]> > > wrote: > >> Jack, > >> > >> To use the batch files you need to set it as an Environment Variable. > >> The > >> catalina.bat file will the pick it up and add it to command line. > >> > >> If you are wanting to do some quick testing, I think you MAY be able to > >> include it on the command line with startup.bat. I don't run on Windows > >> so I > >> can't test it. > >> > >> If you look in the catalina.bat you will see the comments at the top > >> talking > >> about the variables. If you look in startup.bat you will see where it > >> picks > >> up the command line variables. > >> > >> The .sh files are the nix OS equivalent to the Windows .bat files. > >> > >> Doug > >> > >> - Original Message - > >> From: "Edao, Aliye" <[EMAIL PROTECTED]> > >> To: "Dakota Jack" <[EMAIL PROTECTED]> > >> Cc: "Tomcat Users List" > >> Sent: Monday, May 23, 2005 2:57 AM > >> Subject: AW: Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat > >> 5.0.28 > >> batch files? > >> > >> > >> Hi Jack, > >> > >> The answer is CATALINA_HOME/bin/catalina.sh > >> > >> CATALINA_OPTS="-Xmx512m -Xss1024k -XX:+PrintGCDetails -server" ... > >> > >> > >> > >> Mit freundlichem Gruß / kind regards > >> > >> SBS ORS GD AHS OA42 > >> Otto-Hahn-Ring 6 > >> D - 81739 München > >> Tel. (089) 636-41024 > >> Fax (089) 636-49347 > >> > >> Dr. Aliye Edao > >> mailto:[EMAIL PROTECTED] > >> > >> > >> > >> -Ursprüngliche Nachricht- > >> Von: Dakota Jack [mailto:[EMAIL PROTECTED] > >> Gesendet: Montag, 23. Mai 2005 08:48 > >> An: Tomcat Users List > >> Betreff: Where do -Xms32m, -Xmx256m, and -Xrs go in the Tomcat 5.0.28 > >> batch > >> files? > >> > >> > >> I am running out of memory when running some imaging ops with Tomcat > >> 5.0.28 and need to set the java command with the attributes -Xms32m, > >> -Xmx256m, and -Xrs. However, danged if I can figure out how to do > >> that. I am using the simple startup.bat and shutdown.bat. Where is > >> the place I plugin with those values? Thanks? > >> -- > >> "You can lead a horse to water but you cannot make it float on its > >> back." > >> ~Dakota Jack~ > >> > >> ----- > >> 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] > >> > >> > > > > > > -- > > "You can lead a horse to water but you cannot make it float on its back." > > ~Dakota Jack~ > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Showing Tomcat Icon rather than DOS icon
How can I write my Tomcat startup script to show the Tomcat icon on a PC bar rather than the DOS icon? Thanks -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The amazingly slow performance of JSP (profiler results)
You have to be and are comparing apples and oranges, Kevin, because JSP *is* Java. DOH! It cannot run slower than what it is. You probably are comparing just running a Java method like setFoo(String foo) { this.foo = foo; } where the parameter foo has the value "bar". But, this is really misleading. The "simple" code you write with in fact is just as complex as what you see and have provided in your email. So, if you want to compare, you have to do all that the code you see as *ugly* does. If you don't want to do all that, don't. But, that is not a problem with JSP and JSP is not a dog if used properly. That's all I have to say about that. On 5/27/05, Kevin Burton <[EMAIL PROTECTED]> wrote: > I've been tuning our application trying to get the maximum performance > out if the system as possible. > > I've been throwing the system at jprofiler and allowing it to tell me > where to optimized. > > In short Tomcat is slower than our DB, filesystem,. network and all > other systems by about 4x. > > I've been able to shave some page load time off by some but not enough. > > The problem I'm starting to see is that we just have a large number of > c:set and c:if constructs (and so forth) within loops. These loops then > get executed 5 times and next thing you know it you have 50k taglib calls. > > The problem comes when you look at the source: > > Let's say you start with: > > > > > This nice little elegant piece of code gets expanded to: > > > private boolean _jspx_meth_c_set_0(PageContext _jspx_page_context) > > throws Throwable { > > PageContext pageContext = _jspx_page_context; > > JspWriter out = _jspx_page_context.getOut(); > > // c:set > > org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = > > (org.apache.taglibs.standard.tag.rt.core.SetTag) > > _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); > > _jspx_th_c_set_0.setPageContext(_jspx_page_context); > > _jspx_th_c_set_0.setParent(null); > > _jspx_th_c_set_0.setVar("foo"); > > _jspx_th_c_set_0.setValue(new String("bar")); > > int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag(); > > if (_jspx_th_c_set_0.doEndTag() == > > javax.servlet.jsp.tagext.Tag.SKIP_PAGE) > > return true; > > _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); > > return false; > > } > > Which explains why JSP alone is so amazingly slow! > > > I did a comparison of the page performance here and it was 15x slower than > just using Java. So the same "set" operation in Java was 15x faster. > > ... so in short ... does anyone have any way to speed this up? > > The other thing I noticed is that EL is evaluated at runtime (which has to be > parsed) and sometimes uses reflections. Can anyone shed any more light on > this and hopefully provide some performance optimization suggestions? > > Kevin > > -- > > > Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. > See irc.freenode.net #rojo if you want to chat. > > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The amazingly slow performance of JSP (profiler results)
Whether he is precompiling or not, Peng, and I know that is important, he is still comparing applies and oranges. Further, he is comparing the setup for any and all uses of with pojo code that he does not give the same infrastructure accounting, apparently. The whole question fails to see the parameters of the test situation. On 5/28/05, Peng Tuck Kwok <[EMAIL PROTECTED]> wrote: > Just to check are your precompiling the jsp page? > > On 5/28/05, Kevin Burton <[EMAIL PROTECTED]> wrote: > > I've been tuning our application trying to get the maximum performance > > out if the system as possible. > > > > I've been throwing the system at jprofiler and allowing it to tell me > > where to optimized. > > > > In short Tomcat is slower than our DB, filesystem,. network and all > > other systems by about 4x. > > > > I've been able to shave some page load time off by some but not enough. > > > > The problem I'm starting to see is that we just have a large number of > > c:set and c:if constructs (and so forth) within loops. These loops then > > get executed 5 times and next thing you know it you have 50k taglib calls. > > > > The problem comes when you look at the source: > > > > Let's say you start with: > > > > > > > > > This nice little elegant piece of code gets expanded to: > > > > > private boolean _jspx_meth_c_set_0(PageContext _jspx_page_context) > > > throws Throwable { > > > PageContext pageContext = _jspx_page_context; > > > JspWriter out = _jspx_page_context.getOut(); > > > // c:set > > > org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = > > > (org.apache.taglibs.standard.tag.rt.core.SetTag) > > > _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); > > > _jspx_th_c_set_0.setPageContext(_jspx_page_context); > > > _jspx_th_c_set_0.setParent(null); > > > _jspx_th_c_set_0.setVar("foo"); > > > _jspx_th_c_set_0.setValue(new String("bar")); > > > int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag(); > > > if (_jspx_th_c_set_0.doEndTag() == > > > javax.servlet.jsp.tagext.Tag.SKIP_PAGE) > > > return true; > > > _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); > > > return false; > > > } > > > > Which explains why JSP alone is so amazingly slow! > > > > > > I did a comparison of the page performance here and it was 15x slower than > > just using Java. So the same "set" operation in Java was 15x faster. > > > > ... so in short ... does anyone have any way to speed this up? > > > > The other thing I noticed is that EL is evaluated at runtime (which has to > > be parsed) and sometimes uses reflections. Can anyone shed any more light > > on this and hopefully provide some performance optimization suggestions? > > > > Kevin > > > > -- > > > > > > Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. > > See irc.freenode.net #rojo if you want to chat. > > > > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > > > >Kevin A. Burton, Location - San Francisco, CA > > AIM/YIM - sfburtonator, Web - http://peerfear.org/ > > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > > > > > - > > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The amazingly slow performance of JSP (profiler results)
I agree with this. There really is *not* a lot of code in what Kevin showed us, because the page code has to be there whether you have one or 500 invocations, tags, on the page. This just makes it look large because all the setup is attributed to one measely little tag. On 5/28/05, Remy Maucherat <[EMAIL PROTECTED]> wrote: > On 5/28/05, Peter Lin <[EMAIL PROTECTED]> wrote: > > as you see already, using JSTL means a single line of code gets > > converted to several lines of JSTL api calls. once you look at how > > many classes are involved in executing JSTL, it's pretty clear it's > > using much more memory and causing more GC. The performance you see is > > the result of JSTL using more memory. > > It will obviously use more CPU and make more API calls. However, it > does not allocate any objects, but instead will reuse per page objects > (which is very fast). So overall, it sounds weird to me that the > bottleneck would be on tag invocation. > > In the end, it's hard to beat a Java "if" with a generic high level > construct ;) I don't understand how anyone could be surprised by that. > > > Back in 2002, I wrote several pages using JSP + java and JSP + JSTL to > > measure the actual cost of from a performance perspective. The > > performance difference isn't noticeable if a page has less than 50 > > tags. With 200+ tags, the performance difference does range from 2-5x > > slower for JSTL. It's worse when you use XML with JSTL. It's also one > > of the reasons I like to use JSTL + XML to benchmark. It really gives > > the VM a workout. > > > > have you tried running JRockit 5? I did some tests recently and > > JRockit's memory management might give you a 2x improvement in > > performance. That's assuming you can use jdk5 > > Right, the code for invoking tags seems to be a good candidate to be > optimized by a competent JIT. > > -- > x > Rémy Maucherat > Developer & Consultant > JBoss Group (Europe) SàRL > x > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validating a session
The following is a pretty good, even if ugly, article on session ids, Frank. Very comprehensive and it should cover in some part whatever you are working on: http://www.technicalinfo.net/papers/WebBasedSessionManagement.html On 5/31/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > This might seem bizarre, but... > > Assume that a request contains a session ID as a parameter. Is there a > way *programmatically* to validate that session ID? > > In other words, the query string contains the session ID, and in a servlet > I need to be able to ask the container if it is valid or not. But, for > reasons that would probably make your head spin if I explained, I cannot > simply allow the container to do it, I need to be able to do it from my > own code. > > Moreover, this can't be a Tomcat-specific solution. > > Any takers? :) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple question on HTTP return codes
Just a small note, Frank. You use sendError(int sc) for errors but setStatus(int sc) for codes that are not errors. On 5/31/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Yep, I *should* have known that :)... > > The sendError() method of HttpServletRequest does it. Sorry for wasted > bandwidth! > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > On Tue, May 31, 2005 3:13 pm, Frank W. Zammetti said: > > I fear I should know this answer, but... > > > > How can one, from a servlet (or Struts Action maybe) "throw" a specific > > HTTP return code? I need to return a 403 from a servlet if certain things > > are not present in the request... is it just a matter of setting a > > particular header, or is there something to throw, like an exception? > > > > Thanks all! > > > > -- > > Frank W. Zammetti > > Founder and Chief Software Architect > > Omnytex Technologies > > http://www.omnytex.com > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet Concurrency Issues
Your best bet for understanding multithreading issues is to get a good understanding of the JVM. On 6/8/05, Michael Pasko <[EMAIL PROTECTED]> wrote: > Thanks Chuck, that was exactly the problem. I was under the very poor > assumption that a new thread and newly instantiated servlet object was > created every time a request was made, instead of all threads working on > only one instance of an object. To mimic the desired behavior I've fixed > the problem by adding this (implements SingleThreadModel)... > > public class ServletName implements SingleThreadModel > > Now it would seem that if several 100 people were to access a servlet that > every time the following code was hit by a new thread: > > PrintWriter out = response.getWriter(); > > It would direct all output (using out.println()) from all threads to the > most recent person to access the servlet. > > Follow up question: With this in mind, what is the most common method of > writing thread safe code? > > Thank you very much for your help. > > -Mike > > -Original Message- > From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 07, 2005 1:15 PM > To: Tomcat Users List > Subject: RE: Servlet Concurrency Issues > > > From: Michael Pasko [mailto:[EMAIL PROTECTED] > > Subject: Servlet Concurrency Issues > > > > I started allowing other users on it, I stumbled on some problems. > > Basically what happens, when user A submits the form, and then 2 > > seconds later user B submits the same form. User A stops getting > > results, and User B receives the output for his request as well as > > the end of User A's request. > > Probably not a configuration problem but rather implementation errors in > your servlet or some related object (such as the DB connection). > There's normally only one copy of the servlet object, and it will be > used concurrently by multiple threads. Make sure you're not storing > request-specific information in there. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http session lost between struts action
There is nothing wrong. You don't have a new session in your browser. On 6/23/05, angelina zh <[EMAIL PROTECTED]> wrote: > Hi, > > Can anyone please help me on this session lost issue? > > Here is the problem I am getting: > > -- If I open a IE 6.0 browser and log into the web site we are developing, I > get into a welcome page with a few of link options. In the login action > class, we set some attributes into the session. If I click on any of the > links, I got null pointer exception in next action class when we try to get > attributes from the session. I tried to use Eclipse to debug, noticed that > the session of the request after the welcome page became to null. > > --If I keep that browser open and go to the log in page again. After I log > in, I get into the welcome page and if I click any of the links now, the > session of the request is not null and I can go to any links without any > problem. The null pointer did not occur in the following action class. > > --If I close the browser then open browser again, I get NullPointerException > again if I repeat those steps. > > What might be wrong? > > Thanks so much in advance. > > Angelina > > > > - > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http session lost between struts action
Again there is nothing wrong, so the fix does not help. ///;-) On 6/23/05, angelina zh <[EMAIL PROTECTED]> wrote: > Michael, > > Thank you so much for your reply. The login page is a JSP page. In the JSP > page, the login form's mothod is post and the action is a struts action. > > After login, we did some internal redircts for security checking and then > take the user to the welcome page. The welcome page is generated from XML > using xslt. > > We have a FrontController which extends ActionServlet from struts to handle > request and response. I kept very close watching of the requests. I am very > sure that the session has been established on the login page and kept valid > till the welcome's action got invoked and the welcome page got constructed. > After I clicked one of the links on the welcome page, I noticed that when the > FrontController got invoked, the session had became to null. So we lost > session before the next action class get invoked. > > We can easier re-create the session object, but we lost the attributes we set > in the last session. The following action classes will need those attriutes. > > I am wondering why the session keep valid if I login to the page again > without closing browser. But the session get lost if I open another browser > to log in. > > And another interesting thing is the session get lost in another place in the > production enviroment. > > I am not sure this is a tomcat issue or a struts issue. > > Michael, any help will be greatly appreciated. > > > > > - > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http session lost between struts action
Again, there is no problem, so don't accept any solutions. You leave some (most actually) open and the session remains open. On 6/26/05, Torsten Römer <[EMAIL PROTECTED]> wrote: > But they use Struts, where URL rewriting is done automatically if > cookies are disabled, presumed the relevant tags are used rather than > plain HTML links, for example. > > Maybe that's the problem, that in some link, form action or redirect the > jsessionid is missing. Then of course the session is lost. > > Torsten > > Charl Gerber schrieb: > > If your session data is stored as a session cookie (I > > *think* this is default behaviour), then your session > > will get lost if you have cookies disabled on your > > browser. > > > > > > > > --- angelina zh <[EMAIL PROTECTED]> wrote: > > > >>Michael, > >> > >>Thank you so much for your reply. The login page is > >>a JSP page. In the JSP page, the login form's mothod > >>is post and the action is a struts action. > >> > >>After login, we did some internal redircts for > >>security checking and then take the user to the > >>welcome page. The welcome page is generated from XML > >>using xslt. > >> > >>We have a FrontController which extends > >>ActionServlet from struts to handle request and > >>response. I kept very close watching of the > >>requests. I am very sure that the session has been > >>established on the login page and kept valid till > >>the welcome's action got invoked and the welcome > >>page got constructed. After I clicked one of the > >>links on the welcome page, I noticed that when the > >>FrontController got invoked, the session had became > >>to null. So we lost session before the next action > >>class get invoked. > >> > >>We can easier re-create the session object, but we > >>lost the attributes we set in the last session. The > >>following action classes will need those attriutes. > >> > >>I am wondering why the session keep valid if I login > >>to the page again without closing browser. But the > >>session get lost if I open another browser to log > >>in. > >> > >>And another interesting thing is the session get > >>lost in another place in the production enviroment. > >> > >>I am not sure this is a tomcat issue or a struts > >>issue. > >> > >>Michael, any help will be greatly appreciated. > >> > >> > >> > >> > >>- > >>Yahoo! Sports > >> Rekindle the Rivalries. Sign up for Fantasy > > Football > > > > > > - > > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]