I was looking around to see if there is an equivalent to django/RoR in java.
I found:
Play Framework
Grails
Does anyone have ever tried those frameworks, or do you know any other?
Are they faster than django/RoR?
Given a Java 'File' object, how can I detect whether or not it refers to a symlink?
(If it helps/matters, I know the file refers to a directory, not to a file)
There are a few topics similar to this, but I couldn't find one with a sufficient answer.
I would like to know what is the best practice for constructor overloading in Java. I already have my own thoughts on the subject, but I'd like to hear more advice.
I'm referring to both constructor overloading in a simple class and constructor overloading while inheriting an already overloaded class (meaning the base class has overloaded constructors).
Thanks :)
Is it possible to lock the aspect ratio of a JFrame in Java Swing?
For example, if my window is 200px by 200px, and the user wants to resize it, I want the ratio between the width and the height at 1:1, so that if the new width is 400px, the new height is forced to 400px.
I'm aware of ComponentListener and componentResized, but I'm having difficulty not getting it to go into an infinite loop of resizing, because I'm resizing the window in a resize listener.
Thanks!
When using java threads, one has to take care of the basic problems that come with concurrency through synchronization etc.
AFAIK Tomcat also works with threads to handle its workload. Why is it, that I don't have to think about making my code threadsafe when it is running in Tomcat?
What options are there for building automated tests for GUIs written in Java Swing?
I'd like to test some GUIs which have been written using the NetBeans Swing GUI Builder, so something that works without requiring special tampering of the code under test would be ideal.
I am using My-eclipse and doing a struts project there is no syntax error but on starting tomcat server the following error appear in console.
java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
and
javax.servlet.UnavailableException: Parsing error processing resource path jndi:/localhost/strutspro/WEB-INF/struts-config.xml
any idea whats the problem.
I am looking for an algorithm analysis tool for java that can calculate Big 0 of a function. Ideal I would like to make it part of my build process, along side of my other code metrics tool. Even after searching on google I am unable to find any opensource of commercial tool. Any suggestion would be welcome
Thanks
I get a java.lang.outOfMemoryError exception, while writing a big file to the servletOutputStream.
Every response is by default wrapped using a ehcache.constructs.web.filter Object for GZIP compression. And as per the logs, the exception is thrown in the Filter object.
Is there a way to increase the available memory so, that the outOfMemoryError Exception does not occur ?
Hi all,
I'm trying to generate JAXB classes from the Clickatell wsdl:
You can find the wsdl definition here it quite large:
http://api.clickatell.com/soap/webservice.php?WSDL
When trying to generate java classes from this Wsdl i got the following errors:
[ERROR] undefined simple or complex type 'SOAP-ENC:Array'
[ERROR] undefined attribute 'SOAP-ENC:arrayType'
I hope someone can help me out.
Cheers,
Tim
Hi,
I'm seeking an open source QR codes image generator component in java (J2SE), but the open source licence mustn't be a GPL licence (needs to be included in a close source project).
BTW, i can't access the web from the project so no Google API.
I have a Java String that contains XML, with no line feeds and indentations. I would like to turn in into a String with nicely formatted XML. How do I do this?
String unformattedXml = "<tag><nested>hello</nested></tag>";
String formattedXml = new [UnknownClass]().format(unformattedXml);
Note: My input is a String. My output is a String.
const jonny1 : Person = new Person("jonny", 26);
const jonny2 : Person = new Person("jonny", 26);
const table : Dictionary = new Dictionary();
table[jonny1] = "That's me";
trace(table[jonny1]) // traces: "That's me"
trace(table[jonny2]) // traces: undefined.
But I want use Dictionary like this way:
trace(table[jonny2]) // traces: "That's me".
in a word, I want implements a data-structure works like HashMap in java
I am using xjc to generate Java classes from the XML schema and the following is an excerpt of the XSD.
<xs:element name="NameInfo">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="UnstructuredName"/> <!-- This line -->
<xs:sequence>
<xs:element ref="StructuredName"/>
<xs:element ref="UnstructuredName" minOccurs="0"/> <!-- and this line! -->
</xs:sequence>
</xs:choice>
<xs:element ref="SomethingElse" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
For the most part the generated classes are fine but for the above block I would get something like:
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
with the following comment above it:
* You are getting this "catch-all" property because of the following reason:
* The field name "UnstructuredName" is used by two different parts of a schema. See:
* line XXXX of file:FILE.xsd
* line XXXX of file:FILE.xsd
* To get rid of this property, apply a property customization to one
* of both of the following declarations to change their names:
* Gets the value of the content property.
I have placed a comment at the end of the two line in question.
At the moment, I don't think it will be easy to change the schema since this was decided between vendors and I would not want to go this route (if possible) as it will slow down progress quite a bit.
I searched and have found this page, is the external customization what I want to do? I have been mostly working with the generated classes so I'm not entirely familiar with the process that generates these classes. A simple example of the "property customization" would be great! Alternative method of generating the Java classes would be fine as long as the schema can still be used.
can any one give me the source code for mp3 streaming blackberry java application with play/pause, volume slider controls... with background too...
thanks in advance.
:)
I have two Java.io.File objects file1 and file2. I want to copy the contents from file1 to file2. Is there an standard way to do this without me having to create a method that reads file1 and write to file2
I'm looking for a way to connect to a MS Access 2007 database from Java. I don't believe the ODBC way is available to me as I'm writing on a mac and will be pushing this product to Linux. The HXTT drivers also do not work with 2007.
Is there a way, a tutorial, an example, etc that accomplishes this?
Setting the connection as a JNDI Datasource is preferable but not required
I'd like to know if there is any class in Java able to check, using its own criteria, how much a String is equal to another one.
Example :
William Shakespeare / William Shakespeare : might be 100%
William Shakespe*a*re / William Shakespe*e*re : might have above 90%
William Shakespeare / Shakespeare, William : might have above 70% (just examples)
Hello.
Is there analogue of Django Messages Framework (or RoR flash messages) in Java?
http://docs.djangoproject.com/en/dev/ref/contrib/messages/
I want to show a message for user one time.
Hi,
I have an array of bytes.
I want each byte String of that array to be converted to its corresponding hexadecimal values.
Is there any function in Java to convert a byte String to Hexadecimal ?
Regards
Vivek
I got some sample code from the net here:
http://www.javadb.com/sending-a-post-request-with-parameters-from-a-java-class
That works fine. It sets the relevant headers in the response. However, what if I wanted to visit another url on the same site with those headers? If I create another URL object the session is lost. How do I maintain the session?
I am new in the world of programming.
I am student of J2ME(Java) beginner.
And I am interested to make bot, how to make bots easily.
Any guide? Link or keywords which I can google to learn things?
Hi ,
I guess I can extend the base providers to manipulate the base layout etc.Is there any place where I can get the java source code for default providers? Where are the classes for these default providers copied to ?What are list of things that I can manipulate by extending base containers? Is there a comprehensive documentation on methods that i can override?
Thanks a lot for your time!!
Regards,
Vivek