Re: JSP Session
Hi Mauricio, No, you don't have to use JavaBeans to use the implicit session object. As long as you have session enabled for your webapp, you will get a session object. As for your second question, you really should think what will happen when more than 2 request arrive at the same time. Regards, Raymond pau Mauricio Tia Ni Gong Lin To: [EMAIL PROTECTED] [EMAIL PROTECTED] cc: (bcc: Raymond Pau/adc) Sent by: Subject: JSP Session [EMAIL PROTECTED] r 05/24/2002 09:11 PM Please respond to Tomcat Users List Hi, Does it must use JavaBeans in order to use session among several jsp files? Is there any simpler solution? I want to maintain a persistent database connection in all jsp files. For example: Create a database object in first jsp file and retrieve it in other jsp files Regards, Mauricio Lin -- 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: Tomcat won't pick up my classes
Did you try restarting Tomcat after putting the class file in the correct place? Glen Verran glen.verran@trad To: [EMAIL PROTECTED] eroot.com cc: (bcc: Raymond Pau/adc) Subject: Tomcat won't pick up my classes 05/24/2002 02:30 PM Please respond to Tomcat Users List Hi there I am using Tomcat 4.0.3 full on Windows 2000. I wrote a small jsp that references a class that I wrote in java. When the jsp gets called, an error is returned that it cannot find the class I am specifying. I copiied my java class file into the WEB_INF/classes path off my ROOT folder and $CATALINA_HOME/classes, as well as other places I could find a classes folder, but still no luck. This is the jsp that I call once I have submitted information via the form. The class LogonData is correct as is. It is a bean that contains get and set methods and 3 properties. I hope that you can help me on this one? Can you tell me how I can tell Tomcat to go and load my class up when it compiles? Thanks ~Glen jsp:useBean id=user class=LogonData scope=session/ jsp:setProperty name=user property=*/ HTML BODY % switch (user.getUserType()) { case 1 : % jsp:include page=Broker.html/ % break; } % /BODY /HTML -- 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: Session in JSP
HI Wiwi, You don't have to explicitly create a session object in JSP. A new session will be started for every new connection. You will be able to access the session object using the implicit Session Object. Refer to the Javadoc for HttpSession at: http://java.sun.com/products/servlet/2.2/javadoc/index.html Example: Session.setAttribute(name, someObject); someObject = (ClassName) Session.getAttribute(name); Hope that helps. Raymond Pau Wiwi Wiwi patpatbest@ho To: [EMAIL PROTECTED] tmail.com cc: (bcc: Raymond Pau/adc) Subject: Session in JSP 05/24/2002 03:11 PM Please respond to Tomcat Users List Hi all. Can anyone tell me how to create a session in JSP instead of servlet, and read the value of the attribute that stored in the session using JSP? Thanks. wiwi _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- 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: Tomcat won't pick up my classes
Hi Glen, From the error message, your class LogonData is part of the org.apache.jsp packages. If that is right, you will need to put the class file LogonData.class in c: \tomcat\webapps\ROOT\WEB_INF\classes\org\apache\jsp That is if you jsp is in the ROOT context. Regards, Raymond Pau Glen Verran glen.verran@trad To: Tomcat Users List [EMAIL PROTECTED] eroot.com cc: (bcc: Raymond Pau/adc) Subject: Re: Tomcat won't pick up my classes 05/24/2002 03:29 PM Please respond to Tomcat Users List Yes I did, and still no luck. The error message that I am getting from compiler is: C:\tomcat\work\localhost\_\Relations\jsp\Logon$jsp.java:56: Class org.apache.jsp.LogonData not found. LogonData user = null; ^ I currently have my classes in c:\tomcat\webapps\ROOT\WEB-INF\classes ~Glen - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 24, 2002 8:57 AM Subject: Re: Tomcat won't pick up my classes Did you try restarting Tomcat after putting the class file in the correct place? Glen Verran glen.verran@trad To: [EMAIL PROTECTED] eroot.com cc: (bcc: Raymond Pau/adc) Subject: Tomcat won't pick up my classes 05/24/2002 02:30 PM Please respond to Tomcat Users List Hi there I am using Tomcat 4.0.3 full on Windows 2000. I wrote a small jsp that references a class that I wrote in java. When the jsp gets called, an error is returned that it cannot find the class I am specifying. I copiied my java class file into the WEB_INF/classes path off my ROOT folder and $CATALINA_HOME/classes, as well as other places I could find a classes folder, but still no luck. This is the jsp that I call once I have submitted information via the form. The class LogonData is correct as is. It is a bean that contains get and set methods and 3 properties. I hope that you can help me on this one? Can you tell me how I can tell Tomcat to go and load my class up when it compiles? Thanks ~Glen jsp:useBean id=user class=LogonData scope=session/ jsp:setProperty name=user property=*/ HTML BODY % switch (user.getUserType()) { case 1 : % jsp:include page=Broker.html/ % break; } % /BODY /HTML -- 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]
Limiting Amount of Memory Tomcat use
Platform: Linux, Tomcat 3.3.1 Hi people, I am writing a JSP web services on an embedded system running Linux without swap space. Everytime I access a new JSP page, the amount of memory Tomcat uses increase. I think Tomcat is caching the new JSP page for faster access. Am I right? Is there a way to limit the maximum amount of memory that Tomcat will use? Can I configure Tomcat to cache only the last 5 JSP pages? Thanks In Advance. Raymond Pau -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]