Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I model a JSP page in UML? What stereotype should I use for JSP within a class diagram?

0
Posted

How can I model a JSP page in UML? What stereotype should I use for JSP within a class diagram?

0

How do I stop a JSP based download adding a newline to the first character of a file? I am using JSP to set a Content-Disposition in order to keep IE from automatically opening Excel/Word/Acrobat/etc when it sees a file type it recognizes. However, when I use ServletOutputStream to do this, for some reason I end up with a newline (ASCII hex 0A) character at the beginning of my file (I discovered this with a hex editor). This causes Word and Excel to blow up when I try to open the files because they can’t cope with the extra character. (I am using the ATG Dynamo Application Server and am hoping this is not an artifact of the implementation.) This is what my JSP looks like: <% // fname is the file name File f = new File(fname); InputStream in = new FileInputStream(f); ServletOutputStream outs = response.getOutputStream(); int bufferSize = 4096; byte[] ioBuffer = new byte[bufferSize]; byte[] lastBuffer; // last buffer long counter = 0; // how many bytes we have gotten through long fileSiz

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123