Tomcat 4.1.18 session
I moved my web appl from Tomcat 4.0.4 to Tomcat4.1.18. For each user session I store the reference to the session in a Vector so that I can tell what users are logged-in, last-accessed-time etc. It was working fine in Tomcat 4.0.4. But in Tomcat4.1.18 (perhaps due to new specifications) session objects are pooled (StandardSessionFactory) and hence the references I am storing in the Vector become useless across the jsp page calls. I have a thread that uses this Vector to clean up the users that are timedout but since the session refs in my Vector are useless I can do nothing. Instead of storing the refs if I store Session IDs then can I get ref to a session from JSP Server so that I can get the attributes I have set in it. Please comment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 3.x Vs Tomcat 4.x
Tomcat 3.x Vs Tomcat 4.x I have a web application named myapp in C:\jakarta-tomcat-4.0.4\webapps dir. Also have C:\jakarta-tomcat-4.0.3\webapps\myapp_att dir which isn't a web appl but a dir used by my myapp. In my jsp (in the myapp) I provide links to attachments from C:\jakarta-tomcat-4.0.3\webapps\myapp_att dir. Clicking links was showing the file in Tomcat3.2.3 but not in Tomcat4.0.4. I guess in 3.x C:\jakarta-tomcat-3.2.2\webapps was used as document base but not in 4.x. How to declare the directory myapp_att so that it could also be used as document base. --Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Block a dir to not display its content
Ok It worked. I was trying inside /WEB-INF/web.xml. I guess it is also possible for application level ie only for a given web application??? What I need to do so that when 404 tomcat message need to be displayed by tomcat it instead show my common 404.html file where I have my contents to show the user. - Original Message - From: Holger Klein-Altstedde [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, August 14, 2002 5:01 PM Subject: AW: Block a dir to not display its content I attached the file /conf/web.xml Ist in the servlet section. Regs Holger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Coyote Connector
Make sure that jkjni.dll (libjkjni.so on Unix) is accessible (ie are there in path). -- - Original Message - From: Isabel Lameda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 14, 2002 10:16 PM Subject: Coyote Connector Does anybody knows how to use the Coyote Connector in Tomcat 4.1.8, because i´ve been trying and having this error: INFO: APR not loaded, disabling jni components: java.io.IOException: no jkjni in java.library.path -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Block a dir to not display its content
Tomcat4.0.4 / J2SDK1.4.0/W2K My application is webapps/bbc. It works just fine. The dirs inside it are jsp and WEB-INF. Inside the jsp dir I have my *.jsp files and also some directories like doc, src, images etc. These are the directories that the end user should not see content of via the browser. If someone make a URL like /bbc/jsp/doc the contents are displayed on the browser and the user could see/save them. I want to prevent them IN THE SAME WAY AS WEB-INF dir is now (Tomcat4.x onwards). How to do it. One way is of-course put default file like index.html (based on the configuration). But I am looking for more better way (WEB-INF way). Where and what I need to delcare. -- Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Block a dir to not display its content
Tomcat4.0.4 / J2SDK1.4.0/W2K My application is webapps/bbc. It works just fine. The dirs inside it are jsp and WEB-INF. Inside the jsp dir I have my *.jsp files and also some directories like doc, src, images etc. These are the directories that the end user should not see content of via the browser. If someone make a URL like /bbc/jsp/doc the contents are displayed on the browser and the user could see/save them. I want to prevent them IN THE SAME WAY AS WEB-INF dir is now (Tomcat4.x onwards). How to do it. One way is of-course put default file like index.html (based on the configuration). But I am looking for more better way (WEB-INF way). Where and what I need to delcare. --Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
jsp in packages
Q1. Can I declare my jsp files in packages? How? Q2. I have written a static method in one jsp page. I want to call this method in another jsp page. How to do it? I do not want to take this method out from the jsp and put into a class (.java) and use it in both the jsp files. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jsp in packages
Writing functions in a JSP page (wrapped in %! ... % delimiters) is evil ... don't even bother learning how to do it. Well not true Craig! If something is used more than ONCE one should use a method even inside a JSP. One could use custom tags but I believe one should bother to learn %! ... %. I recommend it :) Craig, Your response confirms what I thought. My questions was purely educational and not that I am having such cases in my code. Thanks for your response. Surely no one should put logic in the PL (jsp). But someone could define and use a utility method (eg putting a HTML table showing some data eg date etc) in jsp. I positive that this is something that could be done if not in current JSP version but in future versions. There could be a directive eg THIS.doit() that gets translated by the JSP engine into something like colrs$jsp.doit() (colrs.jsp is the jsp file). Though it is certainly not that important as required but could be done. Perhaps also at instance level! In general, that is what JSP custom tags are for. Among other things, they let you create arbitrary dynamic output, based on the parameters you specify for that tag. Good examples to look at include: * The JSP standard tag library (available via Apache as the 'standard tag library at http://jakarta.apache.org/taglibs. * Tags that generate arbitrarily complex HTML output, such as the tags provided by the Struts framework http://jakarta.apache.org.struts/. However, in none of these cases do you see any processing functions being stored in a JSP page and called from another - that would not conform to good object oriented design principles. Instead, you see the common paradigm of using request attributes to share information within the time frame of a given request, or session attributes to share information across multiple requests for a given user. Writing functions in a JSP page (wrapped in %! ... % delimiters) is evil ... don't even bother learning how to do it. Thanks Craig - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 13, 2002 9:18 PM Subject: Re: jsp in packages On Tue, 13 Aug 2002, D Bamud wrote: Date: Tue, 13 Aug 2002 12:27:53 +0530 From: D Bamud [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: jsp in packages Q1. Can I declare my jsp files in packages? How? No. You have zero control over what package the JSP compiler puts your page in, or even what the class name of the generated servlet is. Q2. I have written a static method in one jsp page. I want to call this method in another jsp page. How to do it? I do not want to take this method out from the jsp and put into a class (.java) and use it in both the jsp files. You need to rethink your do not want to take this method out statement. JSP pages and servlets are designed to be totally independent components, and you can't get a reference to an instance of one page or servlet from another. Shared logic and shared data *must* be stored in separate classes. And, you're going to need to understand how to organize your code properly to work on larger scale projects anyway, so now is a good time to start. Hint -- putting logic in your JSP pages is not a good design practice. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: BARCODE
http://www.bokai.com/BarcodeJSP/ Search Java Barcode API on net There are many Java APIs available - Original Message - From: Lee Chin Khiong [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 11:36 AM Subject: BARCODE DOES ANYBODY KNOWS HOW TO GENERATE BARCODE USING JAVA OR JSP ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Session
Tomcat3.2.3 / JDK1.3.1 / IE5.0 Q1. I have a like like SCRIPT LANGUAGE=JavaScript SRC=js/utils.js/SCRIPT in my jsp file. When I load I get following. Any idea why it is happening? 2002-06-10 14:16:55 - Ctx( /act ): IOException in: R( /act + js/utils.js + null) Connection aborted by peer: socket write error. Q2. Is there a method to know if a given session object is invalidated or not? Q3. Is there ready made API that can give the list of session objects currently active. I know HttpSessionContext is deprecated. Sorry my last two Q are not purely tomcat related. Regards -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
web application outside tomcat/webapps dir
My Platform Tomcat 4.0.3/Windows2000/JDK1.3.1. I am new to Tomcat4.0.3 %CATALINA_HOME%\webapps is the base directory for containing web applications. Is it mandatory to put my web applications in this directory? Can I put my web application in say C:\mydir and configure Tomcat so that it could pick this application. How to do it if it is possible? Regards -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]