I have a unit test where I have statically defined a quite large byte array (over 8000 bytes) as the byte data of a file I don't want to read every time I run my unit test.
private static final byte[] FILE_DATA = new byte[] {
12,-2,123,................
}
This compiles fine within Eclipse, but when compiling via Ant script I get the fo...
I'm trying to integrate against a SOAP web service, running on Apache Axis. The WSDL specifies a namespace with a URI, that looks like:
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:stns="java:dk.tdc.serviceproviderweb.datatypes"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="...
Did someone ever used a birt report in a desktop application. I'm comming from the .net environment an there you can use crystal reports to show reports in desktop apps. Is this possible with birt too, without having to set up a server environment?
Can you give me some advice how to reach this goal?
thanks in advance.
...
I think in this case there is no need to declare a public constructor since the class is not accessible outside the package anyway. But is there some hidden impact when the class has only package private constructor?
...
I'm launching a Weblogic application inside Eclipse via the BEA Weblogic Server v9.2 runtime environment. If this were running straight from the command-line, I'd do a ctrl-BREAK to force a thread dump. Is there a way to do it in Eclipse?
...
Does everyone just use XML in the message? Are there any good alternatives to XML? If you do use XML, do you define an XML Schema so clients know how to send messages to your service?
...
I'm pretty new to the Spring Framework, I've been playing around with it and putting a few samples apps together for the purposes of evaluating Spring MVC for use in an upcoming company project. So far I really like what I see in Spring MVC, seems very easy to use and encourages you to write classes that are very unit test-friendly.
Jus...
I need to set the fetch mode on my hibernate mappings to be eager in some cases, and lazy in others. I have my default (set through the hbm file) as lazy="true". How do I override this setting in code? MyClass has a set defined of type MyClass2 for which I want to set the FetchMode to EAGER.
Currently, I have something like:
Session s ...
I want to find out at whih row of JTable the user clicked.
How to do it ?
...
I have a Java based web-application and a new requirement to allow Users to place variables into text fields that are replaced when a document or other output is produced. How have others gone about this?
I was thinking of having a pre-defined set of variables such as :
@BOOKING_NUMBER@
@INVOICE_NUMBER@
Then when a user enters some t...
I got dtd in file and I cant remove it. When i try to parse it in Java I get "Caused by: java.net.SocketException: Network is unreachable: connect", because its remote dtd. can I disable somehow dtd checking?
...
do you know any not strict xpath for java? (I want it to not check dtd and schema) and it would be cool if it dont care about correct xml.
...
Looking through some code I came across the following code
trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto));
and I'd like to know if casting this way has any advantages over
trTuDocPackTypdBd.update((TrTuDocPackTypeDto)packDto);
I've asked the developer responsible and he said he used it because it was new (which d...
I have the following code below in my Servlet, but when IE hits the page, it returns a blank html page. If I use the response.getOutputStream() directly in the StreamResult constructor, the page loads fine. What am I missing?
response is an instance of HttpServletResponse and xsl is an instance of Transformer from XSLTC TransformerFac...
I'm using a third-party library that returns "XML" that is not valid, because it contains invalid characters, as well as non-declared entities. I need to use a Java XML parser to parse this XML, but it's choking.
Is there a generic way to sanitize this XML so that it becomes valid?
...
We need to integrate a good CAPTCHA into our CA Siteminder implementation. What is the best CAPTCHA for use with Struts? We've been looking at reCAPTCHA.
...
When I create a zip Archive via java.util.zip.*, is there a way to split the resulting archive in multiple volumes? Let's say my overall archive has a filesize of 24 MB and I want to split it into 3 files on a limit of 10 MB per file.
Is there a zip API which has this feature? Or any other nice ways to achieve this?
Thanks
Thollsten
...
Just for my own purposes, I'm trying to build a tokenizer in Java where I can define a regular grammar and have it tokenize input based on that. The StringTokenizer class is depracated, and I've found a couple functions in Scanner that hint towards what I want to do, but no luck yet. Anyone know a good way of going about this?
...
Can anoyne recommend a good library that will let me easily read/write private member fields of a class? I was looking through apache commons, but couldnt see it. I must be getting blind ?
Edit: Asking questions on the border of legalities always give these questions of "why"? I am writing several javarebel plugins for hotswapping class...
I need to resize PNG, JPeg and Gif files. Are there good java open source libraries to do that ?
...