Sudarshan Chakrabarty

Ranch Hand
+ Follow
since Apr 10, 2008
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 Sudarshan Chakrabarty


I have an application running on Weblogic 9.2.

The url of my application is something like http://abc.xyz.com/freeR/xxxx.action.

I have a requirement to write the JSESSIONID cookie under the .xyz.com domain.


I created a servlet filter "MyFilter" which creates the JSESSIONID cookie under the ".xyz.com" domain.

This is the mapping in my web.xml

I set the cookie value with

Now, the issue is when I run the above url , I can see two JSESSIONID cookies getting created .

So, for e.g. if session.getId() returns 4WhSMLrfpGBG1xx5TpmPJ2C7msBL5g2wXngkD1pGgQm6tl7Y17RT!-288131970!1288186719727

one cookie gets created under abc.xyz.com with the value 4WhSMLrfpGBG1xx5TpmPJ2C7msBL5g2wXngkD1pGgQm6tl7Y17RT!-288131970
and the other JSESSIONID cookie gets created under .xyz.com with the value 4WhSMLrfpGBG1xx5TpmPJ2C7msBL5g2wXngkD1pGgQm6tl7Y17RT!-288131970!1288186719727

The difference in the value of the cookies is the last part (!1288186719727 in this case)

Is there a way I can restrict the cookie from being created under abc.xyz.com and secondly why are the values different in both the cookies( only the last part after the ! is different)?


Thanks in advance .

-Sudarshan

13 years ago
Hi Sudha,

In your insert method, you created a new object of class UserRegistrationForm method using

Then you are calling a method on the userForm object


But, you haven't populated the userForm object yet, so your userForm.getEmail() will throw a null pointer exception. Hence, you are getting the Exception.
So, you need to populate the userForm object before calling any method on it.
Hope this helps .
15 years ago
Hi Joanne,
Thanks for the reply.
Using StringTokenizer doesn't work as my requirement is to be able to give both the start and end string, say if I can give "Link to " and ";" then I will get all data between them, which is what I need.
But StringTokenizer takes only one delimiter, so if I code something like
It's obviously not going to help me .

I would want to be able to select all data between
i) "Link to" and the next ";"
and
ii) "titled" and the next ";".
And so I would need to iterate through the whole content and store the above relevant data in some collection.
15 years ago
Hi,

I need to parse the following content which I am getting after parsing a webpage using HtmlParser. I can store the content in a text document or a String object. I need to extract the words in bold and store it in some Value Objects i.e. basically I need the " Link to" and "titled" data.


I tried using StringTokenizer, Pattern etc but it's not working

Can someone please help me out?

[ November 28, 2008: Message edited by: Sudarshan Chakrabarty ]
[ November 28, 2008: Message edited by: Sudarshan Chakrabarty ]
15 years ago
Hi,

Is Java 6 compatible with Weblogic 9.2?
The weblogic docs Weblogic 9.2 : Supported Configurations mentions only Java 5.
Just wanted to know if anyone has been successful trying to use Java 6 with WLS 9.2 or is it a no go?

Sorry, if this question has been already asked in this forum, but I couldn't locate it anywhere.
15 years ago


Am I eligible to invest my money in share market if yes,than how can I ?



Well, you can definitely invest in share market ( Not sure if you need to be over 18 yrs to invest in shares, but I assume you are over ) . Easiest way I guess would be to open a demat account like icicidirect, sharekhan etc.
Rest of your questions like which shares to buy to get good profits etc ... I wish I knew
15 years ago
Which version of Struts are you using?
15 years ago
Your folder structure looks ok. Are you able to get the initial page "login.jsp" atleast ?
15 years ago


Now I'm not getting any error/warning messages in the console but still the action class is not getting invoked..and I get 404 error.


Well, your server is unable to find your jsp's.
It seems your jsp pages are not in the right folder.
Can you tell us the folder structure ?
15 years ago
Why don't you try out Struts ?
15 years ago
Basically, what you were doing wrong in your example was that you were creating one thread in B and two threads in A and both your threads of A were trying to manipulate the single thread of B.
Now, the thread "t1" of Class A calls the startSearch() which in turn calls the run() on thread "th" in B. Once the run() is completed the thread "th" is dead(terminated) as per the figure below.



Now, when you call the startSearch() from "t2" of class A, it again uses the same thread object "th" from B and tries to call the start() on it. As this thread is already dead ( run() method terminated in the previous call), it is unable to start and hence throws an IllegalThreadStateException. Bottom line being, you can't start a dead thread.
Changing the run() of Class A as follows should solve your problem :

The exception is due to this line


Your factory class is unable to find(and load) the class referred by "JavaScript".
15 years ago




Class D implements Interface J, and "x is an Object of the Class D"

Hence, x is an instance of D and as D implements J,
x is also an instance of J.
Hence, is true.
This is a good place to start of Struts Tutorial .
15 years ago