Tal Goldstein

Greenhorn
+ Follow
since Apr 16, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tal Goldstein

Hi
when doing a logout on my application (running on weblogic), Im calling the invalidate() method like this:

HttpServletRequest request = ServletActionContext.getRequest();
request.getSession().invalidate();

but after I try to login again to the application, It seems that the session still exists:

ServletActionContext.getRequest().getSession(false)

doesn't return null, but it returns a session that its creation time is exactly the time when I logged out (called the invalidate()).

this is the case only when trying to login for the second time.
if I login to the app for the first time, then the getSession(false) returns null.

so, to solve this issue, I also check if the session has any attributes, and if it doesn't then I assume that the invalidate method was called before, but its still odd that invalidate does release the attributes of the session, but it doesnt end the session,
any ideas why this happens?
Thanks
Tal
12 years ago
Hi,
I have a WSDL file which I've used to create a stub (using wsdl2java.exe),
But when trying to use that sub, I get an exception:

java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement {VenueContextWS}headers
at venuecontextws.VenueContextWSStub$GetReportBlock_VenueContextResponse$Factory.parse(VenueContextWSStub.java:7368)
at venuecontextws.VenueContextWSStub.fromOM(VenueContextWSStub.java:12500)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement {VenueContextWS}headers

When debugging, I can see the in the xml received from the web service, the data that I need, but before it returns to my classes, the stub's method falls on a javax.xml.stream.XMLStreamException which is then wrapped by an ADBException (see above).

Is there any chance that the stub's code (auto generated) has problems?
or it must be a problem in one of the parameters I pass to the stub's method? (although it would be strange because I can see the data that I need in the WS response)

Thanks for the help
12 years ago
hi
im trying to get information from a textfield for how many columns in the text field are currently visible.
for example, if i open a certain window which contains a text field,
so i would like to know, how many chars can be written to the textfield until not all of them can be seen,
and of course when i enlarge that window, then the number chars i can write will be bigger..

i tried using getColumns() but it always returns 0.

any ideas?

thanks
15 years ago
Hi
suppose i have a class with a method X which its argument is an array of int (int[]).
how can i get that method through reflection?

if it was just an int and not an array it would be something like:

classObj.getMethod("X", new Class[] { Integer.TYPE });

but what class represents an array of ints??

thanks
15 years ago

Originally posted by Jeanne Boyarsky:
Tal,
"int" is not a class; it is a primitive. This means it is built in and there isn't a class that defines it. There is a logical Object equivalent - Integer.

If you want this, you could write a method to see if the String contains a primitive and map to the appropriate value yourself. There aren't too many of these so you could list them out in the code (or better yet in a Map.) If the type you are looking for is not in the list, you could then proceed to use Class.forName.



as someone already said, although int is a primitive type, there's still a class representing it. try: int.class
an you'll get that class.
Peter - thanks for the Integer.TYPE soulution
15 years ago
hello
supose i have a String: "int".
i would like to get the class of what inside the string.
i can't use Class.forName() in this case because the string contains a type which is a primitive (int).
and of course if i'll do "int".getClass() i will get the class of java.lang.String which is not what i want.

any ideas?

thanks
15 years ago
exactly what i was looking for..
i was digging inside Properties, instead of just looking for what the String API has to offer..

thanks
16 years ago
Hi
im using the Properties class to load a configuration file.
when using getProperty(p) im getting the value for property p in the file.
but if i have several values for this property then it returns it in this format: "value1, value2, value3" (exactly as it is in the config file).

does anyone knows if there's some feature that can convert this string into a List, or an array, or something like that?

of course i can parse that string myself and seperate it but im looking for a more elegant way.

Thanks
16 years ago
public class DelayQueue<E extends Delayed>

what the <> does?
and where can i read about it?

thanks
16 years ago
thanks
i read a bit more about executors, and i think in my case it would be right to use an executor with a cached thread pool.
hi
i have a few Runnable's which i would like to start at the same time.
what Executor should i use?
hi all
is there a way to set the current position of the cursor in a resultset
to the row number that i choose.
for example if i have a resultset containing 1000 records and i want only the last 500,
is there a way i can set the cursor to start from record 500?

of course i can call next() method 500 times, but is there a more elegant way?
hello
i've created a jTreeTable based on the example given at sun website:
http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html

(it's not file system browser as in the example but a simple treetable)

im trying to add drag and drop feature to the treetable, but that doesnt work properly.
i've replaced the JTree used in the treeTable in a tree that supports d&d taken from: http://www.javaworld.com/javatips/jw-javatip97.html

i've also implemented: DragGestureListener, DropTargetListener,DragSourceListener on JTreeTable so each of the methods impelemented at the JTreeTable actually calls the same method on the tree.
for example the method dragGestureRecognized on the JTreeTable would call the method dragGestureRecognized on the tree.
after doing all that, the d&d on the treetable almost works...
the problem is that in some cases when i drag a node to an other node, it does add itself to that node, but it doesnt remove from where it was, and from checking the node that was supposed to be removed you can see that its father is null, and that it was removed from the childs array of its father, but from some reason the table is still showing it...
anyone has any idea why?
i tried to fire fireTreeStructureChanged on the table but that still doesnt work..
any help would be appreciated
17 years ago
hi
im trying to change the jtree renderer to do the following:
each node in the tree should be on a panel which contains two lables,
the left label which is the node name and its icon, and the right label which would be a legend.
i already created that and it works,
the problem is that i want the legend label(the right label) to be aligned to the right of the tree, but i cant get it to work because it aligns label to the right of panel, but the panel itself isnt as wide as the tree component.
how can i tell jtree to set each of the nodes panels to be as wide as the jtree itself?

here's how it should look like:http://www16.brinkster.com/talgo/eg.jpg
this is what i get:http://www16.brinkster.com/talgo/current.jpg


thanks

[ April 16, 2006: Message edited by: Tal Goldstein ]
[ April 16, 2006: Message edited by: Tal Goldstein ]
17 years ago