Radha Damera

Ranch Hand
+ Follow
since Oct 31, 2000
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 Radha Damera

Hi,

I have an xml like this:

<bk:bookstore xmlns:bk="urn:xmlns:25hoursaday-com:bookstore">
<bk:book>
<bk:title>Lord of the Rings</bk:title>
<bk:author>J.R.R. Tolkien</bk:author>
<inv:inventory status="in-stock" isbn="0345340426"
xmlns:inv="urn:xmlns:25hoursaday-com:inventory-tracking" />
</bk:book>
</bk:bookstore>


How to read the values of the above elements using xPath? I could read regular nodes that have no namespaces. But as the above example
has namespances, xpath is not working when it encounters ":". Is there a way around to read this kind of xmlfile using xpath or JDOM?

Thanks
Radha.
Hi,

I have a question about reading class files from war file. My situation is - I am starting a java process in a shell script (in UNIX).
This process starts a thread that reads messages from MQ, so to process the MQ messages, I need a number of class files that i already have
in a war file. But for some reason, my process is not reading from war file. Instead if i physically paste all the class files in a directory, it is working.

So how to read class files from a war file.I have the path of the war file in the classpath, but still it is unable to read.

Hope Iam clear.

Thanks
Radha.
16 years ago
Hi,

I have a JSP and if someone clicks on a button, Iam displaying xml in a seperate window. To display the xml, Iam opening the file using Java File class and Iam displaying using toURL() method in the File class.

