subodh gupta

Ranch Hand
+ Follow
since Jul 23, 2007
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 subodh gupta

I am using the cxf and configured as follows:



So, i have verified that the content headers are right and the response to the interceptor is returned as the xml but after that client always getting the JSON response irrespective of header...

Any help?
12 years ago
I have implemented the ServletContextListener interface and on call of contextDestroyed i set a flag false which terminates the thread.

Oh can this be a problem in a single instance machine where no load balancer is configured.
12 years ago
code is like this:

1. while loop (flagged false on application context down)
2. perform task
3. try block
4. thread sleep for 1 hr
5. catch throwable
6. log exception
7. while ends

message on method exit

So only two things can happen here either application context has been reset (using tomcat 6 as app server) or thread has died without any exception.
12 years ago
because its not working. It runs fine for few weeks/months but than thread makes the normal exit without any exception.
12 years ago
So i have task which runs after every 1 hour. I know there specialized libs which can perform this job better but i want to know why can't thread sleeping for an hour can't complete this task?
12 years ago
Hello I have faced a problem and just wondering how could that happened? So i am having a thread which is running continuously till my application runs...

And stop running via flag which is set in ServletContextListener's contextDestroyed method.

Now my application was up for couple of months with server running continuously without shutdown... But recently i discovered that this thread has been stopped... there is no exception because log should have had it. Which lead to belief that contextDestroy method has been called somehow.

Also one baffling thing is in contextInit i again create the thread.... its hard to understand this behavior has any faced this problem before?

FYI... i am using tomcat...
12 years ago
Hello I need to create a folder at runtime and download some zip in that an extract them in the folder.

Once in month/year we need to clear it up using the some batch.

So i need to know, do i need to set permission for my app to access the system folder because as it is I am getting the exception in doing it.

java.lang.RuntimeException: Unable to create the local folder for downloading file: /var/abc/ore

Any suggestion i need this urgently

Between i am novice and don't know to much of linux/unix so please bear for my insanity. The entire system has been setup by me so please suggest keeping that in mind.
12 years ago
Yeah Paul I agree it was just to meet the usecas and i mentioned in post

"My only point is you can do this. However this solution is not good. "
12 years ago
This can work provided you need to do some more coding for it as follows:
1. create a runnable in go method write your logic in run method
2. start the thread and return
3. Check in the jsp via some flag if thread finished
4. use getter to get the result
My only point is you can do this. However this solution is not good.
12 years ago
what the hell was i thinking when posted this ...

Thanks William....
12 years ago
Hello I started using SAX java parser to parse the xml however the problem is i am not getting the right content e.g. <form> tag is getting lost or sometimes only ' char is coming from "isn't"

I open to use 3rd party lib as far as it can give the desired results. Should also be able to parse custom tag.

Also if somebody has used rssutils.jar do you know how to to get customs tags from it?

e.g. if one has <item><a:author>A</a:author></item> how to get it from rssutils.jar

12 years ago
@Ulf i am not looking for IP

@David this is not fool proof so many a times i might get nothing
12 years ago
I have a service which is being hit by a ajax call from the client i need to know there web address is there any way to do this?
12 years ago
How to check entire HTTP message (ie. headers and body) that a client would send when POSTing a set of values to a URL as described below.

Four name-value pairs:

firstname: a
lastname: b
company: a & b
id: 21364202416

Hypothetical URL for submission: http://www.abc.com/examplehandler

The URL is protected by Basic Authentication, so you also need to send these credentials:

Username: abc
Password: support
13 years ago
JSP