Help coderanch get a
new server
by contributing to the fundraiser

sreeni san

Ranch Hand
+ Follow
since Aug 14, 2001
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 sreeni san

I have the following code to display a list of users. The requirement is to display the user names in 3 columns. Please let me know how can this be done.

<ui:repeat value="${userBean.user}" var="usrId">
<b><h:outputText value="#{usrId.name}"/> </b>
</ui:repeat>

Thanks,
Sreeni
16 years ago
JSF
I have my code in a *.xhtml, the snippet of which is as follows

<html ..........
xmlns:c="http://java.sun.com/jstl/core">
<c:set var="finalrating" value="${prod.rating}"/>
<c:if test="${finalrating == -1.0}">
<h:graphicImage value="blank.gif"/>
</c:if>
<c:if test="#{finalrating > -1.0}">
<h:graphicImage value="full.gif"/>
</c:if>
</html>

The problem I am facing is that the comparators ('==', '>') are not working in the <c:if> (also tried <c:when>, but things did'nt work). My bean returns a float value which will be like -1.0 or 1.0, etc.,


Please help, this is urgent!!!

Thanks,
Sreeni
16 years ago
JSF
I have flex as my front end which sends the encoded values in the hex format.

For example if I enter k�t in the name field, the UTF-8 for "�" in hex is "c3a1" the flex client posts the data as "name=k%C3%A1t" (I got this info from the Live HTTP headers in my MF browser and verified for the hex values in few sites).

The "name" value is then stored in a table in the MySQL database.

When I query the database using the following query
"select hex(name ), name from customer where id=100;", the query returns me the following value for name.

+---------------------
hex(name) | name |
+-------------+-------+
6BC383C2A174 | k�t |
+------+--------------+-

You can see that though the correct value is "6BC3A174", "83C2" is getting appended in the value corrupting the data before it reaches the buslogic code.

I tried giving System.out.println(name) but this did not help me. I hard coded the value(k�t) for name in my java code and inserted the same, the value seems to be getting stored properly and hence arrived at the above conclusion.

Note: The customer table i am referring to has Character Set "UTF-8 Unicode" and Collation "utf8_general_ci".
16 years ago
Hi,

I am a java developer and have been assigned with a task to build a tool which can do a screen capture video with an audio voice-over.

Please suggest me how to go by. Is there a java API which can be used to build the tool?

Thanks,
Sreeni
[ August 06, 2007: Message edited by: sreeni san ]
16 years ago
Hi,

I need to write an XML parser to validate two XML docs in my Servlet.

The Administator will have some features provisioned for the user, which will be stored as an Admin XML doc.

The user logs-in and will be presented with a page wherein the user can avail only the features enabled by the Admin. Once the user submits the form (the XML is generated in the front end and the same is posted to the Servlet), I need to validate/compare the user XML and Admin XML to check whether the user is eligible to avail a certain feature.


Admin XML will be as follows:

<Admin user="xyz">
<feature1 enabled="Y"/>
<feature2 enabled="N"/>
</Admin>

User XML will be as follows:

<User user="xyz">
<feature1 enabled="Y"><val>abcd</val></feature1>
<feature2 enabled="N"/>
</User>


Thanks,
Sreeni.
Can I have a XSL which reads the elements from the XSD and writes them onto a text file?

If yes, please let me know how do I do that.

Thanks,
Sreeni.
Hi

I am calling ServletC from ServletA and ServletB.

Is there a way to know as to which servlet sent the request.
In other words,

In ServletC, I would like to know which Servlet ( ServletA or ServletB) sent the request.

The URL call from both ServletA and ServletB to ServletC will be the same.

Thanks,
Santosh
18 years ago
Thanks for your reply. Please let me know how do I set "privileged" attribute.

Thanks,
Sreeni
18 years ago
Hi,

I have both of these servlet on tomcat and not on any J2EE server.

Thanks,
Sreeni
18 years ago
Hi,

I am using response.sendRedirtect(), to call a servlet which is on another webapp. The problem here is that the URL is exposed to the end user.

I need to call Servlet2 from Servlet1. Servlet2 is on a different webapp.

I need to call Servlet2 by passing username and password in the URL, the values of which I will be using to authenticate and on authentication will populate the session.

I don't want the username/password values to be exposed to the user.

I tried using RequestDispatcher but the same gave problems while using the session created from the request. I could invoke the doGet() of Servlet2 and I could create, populate the session and could also generate a form.
On submission of the form which calls the doPost() of Servlet2, the session is found to be invalid.

I am not facing the above session invalid problem when I am using response.sendRedirect() while I call Servlet2 from Servlet1.

Please help me solve this problem.

Thanks,
Sreeni
[ May 17, 2006: Message edited by: sreeni san ]
18 years ago
Hi

I have an XML as follows:

<employees>
<add-info is="true">
<name val="Sreeni"/>
<age val="25"/>

<alternate-info>
<address is="true">
<ph1 val="23232323"/>
<ph2 val="45454545"/>
<ph3 val="34343434"/>
</address>
<alternate>
<address val="temporary">
<street val="23232323"/>
<city val="SJ"/>
<state val="KA"/>
</address>
<alternate>
<address is="permanent">
<street val="23232323"/>
<city val="SJ"/>
<state val="KA"/>
</address>
</alternate>
</alternate>
</alternate-info>
</add-info>
</employees>

My requirement is to get the values of the child elements of <address> tag.

Please help me obtain the required values. I could not get values using 'child::' as I don;t know the required syntax to use the same.

Thanks,
Sreeni.
Hi

I am pretty new to DHTML, though I have some experience in HTML and Javascript.

Followinf is the detail of the requirement I have in brief. If I can get some help on this, I am sure I can take the help to a higer level and complete my requirement.

Requirement:

I have a HTML form which will have links such as Address1, Address2, Phone numbers, etc., with a "SUBMIT" button. On click of the Address1 link a text box with a 'OK' button needs to be popped up (may be in a new layer, I am not sure) allowing the user to enter the address and click of the 'OK' button, the popped up text box and 'OK' button should diappear. Same should be the case on click of other links.

If the user clicks on the Address1 for the second time, the popped up text field should be prepopulated with the already entered value(if any).

On click of the Submit button, the information entered in each of the text fields needs to be appended to a string and assigned to a hidden field which will be collected from the request by the servlet.

Thanks in advance,
Sreeni
Hi,

I have a text box, a pair of radio buttons and a Multiple select List box in my HTML form.

I need to transfer data entered in the text box and the picked radio button to the drop-down list box on click of a button using JavaScript.

Lets assume that the value entered in the text box is "test_value" and the first radio button with value "1" is selected, then on click of a button, the drop-down list should be having an option set as "test_value,1".


Please help me.

Thanks,
Sreeni
Hi,

I need to warn the user with some message when the user tries to close the browser window by clicking on the 'X' close icon on the browser window's title bar.

Is there a javascript which works for all browsers to do that? I don't want to use onUnload() as this gets called only after the window is unloaded. The beforeUnload() function works only for IE browsers.

Please suggest me a suitable solution.

Thanks in advance,
Sreeni.
Hi,

I am using a javascript function which opens a new window to launch the given URL.

function launch () {
target="/xyz/xyz"
y=window.open (target, "newwin", "scrollbars=yes, status=yes,menubar=no,resizable=yes");
y.focus;
}

When this function is called, the popup blocker on my browser is not allowing me to launch the new browser window.

Is there a way for me to find that there is an active popupblocker from the launch()java script and bypass the pop up blocker (without manully disabling the pop up blocker)? or may be is ther a way to find out that there is a pop up blocker so that a java script alert message can be shown to the user?

Thanks in advance.

Sreeni.