java

Achieving multipage GWT website

Hi, I have a question on managing a multipage GWT website. For now I only have one html page in which I embed lots of divs to store the widgets that I use. Then, according to the user's actions I add or remove the necessary divs using GWTs DOM class. Therefore, I use only one html page to simulate multiple pages. Is there a better way t...

auto generation of serial version uid using maven2 plugin

Is there a maven plugin which automatically calculates and updates serial version uid for all java class files implementing the Serializable interface? ...

problem with stringtokenizer

Hi all, i want to parse the following using StringTokenizer for every string matching "agent>". I tried it using the code like this. Please let me know where i am going wrong. StringTokenizer stringtokenizer=new StringTokenize(hari,"agent>"); while(stringtokenizer.hasMoreTokens()) { String token = stringtokenizer.nextToken(); ...

Purpose of Serialization in webapplication

1.Where is the usage of serialization in a webapplication. 2.Is it necessary that a form bean is serializable. 3.In tomcat what is the usage of sessions.ser file.. ...

Latent Semantic Indexing in Java

Is there any open source implementation of LSI in Java? I want to use that library for my project. I have seen jLSI but it implements some other model of LSI. I want a standard model. ...

Java class level type inference

I know the code below doesn't compile, and yes I might be crazy. What I'm trying to do is slip an implementation (B below) of a abstract class (A) as the super class of class (C) that also extends the abstract class. I'd also like to defer method override to the super class. Something like... abstract class A { abstract Object get(...

illegal forward reference in java

import java.io.*; import jxl.*; class Xlparsing { Workbook wb =wb.getWorkbook(new File( "C:\\Documents and Settings\\kmoorthi\\Desktop\\ak\\new.xls")); // Illegal forward reference What it means Sheet st = wb.getSheet(0); Cell cell1 = st.getCell(0,0); String a1 = cell1.getContents(); public static void main(Stri...

Provide additional behavior when editing a cell in JTable

Hi SO'ers, I am creating a app in Java. I need to provide additional behavior when editing of a cell in a JTable. So ideally this will happen when the cell loses focus after editing. Depending upon some post processing I might reset the value of the cell. I tried using a a Cell Editor but it is not giving me the desired behavior. In th...

I need to invoke a process using process builder as another user....How can I do it?

I have to execute some process as a unprivileged user from my server.Thats my doubt ...

What's the best way to synchronize the state of 2 complex object graph

Hello, I have a complex object graph to represent operation scheduling. At one point, I have to serialize the whole graph to the web UI (via XML/JSON) to let user modify the schedule using a Javascript based gantt chart component. After the user finished editing, the state of the graph in the Java/server layer have to be synchronized wi...

Is Java or Python better for writing a web-page-source-checking web service on Google App Engines?

Hello everybody!!! I hope you all have a nice day. I want to write a web service that would check some web page HTML code every 20 minutes and e-mail it to my mail box. Here I was given a suggestion to use Google App Engine for this task. Having briefly read through that site I learned that two languages could be used there: Java and P...

What is ILLegal Byte code ?

While reading Java Security I came across the below sentences but could not get any satisfactory explanation on the Internet. Can anyone please explain Prevents loading of classes with bytecode Prevents loading of in illegal packages ...

Difference between java.io.PrintWriter and java.io.BufferedWriter?

Please look through the below code, // A.java File file=new File("blah.txt"); FileWriter fwriter=new FileWriter(file); PrintWriter pwriter=new PrintWriter(fwriter); //B.java File file=new File("blah.txt"); FileWriter fwriter=new FileWriter(file); BufferedWriter bwriter=new BufferedWriter(bwriter); What is the difference between these...

How do I properly fix deploy permission issues with Hudson and ant?

I'm having trouble deploying my Web start to the web server due to permissions problems (reformatted): /home/hudson/.../build/build-web-start.xml:20: Failed to copy /home/hudson/.../dist/app.jnlp to /var/development/.../webstart/app.jnlp due to java.io.FileNotFoundException /var/development/.../webstart/app.jnlp (Permission denied) an...

App engine many-to-many data modelling

I have a question regarding how to model a many-to-many relationship in App Engine: A Blogentry can have many tags, a tag can apply to many blog entries. I see a couple of scenarios: Use a Set of Strings as an attribute on the blog entry. This allows me to easily query for an entry using a tag This does not allow me to fetch all ta...

Destroying session on close of the browser from the task bar

Hi, When i close the browser window from the task bar the session is not getting destroyed. I could handle this on closing the browser using close(X) button or by pressing Alt+F4 using javascript. But from the task bar if i close the window how can i clear the session? The problem occurs only when there is another browser window already...

java how to track an email ?

Hi, how i can track an email. i m using java for my server side for sending emails. i want to track them that whether it is deliverd , opened ... how i can do that ?? ...

Hibernate or iBatis or something else?

In my project i need to switch between databases during runtime. I tried to use Hibernate, but stuck in a place, where i need to map object with table in database. The problem is, that i have several tables with prefix: documents2001, documents2002 ... As i understood, i can't map class with table during runtime. I tried using iBatis, bu...

tapestry 4 contrib table call getModel() multiple times

public IBasicTableModel getModel() { return new IBasicTableModel() { public int getRowCount() { System.out.println("called many times...."); return getServiceLayer().countTotalCategoryRow(getKeyword()); } } when i tried this and printout on console, it showed this metho...

Is it possible to resolve css as a classpath resource using Flying Saucer (XHTML-Renderer)?

I'm trying to package up resources into a jar, but I'm having trouble getting Flying Saucer to find the css on the classpath - I can't construct a URL easily to be able to resolve this seamlessly. Does Flying saucer have a way of specifying resource packages on the classpath to resolve items and images? Note: I'm running this in a web...