Prash Negu

Ranch Hand
+ Follow
since Apr 20, 2009
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 Prash Negu

Anybody has any experience with ws-reliablemessaging? We were looking at applying this to SOAP services for reliability. But, looks like it is not well adopted in the industry and probably has some performance overhead

Appreciate any insight on this.
5 years ago
Those are common hidden variables in all JSP's. I would like to to do it from common place like interceptors. I don't want all developers to set values for these hidden variables in their action methods.
8 years ago
For example, in below interceptor method, i would like set some JSP parameters after invoke() is called but before JSP is rendered. Can we do that?

8 years ago
Hi,

We are using struts 2. I want to set some hidden parameter values in all JSP's. I am trying to achieve this using interceptors. The moment I call invocation.invoke();, the result is already generated. How do I set certain parameter values in interceptors?

Thanks,
Prashant

8 years ago
Hi All,

I am pretty much new to struts 2. We have requirement to store certain details between two different actions. What is the best way to do this in struts 2? We need this details in interceptors.

Many Thanks.


8 years ago
Hi All,

I have simple requirement to convert a Java Bean to XML document (NOT other way). The intermediate mapping file should NOT be mandatory as the structure of bean is simple most of the time.

I was looking at Castor and JAXB (annoted beans). Is there any other simple tools do the same.

Thanks,
Prashant
Thanks, it works. I overlooked piped streams.
8 years ago
I think Piped streams are for concurrent operations using threads. But, in my requirement those are one after another.
8 years ago
Well, it depends on requirement. Here is my business case..

I am working with Apache FOP where JAXB annoted java beans are used to generate PDF documents. Here are two steps.
1) JAXB marchaller converts bean to XML output stream. I dont want to write to a file.
2) Above output stream needs to go in as inout to FOP transformer. So I need to convert above output stream to input stream.

Above code is working fine for me. Just wanted to know is there any better way to that.
8 years ago
I have a requirement to convert output stream to input stream in the code. Below is how I am doing it. Is there any better way to do this in 1.6? Does below approach has any disadvantages?



Please suggest. Thanks in advacnce.
8 years ago
Hi,

I am trying to explore Apche FOP library to create PDF documents and gone through all the examples.

In my application, we query database and get the value objects (java beans) and out of this we need to create PDF files. I looked at ExampleJavatoPDF, for me it looks too much of code (with SAXSource). I was thinking to use JAXB annotations (jaxb is shipped with JDK1.6) and generate XML stream on the fly and apply XSL to generate PDF.

The code looks as below.



It works fine. My question is, is it best practice to generate PDF files from Java Objects? Is there a better way? Can we generate XSL-FO from Java objects?

Thanks in advance.

Regards,
Prashant
Thanks Peter.

When i serach in my Nexus, the required artifact is not showing up as it is NOT yet downloaded into Nexus. But, it is present in Maven central repository. So, anything not present in nexus(but present in proxy repositories) will not be indexd by m2eclipse?

Also the artifacts which are present in Nuxus repository, they will show up in M2Eclipse "Select Dependency" UI. But, what about those yet to be added into Nexus repository?

Regards,
Prashant
9 years ago
Hi All,

I was exploring on using Nexus. I installed and started Nexus repository and enabled "Download Remote Indexes" to maven central and all other repositories.

Then, i configured maven to use nexus using below in setting.xml.




But, when working with m2eclipse, if i try to add lets say Springframework dependencies, the "Select Dependency" window in eclipse always shows 0 results. The indexing takes only couple seconds. Is this the cause? If I remove the above nexus configuration, the indexing takes lot of time and it is able to search the dependencies.

How do i fix this problem?

Thanks,
Prashant
9 years ago
Ok thanks. Could you please help me achieve below requirement?

As i mentioned in the example, project-c is extending project-b and when project-c is released profile1 and profile2 both should be applied. I have another project project-d that extends project-a and when it is released only profile1 should be applied.

Thanks,
Prashant
9 years ago
Hi,

Just wanted to know how inheritance works in maven. Lets say i have pom project-a and project-b which inherits project-a. Below snippet shows maven-release plugin configuration.

project-a
..........
<plugin>
<artifactId>maven-release-plugin</artifactId>
<goals>deploy</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
<updateBranchVersions>true</updateBranchVersions>
<releaseProfiles>profile1</releaseProfiles>
<useReleaseProfile>false</useReleaseProfile>
</configuration>
</plugin>
...............

project -b (extends prpject-a)
..........
<plugin>
<artifactId>maven-release-plugin</artifactId>
<goals>deploy</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
<updateBranchVersions>true</updateBranchVersions>
<releaseProfiles>profile2</releaseProfiles>
<useReleaseProfile>false</useReleaseProfile>
</configuration>
</plugin>
...............

Now, another jar project-c extends project-b. If i release project-c using maven release plugin, will both profiles profile1 and profile2 will be executed or ONLY profile2 is executed?

Thanks,
Prashant
9 years ago