This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I don't think there is a work-around. That is because the JVM looks for classes in the "default" package in the "current" directory. You might be able to control the current directory in a special case but in the general servlet environment you have no control. I suppose you might be able to "hide" the Account class reference inside a wrapper class in a package, but then you would have to provide for a custom classloader to get a copy of the Account class. Bill
I'm not sure about the last part of William's last sentence...
Then in your JSP you'd be using 'mypackage.Account2', which is packaged. The JSP would produce a java source file that imports mypackage.Account2, and after that (runtime), the classloader would be able to find both Account and mypackage.Account2. [ October 23, 2004: Message edited by: Mike Curwen ]