Session Context Reload
Is there an event my object that I have created and stored in the servlet context to know when the servlet context is being destroyed or refreshed? Tomcat 3.3 Apache 1.3.22 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Database Connections and class reloads
I have a database pooling class that I wrote. When the class is created it is stored in the servlet context so that my jsp and servlets can use it. However when I change a class everything gets reloaded. Is there and event or something that my database pool class can listen to when this reload happens so that I can release the database connections? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Upload file to email as attachment
jspSmartUpload can be found at http://www.jspsmart.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Repost: File upload problem
Well I am reposting this message since I haven't got any response and hoping that the lack of response was because everybody had something better to do than work all weekend. When I try and use an html form to upload a file I get the flowing error in jk.log file: [Sat Mar 16 10:30:32 2002] [jk_ajp12_worker.c (503)]: ajpv12_handle_response, error reading header line The webserver then gives me a 500 Internal Server Error I don't get this error if I dont use browse to locate a file and I just hit the submit button to call my servlet. html body FORM ENCTYPE=multipart/form-data method=POST action=/prod/servlet/UploadTest INPUT TYPE=file NAME=filename INPUT TYPE=submit VALUE=upload name=upload /FORM /body /html Any one know what is going wrong? Tomcat 3.3 mod_jk Apache 1.3.20 Windows 2000 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Upload file to email as attachment
Right now I finally got the file uploading to work properly using jspSmartUpload. Now I need to have my servlet send an email with the file as an attachment. I believe I wont have a problem saving the file to disk and then attaching it to an email. However saving it to disk just to reread from the disk to send as an attachment seems wasteful. The files are only about 30-50kb. Has anyone done this or is there even a better way to do this using somethign other than jspSmartUpload? TIA -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
File upload error
When I try and use an html form to upload a file I get the flowing error in jk.log file: [Sat Mar 16 10:30:32 2002] [jk_ajp12_worker.c (503)]: ajpv12_handle_response, error reading header line The webserver then gives me a 500 Internal Server Error I don't get this error if I dont use browse to locate a file and I just hit the submit button to call my servlet. html body FORM ENCTYPE=multipart/form-data method=POST action=/prod/servlet/UploadTest INPUT TYPE=file NAME=filename INPUT TYPE=submit VALUE=upload name=upload /FORM /body /html Any one know what is going wrong? Tomcat 3.3 mod_jk Apache 1.3.20 Windows 2000 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Reloading of beans and sessiopn no longer valid
When I update a bean in my webpages that handles reports, everything seems to reload. The database bean reloads that has nothing to do with the report bean. This causes my database connections to be reestablished. The scope of the database bean is application. Also all valid sessions are now gone and all the users must relogin in. How can I make it so that only the class that has changed reloads or classes that depends on that class, but not everything else? Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Database bean Destroy
I have a database pooling bean that I use. Is there a way to tell when the bean is being destroyed becuase the bean has been replaced with a newer version or is being unloaded for some reason? I need to know so that I can close the database connections that the bean is controlling. I dont want to wait for the connections just to timeout and have the database reclaim the connection sessions. This is because I sometimes get maximum sessions exceeded with my oracle database. TIA -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Added newlines in beginning
Is there anyway to get rid of about 10 newlines that show up before my output actually begins? I have looked all through my code and I don't believe that they are coming from my code. Anybody else have this problem? Any suggestions appreciated. It is now a problem now that I am writing csv files to out. Windows 2000 Apache 1.3.22 Tomcat 3.3 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
java.lang.IllegalStateException: Response has already been committed
I am trying to insert the output of a servlet into cells in a html table. I am getting the above error. Here is a sample of the code: ../servlet/RevGeocodeBlockServlet writes to the outputstream a string which represents the location given by the lat and lon specified. htmlheadtitleLocation/title/headbody table trtdDanny/tdtd jsp:include page=../servlet/RevGeocodeBlockServlet flush=true jsp:param name=longitude value=%= lon %/ jsp:param name=latitude value=%= lat %/ /jsp:include /td/tr trtdJason/tdtd jsp:include page=../servlet/RevGeocodeBlockServlet flush=true jsp:param name=longitude value=%= lon %/ jsp:param name=latitude value=%= lat %/ /jsp:include /td/tr /table /body/html I don't believe that jsp:include should be doing anything to the headers. Is there anything I can do to get around the problem. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Generate Random username
I am setting up a site where I want to allow a user to create their own username. The username and passwords are stored in an Oracle database. If the username is already taken I want to be able to give them some choices of alternate usernames like Yahoo and some other places do. What is the best way to do this? Given: username webber is already taken I want to give options like: webber02 webber01 and so on. Do these generators just make up a id and then check to see if it is already in the database and if it isn't give it as an option? TIA Jason -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Database Bean Between JSP and Normal Servlet
I have a few servlets and some jsp pages. Right now the both have their own database pool. What is the best way to make the pool avalible to JSP pages and servlets that I have created myself. These are in the same context. Right now I have database bean that has scope of application and my servlets extend from a base class that has a static member that is the database pool. TIA Jason -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
CSV File
I want the browser to download the file and not display a CSV file that I have created. Right now I issue the following commands, but it doesn't seem to work.. Any ideas are appreciated. String file; ... response.setHeader(Content-length,file.length()); response.setHeader(Content-type,application/octetstream); response.setHeader(Content-disposition,inline; filename=\report.csv\); out.print(file); -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Database Pooling
Does anyone know of a database pooling bean or soemthing that will aloow me to share connections among many jsp pages. Preferably something that is free. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Session visibility
I am using Cookies to keep the sesison information. I am using servlets to preform some autheication for a standalone program. From the standalone program(which is in Java), I also pop up a browser window and want it to login automatically to some JSP pages, in other words I want the session to carry over. For the intial JSP login I will pass the sessionid as part of the URL. How can I make sure that the servlet and the jsp pages are in the same context? The servlet is stored under ROOT/WEB-INF/classes/ I have sessions setup for a couple of different servlets. For some reason the session that are created using one servlet are not valid in a different servlet. Is there a way to make this happen? Assuming when you say servlet you mean jsp page (which is slightly different): If they are in the same context they should be. You need to give us more information. 1) Have you got cookies enabled, and/or are you using encodeURL? 2) Are they in the same context? 3) Err... 4) That's it. Justin. -- You're only jealous cos the little penguins are talking to me. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Sessions Timeout
I have written an standalone application that is using servlets to login to the application and to get different data from a database behind a firewall. I want to limit the password and username from going over the net more often than necessary ( I use a MD5 hash of the password to get it accross the first time with a random Seed value), so I use JSESSIONID to identify a user and get back some objects I have stored in the session. The problem I run into is that the session expire after one hour. I know I can just expand this out to a few more hours, but I really dont want to do this because I do want to erase sessions that have not been used in more than an hour. Is there a way to configure Tomcat to check the expire time against last access time and not creation time? TIA Jason Tomcat 3.3 Apache 1.3.22 Windows 2000 Pro -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Session IDs
Is there anway to prevent this: http://xxx.xxx.xxx.xxx/Website/m/index.html;jsessionid=beflc8b3d1 I am using Tomcat 3.3 and mod_jk. I have it setup in the config file to do cookies first. How can I stop this becuase Apache doesn't know about the semicolon and to ignore whats after so I get 404 errors. Windows 2000 Pro Apache 1.3.22 TIA, Jason -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
JSP in Apache document root
Is there any way that I can make it so that I can use JSP pages in my apache document root but keep the tomcat document root seperate that contains the servlets and other class in web-inf? I just want to be able to have my jsp pages with my normal html pages and image files sort of like I used to do with PHP files before I switch to java. Tomcat 3.3 mod_jk Apache 1.3.22 Win 2k TIA -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]