rastogi payam

Ranch Hand
+ Follow
since May 09, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by rastogi payam

Hello Everybody,
I had configured DCEVM on intellij, but I think the way I did it is wrong as when I made some change in the java file and ctrl + shift + f9, the tomcat is getting restarted. Can someone please tell me the correct way to configure it.
We have a large file on disk (~1Gb). We are reading that file into memory using java.nio MemoryMappedByteBuffer class. We have limited the in memory file size to 1Mb. Now we need to get the data from this in-memory file and have to process it passed it to the socket as a chunk of 10 Byte.
According to the given information which approach is better
1. Copy the entire data (1Mb) into an array and then process it.
2. In loop - Copy the chunk of size 10 Byte into an array and processs it.
10 years ago
Yes I can see financial terms in the output along with general English terms. Now how can I differentiate between these two categories.
10 years ago
Hi William,
Here is the code which I have written to extract and count the words from the text. What should be my next step. Please advice.
10 years ago
Hi All,

I have a PDF file which I parsed into text using PDFBox API, now I want to extract finance related terms/words and their frequency from that text file. I also googled for the same and found that we can use GATE/OpenNLP but didn't find any concrete example. Please help.
10 years ago
Hi All,

The code below is running fine until I select a checkbox to add a column dynamically in a table. After the new column is added in the table, if I click on the header of the table all the newly added column disappears and the table resets to the initial condition. I think it's because i didn't configure table column listener or something.. please help.

What I want is when we click any checkbox the column should be added/removed accordingly from the table and and when we click table header nothing should happen. On clicking the cell inside the table we should be able to edit it.

>
11 years ago
Hi All,

I found this question on some site :

Q : The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:
11. <sl:shoppingList>
12. <sl:item name="Bread" />
13. <sl:item name="Milk" />
14. <sl:item name="Eggs" />
15. </sl:shoppingList>
The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag. ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.
Which is true?
A. ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and casting the result to ShoppingListTag.
B. ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() and casting each to an ItemSimpleTag.
C. It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy because one is a Simple tag and the other is a Classic tag.
D. ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on the PageContext and casting each to an ItemSimpleTag.
E. ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass() on the PageContext and casting the result to
ShoppingListTag.

According to the website the answer for the above question is A.
my question is What is wrong with the option E?
It's almost a month, since then I was searching for the solution .......
Can anyone please help me in getting the answer

Thanks
12 years ago
Hi Frits,
Thanks for the reply,

The stand-in stream prevents the servlet from closing the original response stream when it completes and allows the filter to modify the servlet's response.


Can you please explain me that where exactly the response stream closes and also if we use some stand-in stream why will it be not closed by the same servlet.

Thanks


Thanks Durgesh..
But if SA send response directly to the client , then what about the call stack which was created on invocation of chain.doFilter() of FA and FB and invocation of doGet()/doPost() of servlet SA.
Hi All,

Below are the lines taken from Head First Servlets and JSP

1 The filter passes the request and response to the servlet, and waits patiently for its chance to compress stuff.

2a The servlet does its thing,creating output, blissfully unaware that this very same output was supposed to be compressed.

2b The output goes back through the Container and...

2c It’s sent back to the client!Hmmm... this could be a problem.The filter was hoping to have a chance to do something to the output (compress it) before the output went to the client.

3 The call to chain.doFilter() has returned, and the filter was hoping to grab the output and and start compressing...
EXCEPT it’s too late! The output was already sent to the client! The Container doesn’t buffer the output for the filter.
By the time the filter’s own doFilter() method is at the top of the (conceptual) stack, it’s too late for the filter to affect the output.

What I didn't understand is the point no. 3 ,where it is said that "The output was already sent to the client".
Let's say we have two filters (FA and FB) and a servlet (SA).Whenever the client requests SA, the container will redirect the request first to FA and then to FB which in turn redirect it to SA (Please correct me in case).And when SA send the response to client it will first pass to FB and then FA and then to client(skeptical).
But according to the book, the response will be sent directly to client by SA but the control will be move from SA to FB and then FA.
Please Explain!!
Thanks
Thanks Peter , I have gone through the link you proposed but I m bit confused about the placement of the log4j.properties and jboss-app.xml, since in my scenario there are three war files in a ear, so the placement of log4j.properties on the root of ear will affect the logging in rest of the .war files.Can you please explain it in reference to my scenario.
myapp.ear
.+-------------a.war
.+-------------b.war
.+-------------axiscustom.war
...................+----------------META-INF
...................+----------------WEB-INF
.........................................+-------------<some xml files>
.........................................+-------------modules
.........................................+-------------lib
.........................................+-------------conf
.........................................+-------------classes
.........................................+-------------services
...........................................................+----------------x.aar
...........................................................+----------------y.aar
...........................................................+----------------myservice.aar
.................................................................................+---------------META-INF
.................................................................................+---------------services.list
.................................................................................+---------------com
......................................................................................................+-------------example
.........................................................................................................................+-----------MyClass.class//here i want to implement Logging
12 years ago