Re: jsp:useBean / Scope Bug in 4.01 !
I agree, the id's are unique. Could you attache the generated source file? I'm unable to reproduce this with a build from the HEAD branch, so I'm curious what the difference (if any) is. On Fri, 2002-02-08 at 12:31, L Rutker wrote: Back to the basic question where in this code: % if (request.getParameter(type)!= null request.getParameter(type).equals(user)) { % jsp:useBean id=user class=com.rutker.UsrData scope=request/ % } else if(request.getParameter(type)!= null request.getParameter(type).equals(group)) { % jsp:useBean id=group class=com.rutker.GpData scope=request/ % } % is there am i declaring the same ID twice? Thanks Lou Hi, Can you explain what you mean by: Duplicate ids found in the same translation unit shall result in a fatal translation error. What is duplicate? I am declaring 2 seperate beans based on the condition. Neither of them should be visible to the rest of the page. Yet they are visible to Tomcat. The JSP follows the XML syntax rules, which look at the *static* content of your document at compile time. As it examines the incoming text, it discovers that, in fact, you *are* declaring the same ID twice -- conditional execution is a runtime thing, not a compile-time thing. Short answer -- you can't do that. Lou Craig From: Craig R. McClanahan [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: jsp:useBean / Scope Bug in 4.01 ! Date: Fri, 1 Feb 2002 14:41:57 -0800 (PST) On Fri, 1 Feb 2002, L Rutker wrote: Date: Fri, 01 Feb 2002 12:59:34 -0500 From: L Rutker [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: jsp:useBean / Scope Bug in 4.01 ! Hi, The following is a bug I found using Tomcat 4.01 on NT4 The following code: % if (request.getParameter(type)!= null request.getParameter(type).equals(user)) { % jsp:useBean id=user class=com.rutker.UsrData scope=request/ % } else if(request.getParameter(type)!= null request.getParameter(type).equals(group)) { % jsp:useBean id=group class=com.rutker.GpData scope=request/ % } % should not be visible to the jsp:getProperty name=user property=firstName / tag farther down the page because the useBean tag was declared in the if block, yet the jsp:getProperty tag can see it and works in Tomcat. I noticed the bug when I tried the above code on WL 6.1 on Linux and it didnt work. I think that WL has the proper implementation. I don't. They are violating the JSP Specification if they support this. In the JSP 1.3 Specification, Section 4.1 (page 68), you will find the following statement: Duplicate ids found in the same translation unit shall result in a fatal translation error. The fact that you are doing this inside scriptlet conditionals does not change the fact that you are using two jsp:useBean elements with the same id attribute in the same page. Is this the correct mailing list for this post? The best place to report bugs is in the bug tracking system: http://nagoya.apache.org/bugzilla/ Thanks Lou R. Craig McClanahan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: SV: Setting the alocated memory to Tomcat 4.0.1
Hi, Try: set CATALINA_OPTS=-Xms=size -Xmx-size and then start tomcat. This should set the desired options. Note: I haven't tried this on Win32, but works find on *NIX. -rl On Thu, 2001-12-06 at 13:27, Niclas Rothman wrote: Hi Bo! Thank´s for your reply, but I seem to have no luck with this. Have done a little jsp file that prints out the free memory and total memory of the JVM and doesn´t seem to change. Maybe I´ve missunderstood your reply, I´ve just added -Xms -Xmx to the end of the line: %CATALINA_OPTS% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA _HOME% org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 start So the result is: %CATALINA_OPTS% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA _HOME% org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 start -Xms100663296 -Xmx134217728 What do say is this approach right or wrong? Best regards Niclas Rothman -Oprindelig meddelelse- Fra: Bo Xu [mailto:[EMAIL PROTECTED]] Sendt: 6. december 2001 19:10 Til: Tomcat Users List Emne: Re: Setting the alocated memory to Tomcat 4.0.1 - Original Message - From: Niclas Rothman [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, December 06, 2001 12:52 PM Subject: Setting the alocated memory to Tomcat 4.0.1 Hi everybody! I´m using Tomcat 4.0.1 and the version with the Windows NT service. Does anybody know where to set the size for the memory to allocate to the Tomcat (-Xms -Xmx), can´t find any documentation about this. Best reqards Niclas Rothman I am not sure, I think you can add it in catalina.bat in CATALINA_HOME/bin, for example, update the following: * _STARTJAVA * %_STARTJAVA% %CATALINA_OPTS% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA _HOME% org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 start and add java -Xmsn/-Xmxn into them. Bo Dec.06, 2001 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Quick Servlet Question
What about ServletContext.getRealPath()? On Thu, 2001-11-29 at 16:31, Brandon Cruz wrote: Exactly, but that method seems to be deprecated. -Original Message- From: DONNIE HALE [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 3:26 PM To: [EMAIL PROTECTED] Subject: Re: Quick Servlet Question You mean like: HttpServletRequest.getRealPath(/); Donnie [EMAIL PROTECTED] 11/29/01 04:06PM Is there a way to use the request object or anything else to get the real path to a folder that the servlet resides in? I want it to return a string like... /usr/local/apache/vhosts/myhost.com/httpdocs Have been looking with no luck and know that someone on this list can tell me if this is possible or not. Thanks! Brandon -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RH Linux 7.1 Java Error
Hi, In regards to the hanging issue, if you stick with 1.3.0_x on RH 7.1 you will need to export LD_ASSUME_KERNEL=2.2.5 or if you upgrade to J2SE 1.3.1 you won't have to export the above flag. Regards, Ryan Lubke Andrew Robson wrote: Hi, Your problem is that 'cut' is in the wrong place. Copy it from wherever it is (/bin I think) into /usr/bin/ This will get rid of error message but you're not out of the woods yet. See the thread from yesterday about a missing file - libstd++-libc6.1-1.so.2 I suspect you will get the same problem. I searched redhat to find the package this file belonged to and installed via rpm. Had to force it as believe it is a 'downgrade' of an existing package. If you get this far you should rid yourself of any error messages but you may well find that javac and java just hang when you try to use them. At this point I gave up and switched to RH 7.0. I'm sure a couple of days later I came across something on the web about a fix to 7.1 to prevent the jvm hanging problem. But I can't remember where or the details. Search the Redhat support forums would be a good place to start. It may be something specific to particular version of jdk which you will avoid because you have the latest (?). good luck andrew On Fri, 10 Aug 2001, you wrote: Hi all, I know this is perhaps not the most appropriate place to present this question as it is a purely java installation problem. But I hope you'll bare with me.Am getting an 'libjvm.so' error. I am trying to install jdk1.3.0_02 on RH linux 7.1 from the .rpm installation. I've used the rpm -ivh filename and even the GnomeRPM after login as root. The installation completes successfully, and I even query for errors using the GnomeRPM but shows me nothing. However when I run the java or the javac programs I get the following error. --start #java somefile /usr/java/jdk1.3.0_02/bin/java: /usr/bin/cut: No such file or directory /usr/java/jdk1.3.0_02/bin/i386/native_threads/java: error while loading shared libraries: libjvm.so: cannot load shared object file: No such file or directory --end Indeed the /usr/bin/cut file doesn't exist. I can't try download the jdk1.3.1 (now downloadable as one single file) as I am on slow and unrealiable dial-up link. Finally, I have the same jdk (jdk1.3.02) installed from the same .rpm file running flawlessly on a RedHat 6.2 system. Thank you. Allan __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: How to configure a custom page for JSP 404 errors?
Hi Pierce, From what I've been able to gather, you should be able to set the error page using the error-page directive within the deployment descriptor for a web app (web.xml). error-page error-code404/error-code location/error.jsp/location /error-page Looking through the bug database, there was an open issue regarding the use of static html pages within the location tag. I'm uncertain at this time what release it's actually fixed in, but if you try it and get a stacktrace, then I guess you know :) The bug report can be found here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=291 I did find this information in the archives. Try looking at the results of the following search: http://mikal.org/interests/java/tomcat/archive/search?search=error+page+custom+404 I'm sure those who are more experiences could expand/correct on this information. Hope this helps. -rl Courtney, Pierce wrote: Hello, This question probably has come up before, I just can't find it in the archives I am using Tomcat 3.2.2 standalone (not with Apache). How can I configure a particular page (servlet, static html, or jsp) to be the default page that comes up if the requested jsp is not found, instead of the 404 error. In other words, if a user requests: http://myTomcatSite.com/somePage.jsp I want to have somePage.jsp come up if it exists. But if somePage.jsp does not exist, I *don't* want the default 404 error to be displayed. Instead I want some custom page (a servlet actually) to be processed. I don't really care if this is achieved with a client-side redirect or a server-side include/forward. I have tried using the DefaultServlet, which doesn't seem to work. I have also set up my own servlet against url-pattern /* /url-pattern. This works for servlets only, not JSPs. It seems the basic problem is that any URI that matches *.jsp. gets processed by the JspServlet. So it is not determined if the .jsp file actually exists or not until the JspServlet is triggered. Can this custom error page functionality be configured somehow in Tomcat? Thanks for any help, Pierce Courtney [EMAIL PROTECTED]