This problem relates to the Restlet framework and Java
When a client wants to discover the resources available on a server - they must send an HTTP request with OPTIONS as the request type. This is fine I guess for non human readable clients - i.e. in code rather than a browser.
The problem I see here is - browsers (human readable) ...
I want to count the no. of pages that would be produced if I printed out an OpenOffice.org document. I can already do it for ODT files using the following code:
public short getPageCount() {
XModel model = (XModel) UnoRuntime.queryInterface(XModel.class,
getDocument());
XTextViewCursorSupplier s...
I'm so tired of having to learn yet another Java web framework every other day.
JSP, Struts, Wicket, JSF, JBoss Seam, Spring MVC to name just a few - all this countless frameworks out there try to address the same issues. However, none of them really solves the fundamental problems - that's why there are still coming up more and more new...
I can't understand why this few lines
Date submissionT;
SimpleDateFormat tempDate = new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy");
public time_print(String time) {
try {
submissionT=tempDate.parse(time);
}
catch (Exception e) {
System.out.println(e.toString() + ", " + tim...
help me on this issue which you have stated here
"Some newer Sony-Ericsson phones (with the JP8.3 platform onward) have a proprietary java application management API that can only be accessed if your MIDlet is signed by Sony-Ericsson, along with jad properties that allow you to hide your MIDlet icon from the user."
I have developed an...
I'm considering implementing one or two JSR APIs. I have not yet read the entire specification (the plan is to read them as I code the implementation) but I am very familiar with them. I have read that the JSR process includes implementing a Test Compatibility Kit (TCK) for testing said JSR implementations.
Before I start writing a bunc...
Hi all,
I'm interested in parsing a fairly large text file in Java (1.6.x) and was wondering what approach(es) would be considered best practice?
The file will probably be about 1Mb in size, and will consist of thousands of entries along the lines of;
Entry
{
property1=value1
property2=value2
...
}
etc.
My first instinc...
I'm seeing a problem while attempting to run a java servlet under eclipse (Ganymede), I'm running Java 1.6 and Apache Tomcat 6.0.
Here is what i am doing:
Stop Tomcat.
New Dynamic webproject.
Call the project TestProject
Use default options: Context = "TestProject", Context Directory = "WebContent", Java Source Directory = "src"
Right...
I have created a fairly substantial Java GUI application with many form windows where the settings are locked up in .form files. I am wondering is there any way to convert or refactor these .form files into real Java source code that I can modify?
The GUI was created using Netbeans 6.5.
...
I understand how to use Dynamic Proxies in Java but what I don't understand is how the VM actually creates a dynamic proxy. Does it generate bytecode and load it? Or something else? Thanks.
...
Hi,
I am looking for some free JSP hosting, that have support for:
1.Struts
2.JDK 1.6
3.Can have Apache Tomcat
4.one or two MySQL databases
5.Subdomains
Thanks for your help
BTW. Sorry for my english (I am from Czech)
...
In C#, it's common to have methods like this:
public IPerson GetPerson()
{
// do stuff
return new Person(..);
}
where "IPerson" is an interface used by Person, SpecialPerson, etc. In other words, although the method above returns a Person, a strategy pattern could be implemented such that a SpecialPerson is returned in lieu of a P...
I want to manage a Transaction in my persistence layer,
But when I try to fetch the results lazily I get this error:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role
Can I use LockMode or any other way to solve this problem?
Can a find a Object by its id without any Transaction?
...
In Java, is it possible to create a class definition on the fly while an application is running, and then create an object of that class?
For example, a running application would read in a text file that contains a list of class members to include in the new class. The application would then define a class definition based on the list o...
Hi!
I am developing a Java EE web application that is run under JBoss.
I want to do the following:
When a user sends an http request (by opening a page or through AJAX) all the logs that are related to this request are collected and then saved into the database. By related I mean that they are being logged during the process of handlin...
Hello,
I've got log4j configured on my Java project with the following log4j.properties:
log4j.rootLogger=WARNING, X
log4j.appender.X=org.apache.log4j.ConsoleAppender
log4j.appender.X.layout=org.apache.log4j.PatternLayout
log4j.appender.X.layout.ConversionPattern=%p %m %n
log4j.logger.org.hibernate.SQL=WARNING
log4j.logger.com.****.s...
Using Named Queries (located in your hibernate mapping xml file) is a nice way to separate your queries from your buisness logic. But what are the alternatives if your are using Hibernate Annotations for mapping?
...
Given a string:
String exampleString = "example";
How do I convert this to an InputStream?
...
I've looked in the "undocumentation", and I can see how to create a coldfusion.sql.QueryTable from a ResultSet, but not the other way around. So, how can I extract the java.sql.ResultSet from a ColdFusion ( coldfusion.sql.QueryTable ) query object?
...
Hi all
With regards my question (http://stackoverflow.com/questions/772713/call-repaint-from-another-class-in-java).
I'm new to java, and I've had a look at some tutorials on SwingWorker, but I'm unsure how to implement it with the example code i gave in the previous question.
Can anyone explain how to use SwingWorker with regards my li...