raj agastya

Greenhorn
+ Follow
since Nov 27, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by raj agastya

Hi,

Can somebody help me??
-Raj
19 years ago
Hi,
I have a few classes that extend and implement java.rmi.remote object. The JAR is placed under WEB-INF/lib of a web application.

I am using WSAD 5.1.1. When I start the server, it gives me the following error. Can somebody please help me?? Not sure what I have missed..

[5/3/05 12:07:04:188 IST] 3d410866 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: rebind
Context name: localhost/nodes/localhost/servers/server1
........
..........
Root exception is java.rmi.NoSuchObjectException: object not exported

I tried creating the stub and the skeleton classes manually and added them to the JAR file but still I get the same error. The JAR is in the CLASSPATH of the server.

I also tried creating a simple remote object and tried binding it:
........
Hashtable propertiesMap = new Hashtable();
propertiesMap.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
propertiesMap.put(Context.PROVIDER_URL, "iiop://localhost:2809" );
.......
........
Context context= new InitialContext(propertiesMap);
myRemote instance = new myRemote();
context.bind("TestString",instance);
..........
........

Even this gives :

javax.naming.ConfigurationException: Problem with PortableRemoteObject.toStub(); object not exported or stub not found. Root exception is java.rmi.NoSuchObjectException: object not exported
at sun.rmi.transport.ObjectTable.getStub(ObjectTable.java:115)
at java.rmi.server.RemoteObject.toStub(RemoteObject.java:88)
at com.ibm.rmi.util.JDKBridge.getJRMPStub(JDKBridge.java:129)
at com.ibm.rmi.javax.rmi.PortableRemoteObject.toStub(PortableRemoteObject.java:138)
at javax.rmi.PortableRemoteObject.toStub(PortableRemoteObject.java:105)
at java.lang.reflect.Method.invoke(Native Method)
-raj
19 years ago
Hi,
I am using JDBC rowset to display values from an Oracle database. I am using the setter methods to set username, password, port, sid, host, query. Now that my query has some input parameters, I tried using rowset.getXXX methods to pass values for the bind parameters. I get NullPointerException while doing setXXX.
How do I set values for the bind parameters for a rowset or how do I create a query having bind parameters and pass values for them using rowset?
BTW, I know doing this using normal the PreparedStatement and populating the rowset with the resultset. But is it not possible to do it directly i.e using only the rowset object?
Please help. Below is the code I used:

Thanks
-raj
hi,
I was trying to check if IE browser supports GZIP compression programmatically. I think IE 4 + supports GZIP compression but when I displayed the header and checked using response.getHeader(), it gave: null. Not sure whats happenning. Please give me a clue....
Please see my code below.
When I access my servlet from IE 6+, "encoding" String value is null and so I get the message that compression is not supported.

With Netscape 4.79 it says it supports GZIP compression and "encoding" String value is "gzip" and the message is correct.
IE 6+ supports GZIP compression, isn't it? What's wrong with the code?

Thanks for the help.
-raj
21 years ago
Hi,
I am sorry I wasn't able to put it properly. I'll try again.
In my xml document, information under <Row> tag corresponds to one record in the database, and each <col> represent different columns within it.
I first need to display all the products, basically all <Row> data in products.jsp that leads to editProduct.jsp when the name link is pressed.
Only 'name' represented by second <col> tag value should be displayed as a href link where as, rest of them as plain text.
The href link calls another JSP called editProduct.jsp where I need to pass all the <col> data as parameters values.
So for example, my href link for the below <Row> should be like:
editProduct.jsp?id=3400&name="Black and white"&stat="orderable"&price="300"

Hope I am clearer now. Thank you for your time and help.
Raj.
Hi,
My generated XML doc structure looks like the following:

I need to create href (link) pointing to another JSP with a parameter of its value from the first <col> only. I have written the following XSL but, it
creates wrong output. Please help me creating the correct XSL.
I want to create a link to editProd.jsp?id=3400 for only this tag: <col>3400</col> and rest of the other columns should be just displayed with created as links.

Thank you.
Raj.
Hi,
I have an XML file like the following. I need to write an XSL file which will display the following columns of every tag(<col> under each tag(<row> . How do I do this? My sample XSL is also posted below XML which does not display the xml info in the table. Please help me.
</RowSet>
<data>
<row>
<col>7369</col>
<col>SMITH</col>
<col>CLERK</col>
</row>
<row>
<col>7499</col>
<col>ALLEN</col>
<col>SALESMAN</col>
</row>
<row>
<col>7521</col>
<col>WARD</col>
<col>SALESMAN</col>
</row>
</data>
</RowSet>
XSL:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="row">
<HTML>
<BODY>
<CENTER>
<TABLE>
<TR>
<TD>
<FONT COLOR="#CC0000" SIZE="+1">
<B>List of Products</B>
</FONT>
</TD>
</TR>
<TR>
<TD>
<xsl:for-each select="/RowSet/data/row">
<xsl:value-of select="col"/>
</xsl:for-each>
</TD>
</TR>
</TABLE>
<BR/>
<FORM ACTION="../jsps/Main.jsp" METHOD="post">
<CENTER>
<INPUT TYPE="SUBMIT" NAME="Back" VALUE="Back To Main Page"/>
</CENTER>
</FORM>
</CENTER>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
Thank you and regards,
Raj.
Hi,
I was using the feature called JSP templates in my application to encapsulate Webpage layout for modular design. I followed this article from javaworld: http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb.html
Everything is fine except for error page usage and using page import tags. If anybody has used this feature in JSP templates and has successfully implemented error page, please let me know.
What I want is: if a layout is formed with say 5 jsps(header, footer, side bar, content, right bar), all the other JSPS in the layout is displayed but the jsp which throws error only will use error page. What I want is the whole layout should not displayed even if one of the jsps in the layout throws an error.
Please help me.
-raj
22 years ago
JSP
Hi,
Can I get some pointers please?
Thank you.
-raj
22 years ago
JSP
Hi,
Thanks for the reply. I haven't tried DOM and moreover I don't want to.
Actually I am using JSPs in my application. I am able to create just one row i.e text field without using javascript but with an input parameter which sets a flag for the JSP.
But I want that continuously until I press save.
I heard that it could be done with Javascript and so this posting..
Please help me.
Thanks.
-raj
Hi,
I have a form which has a text field to take category name. I have a submit button which will read the category name and save it into the database.
The problem:
I want to create a 'Add' button by pressing which the page is displayed with a new text field created below the existing rows, retrieving the values also. This should happen until I press save button which will finally save all the categories I created so far.
How do I keep track of the values for every press of the 'Add' button?
Please help me.
Thank you.
-raj
Hi,
I am trying to use JSP templates for my application. From where can I download templates.tld file for use?
Please reply.
Thank you.
-raj
22 years ago
JSP
Hi,
Basically, I am trying to create new categories. In my JSP, I have a form which has a text field to take category name. I have a submit button which will read the category name and save it into the database.
The problem:
I want to create a 'Add' button by pressing which the page is displayed with a new text field created below the first(already present) retrieving the values also. This should happen until I press save button which will finally save all the categories I created so far.
How do I keep track of the values for every press of the 'Add' button?
Please help me.
Thank you.
-raj
22 years ago
JSP
Hi,
Within a java file, I would like to check if the input xml document is a valid schema file. Can anybody give me the pointers or code?
Thanks a lot.
- raj