Andrew Collins

Ranch Hand
+ Follow
since Mar 28, 2002
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 Andrew Collins

Hi,
Can someone help me out ?
deployment descriptor :
<servlet-mapping>
<servlet-name>SecuredServlet</servlet-name>
<url-pattern>/secured</url-pattern>
</servlet-mapping>

<security-constraint>
<web-resource-collection>
<web-resource-name>test</web-resource-name>
<url-pattern>/secured</url-pattern>
<http-method>get</http-method>
<http-method>post</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
Nevertheless, my browser can reach SecuredServlet without any authentication, as if there is no security issued in the deployment descriptor
thanks
Thank you all, I appreciate your support!
Fred, I submitted on 01/21/03, and did the follow up exam on 01/27/03.
Mark, as for the GUI, I'm not sure where I lost so many points, I thought the GUI was going to boost my score !
The only thing I can think of is that I have been building code while the effect could be achieved using Swing facilities. Sort of re-inventing the wheel...
A.
21 years ago
Hi,
I just received my results from the CertManager :
The maximum possible number of points is 155; the minimum to pass is 124.
Section Summary Report: General Considerations: Maximum=58 Deductions=2 Actual=56
Documentation: Maximum=20 Deductions=0 Actual=20 GUI: Maximum=24 Deductions=12 Actual=12
Server: Maximum=53 Deductions=0 Actual=53
Total: Maximum=155 Deductions=14
Certification Score=141
Thanks to all of you participating in the SCJD forum, especially Mark Spritzler and Peter den Haan.
I would never have passed without your help.
Cheers!
A.
21 years ago
Hi,
I'm having troubles executing my client.jar file.
I installed the jar file in a temp folder
C:\temp\client.jar
When I navigate to that folder and state

java -jar client.jar


it works fine.
When I add that folder to my CLASSPATH and try to start the jar from a different location I get :


Exception in thread "main" java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:110)
at java.util.jar.JarFile.<init>(JarFile.java:115)
at java.util.jar.JarFile.<init>(JarFile.java:57)


When I unjar the jar file and try to start the application from a different location it works fine. So I conclude that my CLASSPATH is correct.
Can anyone tell me what I'm forgetting or doing wrong ?
I tried to add the jar file to the CLASSPATH but that doesn't seem to solve it.
Thx
A.
[ October 28, 2002: Message edited by: Andrew Collins ]
Randy,
Thanks, pal !
Your hints have been most helpful !
I finally managed to implement the desired behavior :


and

Overriding the createButtonListener method resulted in the correct behaviour.
Thanks Again. I would never found this one without your help
21 years ago
Hi Randy,
Thanks for your most useful information !
Unfortunally, overriding the feel of a JOptionPanel is much more complicated than the example provided in the Swing tutorial you provided a link to. I've spend the whole day trying to figure out wich method I "simply" have to override to get that Windows feel and a Java's look....but it's too complicated...
It can't be that hard I think but I'm just not experienced enough to find my way in the Swing jungle....
Could ( any of ) you give me a hint where (in which class for example) I should look, please ?
21 years ago
Hi guys,
Thanks for the quick response.
I'm using JDK1.3 and the default Java L&F.
Switching to JDK1.4 doesn't solve the problem, explicitely setting the Windows L&F or the Motif L&F does !!
Major drawback : both look like sh*t.
Can you guys help me to solve this one using the Java L&F, please ?
Thanks !
A
21 years ago
Hi folks,
I have this JOptionPane :

When I press the tab button on this dialog the focus nicely switches between someTextField, button1 and button2.
Now here's my problem, even when button2 has the focus, it's allways button1 that gets "pressed" when I hit the return key.
Does anyone of you know how to solve this ?
Thanks
A
[ September 04, 2002: Message edited by: Andrew Collins ]
21 years ago
Hi folks,
I have this JOptionPane placed on a Dialog :

When I press the tab button on this dialog the focus nicely switches between someTextField, button1 and button2.
Now here's my problem, even when button2 has the focus, it's allways button1 that gets "pressed" when I hit the return key.
Does anyone of you know how to solve this ?
Thanks
A
Thanks Eduard,
In the mean time I implemented your first workaround myself. It feels good to see that someone else comes up with exact the same solution.
BTW, thanks for the Throwable advice.
Hi Rangers,
All my actions extend from following ExceptionHandledAction :

My actions implement the abstract processAction method.
Doing so, I never have to worry about catching exceptions. ExceptionHandledAction will take care of this.
Now, I wrote a DoubleClickTable that fires a DoubleClickEvent to DoubleClickListeners in case a user doubleclicks a tablerow in order to book a seat.
DoubleClickEvent extends EventObject and DoubleClickListener implements EventListener.
Since DoubleClickListener is not an Action I cannot fit my DoubleClick in the ExceptionHandled framework, so here I still have to deal with exception handling.
I'm trying to refactor things so that even my doubleClick event gets handled by the ExceptionHandled framework but I don't get it done.
Can any of you give me advice ?
Thanks.
Hidehoo Rangers,
Do you think it's necessary to process code that's not related to the screen (fe booking a flight) in a thread different from the AWT event Dispatching Thread ?
I mean, do you have a multithreaded client ?
I worked out a framework where all the event listeners are implementations 1 top level event listener that manages exception handling. Doing so, I have only one place to worry about exceptions. But if it's realy necessary to use the AWT Event dispatching thread only for painting jobs, things get pretty complicated at this top level event listener. My implementations works but I wonder if the code complexity is worth the effort.
Any suggestions ?
Thanks
Hi folks,
I'm trying to write my own cell renderer so that I can highlight the tableRow the user has doubleclicked with a different color than the row that was clicked just once. But it just won't work. Can you please help me ?
I wrote a DoubleClickTable that extends JTable. I added a MouseListener that registers the number of the row that the user has doubleclicked. There can not be more than one row doubleclicked at a time. This works fine.
Then a added an inner class as follows :

In DoubleClickTable I override getCellRenderer() :

where rowRenderer an instance is of my inner class TableRowRenderer
Thanks.
A
Thanks Jodas !
Life can be simple
Hi,
I would also use the InvokeLater method, but ...
what if the user clicks the button again before this InvokeLater method got invoked ? f.e. user clicks the button twice ...
I think it gets too complicated if we want to fix this. Maybe it isn't such a good idea to execute the actions in a seperate thread
Does anyone has the answer ?
A
[ May 23, 2002: Message edited by: Andrew Collins ]