<% File xmlFile = new File(<file path> ;%>

var link= "<%= xmlFile.toURL() %>";
window.open(link, "showXML", "width=900,height=550,resizable,scrollbars,status");

This is working perfectly fine when the xml file is on my local machine. It is not getting displayed when the xml file is on a seperate machine
say our server.My local machine is on Win xp, where as our server is on UNIX.

what is the get around for this, do I have to specify the name of the server and port or How should i make this work irrespective of the
location of the xml file.

Thanks
Radha.
HI...

My application is a web-application and i want to write a small xml file onto a server temporary location. Once Iam done with my work, i will delete that file.

My question is how will we get the exact server file path? i tried using http://<servername>/some directory, but it is throwing me an exception that the communication cannot be done.

please advise.

Thanks
17 years ago
HI...

I have a question regarding JSP & struts. In the index page, I have 3 frames - a top frame, a left frame and a
center frame. And right from index page, based on the user actions, we keep displaying new JSPs in the center frame,thus
keeping the top & left frames constant.

My requirement is that for a certain page, i shouldn't display the left frame.so the index page should have only 2 frames - top
& a 100% center frame.I tried to put an if condition saying that the left frame shld be invisible, but the problem is
that the request is not coming back to index page and the code is getting executed only when index page loads up initially. iam assuming this is the case b'se of struts - we keep fowarding the request from one page to the other and not back.

Is there a way around?should i load index page again completely?or how shld i proceed so that my if condition gets executed and only 2 frames show up.

Hope Iam clear

Thanks
17 years ago
Hi...

I want to store XML in the database(without parsing & stroring each field individually...to store as it is) and want to display in HTML.
I feel that it could be stored as BLOB or in a file.

Can anyone suggest me the best approaches or practices for this?

Thanks
Radha.
HI....

I have gone through the site and the idea seems to be very useful.I will soon try to submit my code snippets.

And I liked the idea of being able to find other's code samples.

Thanks
Radha.
17 years ago
Hi Harvinder...
I think that you might get a compile time error for lines 12 and 13.Except those lines, Iam sure that there will not be any problems with the rest of the code.
Correct me if Iam wrong.
Thanks
Radha.
Hi Sriram...
Serialization is a process of saving the state of an object or variables etc to a persistent storage and is useful to send them over network.
As far as I know, this is highly useful in RMI: remote method invocation. You're invoking methods remotely from JVM space 'A' on objects which are in JVM space 'B' -- possibly running on another machine on the network.
To make this happen, all arguments of each method call must have their current state taken out of JVM 'A' memory, flattened into a byte stream which can be sent over a TCP/IP network connection, and then deserialized for reincarnation on the other end in JVM 'B' where the actual method call takes place.
If the method has a return value, it is serialized up for streaming back to JVM A. The easiest way to do this is to make sure all your classes implement java.io.Serializable.
Hope this helps to a certain extent.
Thanks
Radha
Hi Sriram...
Serialization is a process of saving the state of an object or variables etc to a persistent storage and is useful to send them over network.
As far as I know, this is highly useful in RMI: remote method invocation. You're invoking methods remotely from JVM space 'A' on objects which are in JVM space 'B' -- possibly running on another machine on the network.
To make this happen, all arguments of each method call must have their current state taken out of JVM 'A' memory, flattened into a byte stream which can be sent over a TCP/IP network connection, and then deserialized for reincarnation on the other end in JVM 'B' where the actual method call takes place.
If the method has a return value, it is serialized up for streaming back to JVM A. The easiest way to do this is to make sure all your classes implement java.io.Serializable.
Hope this helps to a certain extent.
Thanks
Radha
Hi.....
Iam in search of job. I have 31/2 yrs experience in java and J2EE technologies with a masters in Information Systems.I was offered an open position from a consultancy. They said that they will pay me 50k with benefits in California or in Seattle, WA.
Is it ok? I feel that 50k is too low especially for CA. B'se I have received calls from various agencies which can offer $40-50 per hour.So it is kind of hard for me to decide between high hourly rate with no benefits or salary with health insurance and other benefits.
So can anyone advice me in this regard.
I appreciate your time and help.
Regards
Radha.
17 years ago
Hi Prakash...
The answer for this question is A.I don't know what the test IBM 484 is about.But i learnt EJB using WSAD.So if u look the redbooks on WSAD,we will be given sample code as to how to locate beans using JNDI.There the utlity class uses a method called singleton, which is used to call the beans. There we have to specify the remote home interface as a parameter in calling the bean.
So obviously the answer is A, which is the home remote interface name of the order entity bean.
Hope this clears a bit.
Radha.
Hi all...
I have created a ejb select method(finder) which returns a Set in the bean class.And to make use of this method, I have written an EJB Home method(business method). To call this EJB Home method from my JSP,Iam trying to promote that to the Home interface.But the option is being disabled.WSAD is promoting only to Local and Remote interface.What could be the reason?How to enable that option so that the method signature can be written into the Home interface and hence i can call from my JSP.
Thank you.
Radha.
17 years ago
Hi all...
I iam doing a projectin EJB. I have to retrieve the total no of records from a particular table.Do i have to use the find methods or select methods? I think i have to use find methods,b'se if i use select methods,i cannot access them from my client - JSPs.Am i correct?
Iam using Collection as the return type for my find methods.my problem is that iam getting records,but they are being displayed as various symbols,numbers - as objects even though i typecast or use toString method to display them in string format.
And another question is, once i retreive a record, how to display the various fields? For this do i have to change my return type as the EJBObject so that i can use the get or set methods? Please help me as soon as possible as i have to submit my project soon.
Thank You.
Radha.
Hi all...
I am new to WSAD and iam doing a project. I have to retrieve the total no of records from a particular table.Do i have to use the find methods or select methods? I think i have to use find methods,b'se if i use select methods,i cannot access them from my client - JSPs.Am i correct?
Iam using Collection as the return type for my find methods.my problem is that iam getting records,but they are being displayed as various symbols,numbers - as objects even though i typecast or use toString method to display them in string format.
And another question is, once i retreive a record, how to display the various fields? For this do i have to change my return type as the EJBObject so that i can use the get or set methods? Please help me as soon as possible as i have to submit my project soon.
Thank You.
Radha.
17 years ago