1 Reply Latest reply on May 19, 2008 5:46 PM by yannick bardon

    problem with a jsp file

    yannick bardon Newbie


      I use the version of 2.0.2.CR1 seam, I would like execute a jsp file, but the problem is that I do not.
      I created a form with a button which allows you to download a file, when you click on the button I open the file to download but the problem is that in the address bar of firefox, it opens one .seam and no .jsp, so how can I force them to open a file .jsp so that it runs.

      Here's what I put in my web.xml:


      before the place I had made. xhtml but I could not do file jsp

      Here is my form:

      <s:button value="Downloader" view="/download.jsp"></s:button>

      download.jsp :

      <?xml version="1.0"?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
      <!-- Download.jsp
           Copyright (c) 2002 by Dr. Herong Yang
      <jsp:directive.page session="false" import="java.io.*" />
           String p = request.getParameter("name");
               "attachment; filename="+p);
            try {
               int l = (int) new File("c:\\yannick\\tutoriaux\\jpa.pdf").length();
               byte[] b = new byte[l];
               FileInputStream f = new FileInputStream("c:\\yannick\\tutoriaux\\jpa.pdf");
               ServletOutputStream o = response.getOutputStream();
            } catch (Exception e) {

      How do I solve this problem ?

      Thank you

        • 1. Re: problem with a jsp file
          yannick bardon Newbie

          I changed my file web.xml like this:


          So my form is in a file .xhtml :

          <s:button value="Downloader" view="/download.jsp"></s:button>

          I always have my file .jsp but when I go to my file jsp, I see the contents of this file in firefox.

          Where is the problem ?

          Thank you