Arnaud Burlet

Ranch Hand
+ Follow
since Oct 08, 2004
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 Arnaud Burlet

Hello there,

the last time I needed something like that, I used that piece of code :


Can't remember another way ... hope that one is ok for you !
Arnaud
18 years ago
I'm not sure why it happens, depends on how you send and receive the encrypted stuff, sorry.

But I'm sure you should not encrypt/send/decrypt char[], you should encrypt/send/decrypt byte[].

byte[] encrypted = encrypt(yourString.getBytes("UTF-8"));
send(encrypted);
byte[] toDecrypt;
receive(toDecrypt)
new String(decrypt(toDecrypt), "UTF-8");
18 years ago
A classpath problem maybe ?

try something like
java -cp /path/to/your/package/root:/path/to/your/application application.main_class
19 years ago

Originally posted by Ali Gilani:
So why does Google use linux and not RH, or mandrake?

Ali



Google use linux...it means their OS is linux based.

- Linux is the kernel (www.kernel.org), it's not an application, it's not a library. You can't run just linux alone (as much as you can't run kernel32.dll alone)
- distribution like RH, mandrake, suse (and tons of other at distrowatch.com) all use (approximately) the same linux kernel, but the difference is at the application level, they bundle application in a different way, ...

What you have to understand is that linux is the name of the core operating system.

If you want to modify linux ...
Said like that you mean modify the kernel, the core of the OS. For that you need to learn C.
If you want to be able to hack applications also, C++ maybe useful for KDE related apps, otherwise C is what you need.
19 years ago
Hi, I need to find a way to redirect a servlet request to another remote servlet, and get the response. By "remote servlet" I mean "a servlet on another host" that has nothing to do with the first one. The first servlet can be seen as a proxy (doing some more than just forwarding the request).

I know it's possible to do that between 2 servlets of the same webapplication using a requestDispatcher, this is exactly the behaviour I need. But how to do it between 2 servlets ?
19 years ago

Originally posted by Jesse Torres:
Also, is Suse going to also offer a 9.2 Personal version next month? I cannot find that information anywhere.



No, the free version is always available 2 months after the non-free release, either you buy, or you stay with 9.1 some 2 more months...

About the rest I don't know, sorry !

Arnaud
19 years ago
Of course it gives no error when you hide the error !

The description of the error is inside the Exception, just print it ...

replace
by
and see what is your problem !

Arnaud
19 years ago
thanks Mike,

the Filter solution *could* save my life when I can't find another way, but in my case, that would clearly be a hack !

I'll try to find some docs about findSecurityConstraints(...) and see if it helps. I assume you did a mistake or we are not looking at the same tomcat version when you talk about findSecurityRestraints(...)

Thanks again, Arnaud
19 years ago
Hi,

first, you can hit space instead of enter, that should be more convenient (skips a whole page instead of a single line).

And about your problem, anytime when reading the license, you can hit "q" to exit and go to the prompt where you have to type "accept" .... from what I remember that's not harder than that !

Arnaud
19 years ago
Well, to understand what I'm trying to achieve, you can look for org.apache.catalina.realm.JAASMemoryLoginModule which is a LoginModule. And the CallbackHandler you are talking about is already implemented in Tomcat, I have nothing to do with it except use it.

And that's my problem, I still don't know how to find a reference to the servletRequest !

Arnaud
19 years ago
Well, that's my ethernal problem with java, I perfectly know that getRemoteAddr() is what I need! But I'm alway stuck when I try to find a reference to a ServletRequest from within LoginModule.login() method, that's where I need your help !

thanks, Arnaud
19 years ago
Sorry, but I'm not that good at english, I'll try to answer your 2nd question, but I'm not sure I understood it well !

Originally posted by Maureen Charlton:
"Firstly, what does the exception in thread "main" java.lang.Stack mean? Is it to do with recursion i.e. including the class Student and main TestStudent together is not such a good idea? (Arnald Burlet - thanks for your input here).


That exception means you eated all the available RAM. (see below)
It has to do with recursion yes, but "including the class Student and main TestStudent together" is not the problem, that's normal use. Your problem is INFINITE recursion! Let me explain that quickly.
Whenever you call a function - like System.out.println() or Student.put() - you need some memory on the stack to save informations. The stack is a special zone of memory, a part of your RAM. Each function call needs some space on the stack and if a function call can't obtain the needed space on the stack, you get a java.lang.StackOverflow exception (the one you got running your program).
Now, how is it your program eated all the stack space ? This is because you call infinitely Student.put() (remember each call need some space on the stack), so after some number of function calls, your stack gets full and you get the exception!

got it ?

Originally posted by Maureen Charlton:
Secondly, with a dynamic array you use a loop to implement the array reference for the data i.e. Name would be Name [0][0 ] the first name and Course would be [0][1] but I'm not so sure I have implemented this for a HashMap i.e. as Name is my Key and Course is my value surely I do not need a loop to increment anything in the hashmap; and if I did is my understanding correct when I think I have to use the Set i.e. Set keys = map.keySet() to get an Iterator and use the iterator to put each of the elements of the set in turn? (A response on this question would be appreciated!)



No, you don't need anything special to put values in a HashMap. The way you do it is perfectly correct.
But I think you have a problem, something like only one name,course in the hashmap ?
If that's the case, check your Student.put() method, your body (after my first correction) should be

And that's where the problem resides ... What are you passing to the put() method ? You are not passing the name and course parameters, your are always ordering the hashmap to store the same Strings ! just remove the "" so that your code looks like :


Arnaud

[edit : ubb hates me today, polishing]
[ October 15, 2004: Message edited by: Arnaud Burlet ]
19 years ago
Hi, I'm trying to write a custom LoginModule for tomcat that will be used to authenticate users before they can use some servlets...

The authentication depends on the remote IP (IP of the user) and I couldn't yet find a way to get that IP Address from the loginModule's code ! Could you help me on that ?

my : "LoginModule extends RealmBase implements LoginModule, Realm"


Arnaud
19 years ago
well, the same way you resize windows under Windows !

Or if you don't want to see borders anymore -> ctrl+shift+f

Arnaud
19 years ago
Hi,

to have it run and restarted as soon as it stops, use "nohup". Otherwise, to have it run on a regular basis (like twice an hour) use "crontab".

Arnaud
19 years ago