Joe Pardi

Ranch Hand
+ Follow
since Oct 03, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joe Pardi

Also, check out the grid component at http://www.dotjonline.com/taglib/grid.jsp
15 years ago
JSP
I agree, only exchange the primary key of the row being operated on by the user. This makes for a small message to the server.
For rendering the grid, take a lok at this library:
http://www.dotjonline.com
If you're not into commercial solutions, minimally it will give you some ideas.
15 years ago
JSP
If you haven't ruled out a commercial solution, check out dotJ:
http://www.dotjonline.com/main/index.jsp?url=/taglib/grid/grid.jsp
15 years ago
JSP
One way to do it is via a custom tag.
Write a custom tag that sends the body of the tag as the email. Then use a <jsp:include page="yourPage.jsp"/> as the body of the custom tag. By doing this, the HTML of yourPage.jsp is used as the body of the custom tag. In the tag handler for the custom tag, simply send the HTML as an email.
A few tag libraries offer an email tag that can probably be used to accomplish this.
Jakarta: http://jakarta.apache.org/taglibs/doc/mailer-doc/intro.html
dotJ: http://www.dotjonline.com
Coldtags: http://www.servletsuite.com/servlets/sendmail.htm
- Joe
15 years ago
JSP
William,
I don't know if I'd be that strict in your statement about using a servlet. A JSP will suffice for streaming binary data. Here's a JSP I use for streaming binary data:
15 years ago
JSP
Regardless of your solution, you will want to limit the number of records that is retrieved from the database. If you have alot of records to query, then a scrollable Resultset can be used to minimze the number of rows you actually traverse through. This reduces the amount of data sent over the wire.
15 years ago
JSP
The JSP below will take a file named "test.doc" and stream it back to the web browser as an octet/stream (a bunch o unknown bytes). This forces the browser to open the "Open or Save As" dialog.
=========================================================================
<%@ page import="javax.servlet.*,java.io.*" %><%@ page contentType="octet/stream" %><%
response.addHeader("Content-Disposition", "filename=test.doc");
File f = new File("c:\test.doc"));
FileInputStream fis = new FileInputStream(f);
byte[] buffer = new byte[(int)f.length()];
fis.read(buffer,0,(int)f.length());
fis.close();
ServletOutputStream os = response.getOutputStream();
os.write(buffer);
os.close();
%>
15 years ago
JSP
Instead of setting the content type to "text/csv", try "octet/stream".
15 years ago
JSP
See http://www.dotjonline.com/taglib/grid.jsp for a custom tag implementation.
15 years ago
JSP
Kyle,
Had a discussion today with a certain individual that is directly paired up with Kerry in helping our company define a Web Services strategy. The work is primarily strategic in nature, and they are looking towards my project to use a reference implementation.
In pairing the efforts up, it was recognized that we'd like to get access to some IBM'ers that had a little more practical experience with Web Services as to tap into some best practices.
So I mentioned your name as a potential to provide some consulting. Not too sure if it will materialize given your schedule, but now you'll know where this comes from if it actually occurs.
P.S. I work for a large credit card company based in San Francisco.
- Joe
15 years ago
Thanks for the replies. Some additional info / thoughts:
- As for tooling, we're an IBM shop. So it's WAS 5.0.2 and WSAD. Most developers are using WSAD 5.0.x, but those writing these API's will use 5.1 since we understand it to be JSR 109 compliant. We don't have a solid grasp on the tooling of our business partners, but we know there are lots of platforms in the mix (Windows, HP/UX, Solaris, Tandem, MVS, Linux). On our side, we anticipate fully testing for .Net and J2EE web service clients.
- The majority (75%) of these API's are also currently offered via a FTP-type batch file exchange. We currently allow our customers an option to send and receive XML files. In this regard, we have lots of XSD's and SAX parsing logic for the business entities.
- I understand what you mean regarding the versioning. We will definitely be faced with XSD versioning anyway because of our batch interface. But the thought was that Web Service versioning would add an additional layer to that picture. We saw the need to supply versioned WSDL files, JavaBeans or EJB's, etc.
- Also with respect to the existing XDS schemas, another goal would be to reuse the schemas (as much as possible). Not sure how feasible this would be with the WSDL since the existing XSD's were not designed with Web Services in mind. Didn't see it as easy as importing the definitions in the type section of the WSDL.
- If you could, please expand on what you see as an issue on the encoding piece. In option 2 that was mentioned, the parameter and return type would be String, not Any, no? Where is the encoding complexity coming into play. I will mention that we do need to exchange TIFF images in some of the messages.
- Oh, we anticpiate these being purely RPC type services. No one-ways or async stuff. Not wure about RPC vs. Document yet. I was leaning more toward Document style given its flexibility.
Thanks for the feedback and advice.
P.S. Kyle, since you're with IBM, an chance you know Kerry Holly, Stu Lipshires, Dave Jones (COE), or Paul Glezen (COE)? Just curious ...
15 years ago