jamil lusa

Ranch Hand
+ Follow
since Aug 18, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
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 jamil lusa



When we are using Apache HttpClient connection pool, for example as above, "cm.setMaxTotal(200);", we have created 200 connections in the pool, are those 200 connections alive? Which mean they already handshaked with the server and the socket is being opened, so they can stream the data anytime when they are idle? In the server side, will the server have any limitation of maximum connections from one IP? For example, server limit maximum of 6 concurrent connection from one client, so does that mean in the pool, there will only have 6 connections are alive? In this case, what is the point to set the connection greater than server limitation?

I am very confused about this. Can anyone explain?
10 years ago

Bear Bibeault wrote:I'm not understanding why you would want to do this. I'd recommend just using the session as is.



It could be due to customer's requirement, since they have their own encryption and maybe they do not want to show the key text as "jsessionId" (i cannot remember the term, something like jxxxxxx) in the client's cookie file. and blah blah blah....
11 years ago
Hi all,

J2ee has a very good feature which is we can get the session easily under the care of the J2ee, for example, request.getSession() will do the thing for me. but could we use the same mechanism but provide our own session id? because i don't know how J2ee encrypt the session so probably i will want to provide my own session id but i don't want to create a new mechanism to retrieve it because it has been done nicely in J2ee (has mentioned above).

So any suggestion for this?


thanks in advanced.
11 years ago
hi all, i have a question related to cookie:

if i create a cookie at www.abc.com (set path to '/') after that i create another cookies (set path to '/ext/abc'. now if the user browser www.abc.com/ext/abc/login, which cookie will probably be sent to server? first one or second one?

--------------------------------

second question:

The cookie is visible to all the pages in the directory you specify, and all the pages in that directory's subdirectories. A cookie's path must include the servlet that set the cookie, for example, /catalog, which makes the cookie visible to all directories on the server under /catalog.


above java doc quote from setPath function in HttpCookie class.

if i set cookie at www.abc.com/login, is 'login' ('login' is a servelt or jsp) needed to be included in path parameter? for example, setPath("/user") is allowed?

thanks any reply in advanced.
hi all,

if a user request the url from www.abc.com/test.do, the "test.do" create a cookies for the user. after that, if the user request the url www.abc.com/main.do, will the cookies that created previously be available for the servlet "main.do"?

how about the servlet www.abc.com/ext/aaa.do ? and any other jsp or servlet that under remaining folder?

--------------------------

from the question above, i have a doubt, when we request the url like www.google.com, what actually our browser rely in order to locate the correct cookies file (text file) from the pool of cookies files (i mean how the browser control itself not sending wrong cookie file for example like from www.hotmail.com)?


thanks in advanced.
12 years ago
i could not understand to check the cookie is enabled or not is quite complicated. why the http header or request object does not contain those information?

i would like to know how to check as well, currently i only know how to check that by using javascript. but i prefer to use servlet...

any ideas???
12 years ago
some tutorial even require me to write the implementation in c/c++ language.

any guide is appreciated.
12 years ago
hi dear all,

i am learning JNI and i am quite confused in using the external dll in java.

i saw some tutorial require me to generate the .h file which seen like inreasonable because i don't know anything related to c++ or c. i just want to use the function in dll file.


is it possible for me to use dll file without having the knowledge in c++ and c? or at least i want to call some win32 api which is in dll form.
12 years ago
hi all,

for the example below:



the EL above ${userName} refer to the attribute which is added in scope. how am i able to use global variable (member variable) in user=? for example the global variable like below:



how can we refer the global object scriptlessly?

thanks in advanced.
12 years ago
JSP
as my topic stated, is there any reason why there is no such function exist? why we only can get a array of cookie instead of a particular one?
Thank Darryl, ProgressMonitor is good to use.

-----------------------

hi all, but i am still curious how to create a customized loading form (something like showing 'please wait...') by myself using threading because it is a good chance to learn that.

anyone is kind enough to show me? thanks.
12 years ago
i need a form-like waiting screen instead of waiting cursor because it can provide more information (display on the waiting form) for the user.
12 years ago
hi all,

i am running a program that execute quite a numbers of loop. the program will not be responsive when running with those loop. i want to create a form that stay on top of the program and notify the user about the progress of execution.

How can i do that? i try to google the example but no luck. and the clue point me to use threading which i am not really good at (know a bit).

can anyone show me a very simple coding regarding to this problem? just a simple waiting form stay on the main form when the main program is executing a huge loop. after loop finish, the waiting screen gone.


Thanks your all help in advanced!
12 years ago
thanks, i thought getHeader is from HttpServletRequest API xD. that is why i cannot find the info.
[color=darkred]i know setheader will replace the previous header value, how about addheader? how does it handle mutliple same name string added? for example:


what happens if i getHeader('abc')? there is no any clue from API.


thank in advanced![/color]