WAR files
Can anyone point me to some information about creating WAR files. Supposedly you can create them with deploytool, but I only know how to do this with the gui version and don't have an x-windows server on the server I'm working on. I've also read that you can use jartool to create WAR files, but the instructions said you will need to create your own version of the deployment descriptor. What does this mean? create my own web.xml? I have a web.xml but don't really use it for much (not all the servlets are in the web.xml). Is there anything special we need to do in the web.xml/deployment descriptor file? and will a WAR created with the jar tool preserve the directory structure of the application? Thanks! e.
RE: Generate Excel File
Actually that's how it was formatted. I tried what someone else suggested, using tabs instead of commas, and that worked. Thanks, Erin On Thu, 19 Jul 2001, Paul Kofon wrote: Hi, I've never done what you'd like to do. But if I remember correctly, the CSV text below will display correctly in Excel: Item,Price Doll,30 GameBoy,200 You'd have two rows and two columns (with headers Item and Price) of data. If the CSV data you're feeding Excel is not formatted like this, then chances are that you'd get wrong results - that explains why your single row of data isn't showing up correctly. Regards, Paul From: William Kaufman [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: Generate Excel File Date: Wed, 18 Jul 2001 17:58:12 -0700 We've got it working exactly as you say, but only if the data is delimited with _tabs_, not _commas_. -- Bill K. -Original Message- From: Erin Lester [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 2:21 PM To: [EMAIL PROTECTED] Subject: Generate Excel File Hi, I'm trying to generate an excel file as the response returned from a servlet. I have set the response's content type to application/vnd.ms-excel and this seems to cause excel to open. The data I return is comma separated values. Once upon a time I read on a newsgroup (don't think it was this one) that someone had done the same thing and excel interpreted the data as a csv file and it displayed nicely in excel. Unfortunately excel seems to think that the entire row of comma separated values that I'm sending it is one single cell (not a row of cells which are the values between the commas). Can anyone tell me where I'm going wrong or of another way to generate an excel spreadsheet using JSP? Thanks! Erin _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Generate Excel File
Thanks, that worked! On Wed, 18 Jul 2001, William Kaufman wrote: We've got it working exactly as you say, but only if the data is delimited with _tabs_, not _commas_. -- Bill K. -Original Message- From: Erin Lester [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 2:21 PM To: [EMAIL PROTECTED] Subject: Generate Excel File Hi, I'm trying to generate an excel file as the response returned from a servlet. I have set the response's content type to application/vnd.ms-excel and this seems to cause excel to open. The data I return is comma separated values. Once upon a time I read on a newsgroup (don't think it was this one) that someone had done the same thing and excel interpreted the data as a csv file and it displayed nicely in excel. Unfortunately excel seems to think that the entire row of comma separated values that I'm sending it is one single cell (not a row of cells which are the values between the commas). Can anyone tell me where I'm going wrong or of another way to generate an excel spreadsheet using JSP? Thanks! Erin
How to forward with new request/query string?
I was wondering how you go about transferring control from a servlet to another page (in this case a jsp page) before committing the response. I need to send request variables to this new page. I've tried using a request dispatcher, but I believe that this just sends the request that the servlet got and not a new one with the querystring values (which are appended to the url I want to forward to) in it. Can someone tell me how to do this? Also, what's the difference between sendRedirects, dispatcher forwards, etc. ? and is there any way to transfer control to another page and have the user's location bar reflect the address of the new page? Any help would be appreciated! - Erin
Generate Excel File
Hi, I'm trying to generate an excel file as the response returned from a servlet. I have set the response's content type to application/vnd.ms-excel and this seems to cause excel to open. The data I return is comma separated values. Once upon a time I read on a newsgroup (don't think it was this one) that someone had done the same thing and excel interpreted the data as a csv file and it displayed nicely in excel. Unfortunately excel seems to think that the entire row of comma separated values that I'm sending it is one single cell (not a row of cells which are the values between the commas). Can anyone tell me where I'm going wrong or of another way to generate an excel spreadsheet using JSP? Thanks! Erin
Petra Hoya is annoying -- was Re: Antw:AW:Antw:Antw:Antw:Re:Re[2]:TomcatBook-wasTOMCATSUCKS(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz)(Abwesenheitsnotiz) (Abwesenheitsnotiz)
I think he's got an auto-reply message turned on. Could the list administrator please remove him temporarily? I can't block him and he's filling up our inboxes!! Thanks! - e. On Fri, 29 Jun 2001, Nael Mohammad wrote: Enough already Nael Mohammad 180 Montgomery St. Suite 2000 San Francisco CA, 94104 Phone: 415-403-7300 x314 Fax: 415-403-7373 Mobile: 415-793-0609 -- Neomar Enabled Wireless Device puts Business in Motion! When Wireless Means Business
web.xml not working
I have created a web application as per the Servlet API specs and deployed it into the webapps directory of Tomcat in a directory called 'sampleapp.' The only way that I am able to access the webapp's servlet (which is in sampleapp/WEB-INF/classes) is by the url 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and this is only when I don't have a web.xml file in the WEB-INF directory. When I place the web.xml file that I created (using to the documents on the Sun and Jakarta sites) I am unable to find my servlet. The servlet mapping in the web.xml file looks like this: servlet servlet-nameStoryGeneratorServlet/servlet-name servlet-classStoryGenerator/servlet-class /servlet servlet-mapping servlet-nameStoryGeneratorServlet/servlet-name url-pattern/story/url-pattern /servlet-mapping I tried using the urls 'SERVERNAME/sampleapp/servlet/story' and 'SERVERNAME/sampleapp/story' I also tried to install the J2EE sample 'petstore' web application but had problems accessing the servlets with it too. I am able to get to the jsps and static files okay. Does anyone know what I am doing wrong? Thanks! Erin PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun 2.7
Tomcat stops running ...
I have Apache 1.3 and Tomcat 3.2 installed on Sun 2.7. I have had no problems with Apache, but Tomcat seems to stop running after a short period of time (a few hours). I restart it and it seems to work fine. I also haven't seen any error messages popping up. Any ideas as to why this is happening? Thanks! Erin
Re: web.xml not working
Thanks for the suggestion, but I don't think that's it. According to the Java Servlet Spec. v2.2 (ch. 13, pg 65), servlet-mapping isn't contained within the servlet element, but is a seperate element. In my original post I said I couldn't have a web.xml file in my application. That was incorrect, I am able to have a web.xml file, but the servlet mappings in it aren't working. To clarify, my servlet isn't in a package. - Erin On Tue, 26 Jun 2001, Charles Baker wrote: Here is a servlet definition from my web.xml file: servlet servlet-name Login /servlet-name servlet-class com.beeslender.servlets.LoginServlet /servlet-class servlet-mapping servlet-name Login /servlet-name url-pattern /Login /url-pattern /servlet-mapping /servlet Notice that servlet-mapping is a child of servlet. Also, did you create your servlets as part of a package? If so, you need a directory structure under $TOMCAT_HOME/sampleapp/WEB-INF/classes that matches your package. For example, $TOMCAT_HOME/sampleapp/WEB-INF/classes/com/beeslender/servlets That's where the *.class files would go. --- Erin Lester [EMAIL PROTECTED] wrote: I have created a web application as per the Servlet API specs and deployed it into the webapps directory of Tomcat in a directory called 'sampleapp.' The only way that I am able to access the webapp's servlet (which is in sampleapp/WEB-INF/classes) is by the url 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and this is only when I don't have a web.xml file in the WEB-INF directory. When I place the web.xml file that I created (using to the documents on the Sun and Jakarta sites) I am unable to find my servlet. The servlet mapping in the web.xml file looks like this: servlet servlet-nameStoryGeneratorServlet/servlet-name servlet-classStoryGenerator/servlet-class /servlet servlet-mapping servlet-nameStoryGeneratorServlet/servlet-name url-pattern/story/url-pattern /servlet-mapping I tried using the urls 'SERVERNAME/sampleapp/servlet/story' and 'SERVERNAME/sampleapp/story' I also tried to install the J2EE sample 'petstore' web application but had problems accessing the servlets with it too. I am able to get to the jsps and static files okay. Does anyone know what I am doing wrong? Thanks! Erin PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun 2.7 = - [EMAIL PROTECTED] Hacking is a Good Thing! See http://www.tuxedo.org/~esr/faqs/hacker-howto.html __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/