Hi..sorry, this didn't help. My question was how do I set the name of the filename in the pop-up input box that appears when you set the content type of a jsp page to "application". It turns out, you simply do the following: <%@ page contentType="application/filename.ext" %> But..thanks for the reply. To map multiple extensions to the same one controller servlet is easy enough. Just add more mappings in web.xml with the extension you like, and map them all to the ControllerServlet class. If you want..in your logic in the controller servlet, you can "keep" the extension passed in and maybe do further logic to pass all extensions of type .DO to one "extended" controller servlet, while all extensions of type .GO go to another servlet. That wouldn't be hard to implement. I tell you what I want to do..add support for multiple javabeans tied to a single action. That way, if you use two or more beans, each bean gets populated. This wouldn't be too hard..just don't have time right now. Maybe a bit later. > -----Original Message----- > From: Alexander Ananiev [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 14, 2000 6:17 PM > To: [EMAIL PROTECTED] > Subject: Re: contentType="Application" always uses the name of the jsp > page (o r action)?? > > > Kevin, > > I had to create an action class for each type of file that can be > downloaded. In my MVC setup I can map action WITH extension > to the action > class. So, if extension is "do", it gets truncated, otherwise > the full name > is used. On the downside, I also need to map the designated > name to the > controller servlet in the web.xml descriptor, i.e., > <servlet-mapping> > <servlet-name>main</servlet-name> > <url-pattern>*.do</url-pattern> > </servlet-mapping> > > <servlet-mapping> > <servlet-name>main</servlet-name> > <url-pattern>/report.txt</url-pattern> > </servlet-mapping> > > This works for me since I only use two file names. As an > alternative, I was > also thinking about enhancing my MVC infrastructure so it would handle > multiple extensions. > > Hope this helps, > Alexander Ananiev. > > > ----- Original Message ----- > From: "Duffey, Kevin" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, November 10, 2000 8:39 PM > Subject: contentType="Application" always uses the name of > the jsp page (o r > action)?? > > > > Hi.. > > > > We are inacting a "download" feature on our site..where we > create some > files > > dynamically, and allow people to download them. > > > > First, let me explain how we did it and see if anyone agrees. > > > > We have a MVC setup, so all requests go to a single > controller servlet, it > > then calls an action class. That action class calls an EJB (or > session/logic > > class), does the logic to generate a dynamic file (in > memory). We then > > populate a bean with the text, and finally forward to a JSP > page. The JSP > > page is simple: > > > > <%@ page contentType="application" %> > > <jsp:useBean id="beanName" scope="session" class="..." /> > > <%= beanName.getText() %> > > > > > > So..the question is..how do we use a "decided" name for the > dialog that > pops > > up to save the file? Right now, it says Action.do in the > file save-as > input > > box. We would like to supply a name ourselves that gets put > in there. > > > > Thanks. > > > > > ============================================================== > ============= > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > ============================================================== > ============= > To unsubscribe: mailto [EMAIL PROTECTED] with body: > "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
