I'm searching for a tool, which compiles a JSP file into a Java file without using a servletcontainer like Tomcat or something else. Can anyone help me out?
What would the possible scenarios be in which I would get this error produced from a struts web app?
java.lang.IllegalArgumentException: No bean specified
I'm trying to make a game in java, but I'm a bit of a newb. The game has images, and when I run the application from eclipse, they all show up fine. But when I export the project as an application, the images don't show up. When I put the application in the same folder as the images, they show up when I run the application, so someone suggested that I just need to put the image files inside my JAR. Can someone tell me how? Thank you
I decided to store uploaded to servlet pictures in DB. But how to show them in browser (in particular div with css image-background style) without page reload?
In details: I have an full-AJAX web client that works with java servlet.
Thanks.
I want to do AES CBC encryption in Java. I'm using javax.crypto. After I have the Cipher initialized, do I only need to call doFinal on the clear bytes to properly encrypt it? Or do I need to do something with update?
Documentation says update:
Continues a multiple-part encryption
or decryption operation
and doFinal
Encrypts or decrypts data in a
single-part operation, or finishes a
multiple-part operation
what exactly do they mean by multiple-part encryption?
When do you call super() in Java?
I see it in some constructors of the derived class, but isn't the constructors for each of the parent class called automatically? Why would you need to use super?
Consider the following Java source:
if( agents != null ) {
for( Iterator iter = agents.keySet().iterator(); iter.hasNext(); ) {
// Code that uses iter.next() ...
//
}
}
The agents is a HashMap.
Why does the for statement sometimes throw a NullPointerException?
Thank you.
Consider a private method which is called from JNI and not used otherwise, generating a compiler warning about an unused method:
private void someMethodCalledOnlyFromJNI() { // WARNING: method is never used
// ....
}
This is some legacy code in Java 1.4 - so no dice on @SuppressWarnings.
What hack would you use to suppress this compiler warning?
What is the easiest way to do a GAE/J datastore backup?
It looks like there is python bulkloader.py tool to do backup for Python apps, but what should I do to backup Java app? Is there any way to use python tool?
Well, I'm pretty much trying to figure out how to pull information from a webpage, and bring it into my program(in Java). For example, if I know the exact page I want info from, for the sake of simplicity a Best Buy item page, how would I get the appropriate info I need off of that page? Like the title, price, description? What would this process even be called? I have no idea were to even began researching this :'(
Hi,
In android, is it recommend to use static variable?
E.g, implement a Singleton pattern in Java, I usually do:
private static A the_instance;
public static A getInstance() {
if (the_instance == null) {
the_instance = new A();
}
return the_instance;
}
My question is when do that get free by android JVM?
Thank you.
i know java API function charAt for example
String s="dato"
char r=s.charAt(0); r is equal d
but my question is how realy it works or what function can i use instead of charAt function to get same result? thanks
I'm trying to resolve a reflection warning in Clojure that seems to result from the lack of type inference on function return values that are normal Java objects.
Trivial example code that demonstrates the issue:
(set! *warn-on-reflection* true)
(defn foo [#^Integer x] (+ 3 x))
(.equals (foo 2) (foo 2))
=> Reflection warning, NO_SOURCE_PATH:10 - call to equals can't be resolved.
true
What is the best way to solve this? Can this be done with type hints?
Can anyone help me? I am currently using eclipse java ide, and would like a plug-in that will automatically look at my classes and draw up a class diagram in UML.
any suggestions?
How to identify which server side script language was used with a web site?
Asp.Net? PHP? RoR? Java? or other?
For example, Which server side script language was used with stackoverflow.com?
I have a normal web service. Many java and .net users are accessing it. Can I update it to wcf without anyone having to change their code? Any tutorials?
While working in Java, I find it hard to position my Main application window in the very center of the screen when I start the application.
Is there any way I can do that? I tried with some of the predefined methods but none worked.
BTW it doesn't have to be vertically centered, horizontal alignment is the more important goal for me. But vertical alignment is also welcome.
Thanks
I am busy working on a java app to run on blackberries but on some devices i am testing on, the code does not seem to be working and im having a hard time pinpointing where the problem lies.
My question is: Could the problem with some phones working and not working have t odo with the type of network they are running on such GSM vs CDMA and would the code that stops working on some devices be in one of the following areas:
1) Listeners - such as MessageListener and Phone Listener
2) UI Objects - simple test labels and buttons
3) Connection to a web service using ksoap2
I am a new user of Java swing. I need to be able to create a popup with row info when the user clicks on that row. I managed to incorporate the mouseClick event reaction in my table class, and I have the row info available. But I don't know how to notify the main window about the event so it can display the dialog box/popup box. Can you help me?
How can I run solr on a windows server, so it starts up automatically?
I run it with:
java -jar start.jar
but I need the server to do this automatically.
How can we redirect to login page automatically after some time?
I have a requirement to redirect to login page if the current page is idle for 10 minutes in Java/JSP.
I tried to use <meta http-equiv="refresh" content="120;url=./login.html"> tag. This works only when I click on any link but not automatically after 2 mins(120secs).
Can anyone tell me how to redirect to login page automatically?
I have a jar that runs forever (infinite loop with socket listening thread) and need it to run in the background at all times. An example would be: "java -jar test.jar" How do I do this? Thanks in advance!
Given a database table with lots of data in it, what is the best practice to remove noise text? I want to detect and remove strings like:
fghfghfghfg
qsdqsdqsd
rtyrtyrty
I'm using Java.