devxlogo

Tip Bank

DevX - Software Development Resource

Disabling the Browser Back Button

Question: Is there a method that will prevent a user from going back to the previous page without modifying the browser code? (Does it matter if it is a CGI

DevX - Software Development Resource

Changing trademark symbol in VID 1

Question: We have trademark symbols sprinkled in our HTML Although MSIE 4.0 has no trouble with it, some browsers cannot interpret [ampersand]trade”. We try to replace them with the ASCII

DevX - Software Development Resource

Templates in java

Question: Any suggestions on a good way to implement templates in java? Answer: The normal way to implement template behaviorin Java is to create an interface defining thecommon behavior that

DevX - Software Development Resource

Clipboard

Question: I’m having problems with application clipboard usage for “non strings”. If I try to create my own dataflavor it still seems to think the clipboard is a string. Answer:

DevX - Software Development Resource

File permissions

Question: How do you change UNIX file permissions in Java? I’ve seen it done and I need to replicate it. Answer: There is no platform-independent way of changingfile permissions in

DevX - Software Development Resource

StringTokenizer

Question: After: StringTokenizer st = new StringTokenizer(line); Do I have to write: String key = new String(st.nextToken()); or is it enough to write: String key = st.nextToken(); Answer: It is

DevX - Software Development Resource

Environment Variables

Question: How do I access environment variables? Answer: There is an undocumented method in java.lang.System with the signature: public static String getenv(String) You can use this method to fetch the

DevX - Software Development Resource

Object passing between threads

Question: Am implementing a network simulation program thatrequires a sender and receiver thread, with a frame object being passed between the two threads.Could you suggest a way of connecting the