Sundar Pari

Greenhorn
+ Follow
since May 04, 2011
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 Sundar Pari

Reincarnating this thread. I having same problem.

Is this because of the quartz version ??
9 years ago
Hello Ranchers,

First of all: Is it possible to access the datasource without weblogic password? Application resides in the same box where the datasource is created..

I have searched enough to get a way to access a datasource which is configured using Weblogic 10.3 using spring.

I have created a datasource using admin console and it is working fine..

I have to connect to that datasource from my web application .. I am not getting any errors or I don't know where to see those errors in weblogic server.. It is not printing in the application and I couldn't see anything on cmd prompt window which is used to start the weblogic server.. I am trying to get the datsource using the following code.



Please let me know how to proceed further . And also I don't know what is the difference in access using a JNDI lookup in spring using <jee:jndi-lookup/>
10 years ago
Please post your project structure and stacktrace
Thanks for the optimization. Am marking this thread as solved...
Hello tsuji,

You have solved my problem in style.

Thanks a zillion. This is a timely help I have ever recieved..

Thanks a lottttt

I really appreciate the way you looked into the problem and your way of explaining things is PERFECT.

[0] I have not hided anything intentionally.. I thought those lines are enough to debug, this may be because of inexperience in xslt.. I am attaching the xsl and xml files, which is slightly working for me for your kind reference.

Thanks a lot for your help!

Since it is not allowing me to attach files . I am pasting the contents here..


Thanks a lot Anand!

This is what I am looking for...

10 years ago
Thanks for your reply.

Here is my xml document

<Templates>

<Template id="template1">
<head>this is my head</head>
<body> I am {$myName$} </body>
<tail> {$someMessage$}</tail>
</Template>

<Template id="template2">
<head>this is my secondtemplate</head>
<body> I am {$working$} </body>
<tail> {$someMessage$}</tail>
</Template>

<Templates>

All I need is to write a xsl which takes templateId and parameters as input from a java code and it should choose the correct template from xml file and replace all the placeholders in the provided templateId.

Here is my xsl

<!-- Parameter Declaration -->
<xsl:param name="templateId"></xsl:param>
<xsl:param name="myName"></xsl:param>
<xsl:param name="working"></xsl:param>

<string_replacement>
<search>
<find>{$working$}</find>
<replace>$working</replace> <!-- $working should be value of working parameter -->
</search>
</string_replacement>

<!-- Method for String replace -->
<xsl:template name="replace_strings">
<xsl:param name="input_text" />
<xsl:param name="search" select="document('')/*/string_replacement/search" />
<xsl:variable name="replaced_text">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="$input_text" />
<xsl:with-param name="replace" select="$search[1]/find" />
<xsl:with-param name="by" select="$search[1]/replace"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$search[2]">
<xsl:call-template name="replace_strings">
<xsl:with-param name="input_text" select="$replaced_text" />
<xsl:with-param name="search" select="$search[position() > 1]" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$replaced_text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Method for Sub-String replace -->
<xsl:template name="string-replace-all">
<xsl:param name="text" />
<xsl:param name="replace" />
<xsl:param name="by" />
<xsl:choose>
<xsl:when test="contains($text, $replace)">
<xsl:value-of select="substring-before($text,$replace)" />
<xsl:value-of select="$by" />
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text"
select="substring-after($text,$replace)" />
<xsl:with-param name="replace" select="$replace" />
<xsl:with-param name="by" select="$by" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>


Hello ,

I am new to xslt.

I have set of parameters which is passed from a java program like

<xsl : param name="myParam"></xsl : param>

I wrote a simple String replace function which would replace strings based on key-value pair method

<string_replacement>
<search>
<find>{$placeHolder$}</find>
<replace><xsl:value-of select="$myParam"/></replace>
</search>
</string_replacement>

I will use the above to replace my placeholder by the value passed by java program at runtime. I call my template like this :
<xsl:call-template name="string-replacell">
<xsl:with-param name="text" select="$input_text" />
<xsl:with-param name="replace" select="$search[1]/find" />
<xsl:with-param name="newValue" select="$search[1]/replace"/>
</xsl:call-template>

I am unable to proceed further because, I am getting empty string replaced. if I put some hardcoded value in replace like <replace>hardCodedValue</replace> then it works fine.

I hope there is a way to make it work.

Thanks in advance

-Sundar
Sorry for very late reply.

By Masterkey I meant my encryption key. I use encryption key to encrypt sensitive information .
10 years ago
Hello,

Is there a way to store a master key securely in Weblogic server 11g ?
If yes please point me to a place where I can get some clue/examples regarding storing and retrieval of master key.

Thanks in Advance.

-Sundar
10 years ago