I would be grateful if someone could please show me an example of how to login to a phpBB forum remotely and perform a search.
The language i am using is java however, i just need to know the steps involved.
even some pointers on what to google to get the answers i need would be great i have googled everything i can think of.
...
I have Application written with GWT 1.7. I have one page where I upload file to the remote server that is on different domain. So, when I do Post to the server files goes to the server but when it's time to get response I'm getting null in following function:
Servlet:
...
resp.setStatus(HttpServletResponse.SC_CREATED);
resp.getWriter()...
I have inherited some code:
Process p = new ProcessBuilder("/bin/chmod", "777", path).start();
p.waitFor();
Basically, there is for some ancient and highly voodoo based reason for storing key/value pairs on disk as files. I don't really want to go into it.
However, I am left with a bunch of IO exceptions:
Exception :Cannot run progra...
Hello,
I am trying to compile and run a simple java class within eclipse. The compile task works fine, and since I do not specify a destination folder the build files are in the same directory as the source. Which is alright, at the moment all I need is to learn how I can run the class with the main() method.
I have tried using the ful...
I have a JFrame in which i have to insert JLabels, textfields and JButtons. I am able to these but how can i adjust them to the required position, i want to add one label and textfield in one row and then nxt label and textfield in the next row but they are coming in the same horizontal line. i have used flowLayout with the JFrame. pleas...
Any Java API in client side can check its modified date?
...
I am trying to configuring apache webserver with tomcat using AJP but i am not sure am i doing it right or not.
Here are the steps that i followed
Enabled required module in httpd.conf file
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
Added the ifModule condition...
Sometime when looking through code, I see many methods specify an annotation:
@SuppressWarnings("unchecked")
What does this mean?
...
Hi,
When a user enters arabic name and password I am supposed to retrieve data for that user.In java I am using utf-8 encoding
I am supposed to retrieve data in the form of arabic text from the database.The database I am using is sql server 2005. and the column is set as varchar instead of nvarchar.Since the database is pointing to prod...
Suppose I have a string like this:
string = "Manoj Kumar Kashyap";
Now I want to create a regular expression to match where Ka appears after space and also want to get index of matching characters.
I am using java language.
...
What do people think of the best guidelines to use in an interface? What should and shouldn't go into an interface?
I've heard people say that, as a general rule, an interface must only define behavior and not state. Does this mean that an interface shouldn't contain getters and setters?
My opinion: Maybe not so for setters, but some...
I've got a bunch of selenium test cases set up in a JUnit class as four methods. The first runs fine - but the remaining three close the Firefox browser before the final step of the method is complete - giving a
ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log windo...
I have an array of strings, and I want to delete a particular string from that array. How can I do that? My code is:
private void nregexp(){
String str_nregexp = i_exp_nregexp.getText();
boolean b;
for(int i=0; i<selectedLocations.length; i++){
b= selectedLocations[i].indexOf(str_nregexp) > 0;
...
At the company where I am right now, there are a lot of places in the code where an OurCompanyRuntimeException is thrown (where OurCompany is the actual name of the company). As far as I can tell, this exception is described as "A runtime exception thrown by code that we wrote here at this company."
I'm somewhat new to Java, but I thoug...
In Maven, you can have compile-time dependencies and test dependencies. This is a feature I love, and the M2Eclipse plugin makes this available in Eclipse, too, which is great. So if I add jmock.jar to my project as a test dependency, it will show up on the classpath for JUnit tests, but won't be present when I'm debugging the applicatio...
I like the generics-feature in java and use it often. But I have a problem, if I use libraries that aren't yet aware of generics. An example are servlets. If you use ServletRequest.getParameterMap() the result will be a raw map, but it includes only String as keys and String[] as values. So I want to assign it to a Map. But for this assi...
I'm writing a method which approximates the Kolmogorov complexity of a String by following the LZ78 algorithm, except instead of adding to a table I just keep a counter i.e i'm only interested in the size of the compression.
The problem is that for large inputs it is taking hours. Is it the way I have implemented it?
/**
* Uses the ...
I need to find the total size of a drive in Java 5 (or 1.5, whatever). I know that Java 6 has a new method in java.io.File, but I need it to work in Java 5.
Apache Commons IO has org.apache.commons.io.FileSystemUtils to provide the free disk space, but not the total disk space.
I realize this is OS dependant and will need to depend on ...
Hello
i was wondering if i could have any help in creating a system.
i am looking at the idea of a java project that detects when the computer clock has been changed. The idea is to record the date and time on the computer clock and store it in a file. i then want to be able to run rules on it that shows a message if the clock has been...
Hello good fellas! i 'm trying the hibernate tutorials from their main site and wanted to change thing a bit to know how many to many relationship work with java.util.set interface.My mappings are correct and i can insert in and from the tables EVENT, PERSON and the mapping table PERSON_EVENT.Now i've inserted some dummy values in the ...