Chris Smith

Ranch Hand
+ Follow
since May 03, 2002
Merit badge: grant badges
For More
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 Chris Smith

MindIQ Corporation is looking for an experienced software developer to
work full-time as part of our development team. This developer will
take a leading role in the implementation of the next version of the
Design-a-Course web based training platform. Responsibilities will
include design, implementation, and creation of testing strategies.

Candidates should be skilled software developers, and possess expert-
level understanding of the Java programming language. Significant
experience is required in web application and database programming using
Java. In-depth knowledge of database performance and administration
will be helpful. Candidates should be familiar with most of the
following: JavaServer Faces, Hibernate, JavaScript, the PostgreSQL
database server, and the UNIX operating system. Although not required,
consideration will also be given to a candidate's knowledge of: ADL
SCORM and related specifications, XML, SOAP and web services, "AJAX"
techniques, HTML, CSS, the Eclipse JDT, Java 5.0 features, Swing,
JFreeChart, iText, JavaMail, or Jakarta Commons HttpClient, or anything
else that sounds cool.

The location is in Colorado Springs, CO, and starts on or around
December 5 (negotiable). Resumes or questions should be sent to
chris@mindiq.com.
18 years ago
Sure. JFreeReport from www.jfree.org looks to fit the bill. If you don't like it, there are links from that page to two others.
20 years ago
a) The two java.exe versions in the JDK install dir both do the same thing. The file is in both places only to prevent you from needing to add both to your path.
b) The third java.exe actually was installed as part of the JDK install as well. The runtime environment in JAVA_HOME/jre is a specially adapted one designed to be used with the JDK. The other one in Program Files is used by tools like the Java PlugIn and the default association for executable JAR files, which are installed as part of the JDK install as well. It's a pure unmodified JRE, not a JDK-specific one.
c) The only difference between java.exe and javaw.exe on the Windows platform is that javaw.exe does not open a console window when it starts. If the application is GUI-based, then that console window often looks awkward and out of place, so javaw.exe is provided to avoid it.
Neither of these is more "optimized" than the other. In fact, they both contain practically identical code. The actual Java VM code is in DLLs that are shared between the two. The differences really lie in certain flags that are set in the Windows EXE format to request, or not request, an attached console.
20 years ago
You "can't make it work"? How are you trying to do it? Or have you really not tried anything yet?
If you're able to find winword.exe, and use Runtime.exec, there should be no problems opening Word.
20 years ago
There's not a lot of information there to answer the question. A few things to try:
1. Make sure the classes are in the right paths within the jar, matching packages as always.
2. Be sure you've got case correct.
20 years ago
No, TreeSet and TreeMap are SortedSet and SortedMap classes that happen to be *implemented* using trees. They are not general-purpose classes for implementing a tree. Implementing an n-ary tree is not difficult, though. In fact, it's trivial. What's giving you difficulty?
20 years ago
You'd need to set the bean in the session somewhere, so that your later useBean tag can find it. That would look something like this:
request.getSession(true).setAttribute("urname", bean);
20 years ago
Sure. In web.xml, you have a section that says:
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>com.mypackage.MyServletClass</servlet-class>
</servlet>
And then a section that says:
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/list</url-pattern>
</servlet-mapping>
Now, if your servlet protocol, host info, and context URI consists of http://localhost:8080/myapp, the URL pattern handled by this servlet will be http://localhost:8080/myapp/list
HTH.
20 years ago
Murali is right. There's no way to get previously set response headers. Perhaps you can elaborate on the problem you're trying to solve? If it involves communication between servlets and JSPs that forward and include between each other, then request attributes would be more appropriate. The final servlet in your list, then, could read those back and set them as response headers instead.
20 years ago
Anu,
To answer the second part of your question, if you use executeQuery again on the *same* statement, it will close the previous ResultSet. So no, you can't use another ResultSet from the SAME STATEMENT in a loop over a prior ResultSet. However, there's nothing preventing you from using multiple statements within a connection.
I'm wondering what this has to do with Servlets. Perhaps it would be better continued in a different category?
One additional comment: the text vs. binary distinction, when deciding on servlets or JSPs for presentation, is not always right-on. There are lots of cases where you'll want to use a servlet to generate text, if it's not in a language in the style of XML, HTML, or WML.
JSPs tend to assume that you're using a format that involves tagged text with tags like <this>, and that your file format is immune to added whitespace, including newlines. If that's not the case, then although it is possible to use JSPs to produce the output, the result will look foreign and be difficult to maintain. In those cases, it's probably better to use a servlet to generate the content.
This can sometimes even become an issue for HTML <pre> tag sections, where whitespace and newlines become suddenly significant. Preformatted sections in HTML are often best written as JSP standard include actions that include the output of a servlet.
20 years ago
Incidentally, this is also a non-standard way to invoke servlets, and is supported in Tomcat only as a way to provide backward-compatibility for older conventions on using servlets. Modern webapps should use servlet-mapping entries in web.xml instead.
20 years ago
The current reference implementation of the Servlet API is Tomcat. You can get it from http://jakarta.apache.org/. Look for Tomcat under the subprojects list on the left of the page.
Once you've got Tomcat, install it, and then place compliant web applications in a war file in the Tomcat subdirectory called webapps... or place an extracted directory tree there. There are other options as well, such as manually configuring a different location in Tomcat's server.xml file.
Sounds like you're looking at a few older pieces of software. Is there a reason you want to learn with something older? If you're restricted to an older servlet API version by your server environment, for example, you may want to develop or test against an older container. Unless you've got a good reason, though, Tomcat is the way to go.
20 years ago
This is not really a servlet problem. It's an EJB problem. You probably want to ask in a more appropriate forum.
20 years ago
The only reasonable way to do mail merge with a Word document is via COM. You can use COM from Java via several third-party APIs (eg, J-Integra or JACOB), but that would require Windows and Word installed somewhere you can get to. To print, you'd still want COM talking to Word.
You want to print it on the client, or the server? If the client, a digitally signed applet may be possible. If the server, then you can write Java code directly in the servlet itself.
For Word COM integration, you can find examples with J-Integra for simple stuff... perhaps something in Microsoft's KB for more details.
20 years ago