gautam anand

Greenhorn
+ Follow
since Jun 02, 2004
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 gautam anand

I am developing an application where i am required to store the db rows into some kind of collection. I thought of storing them in a vector but then there is no way for me to refer to particular columns row value. Is there any collection that provides you a way to store the db values in some kind of a grid where u can say column 1 row3 value is x.

Your advice would be sincerely appreciated.

Thanks
15 years ago
I have created an EJB corresponding to one of the auidt tables and the problem I am having is that when using the getter methods of the bean to get the values of the tables columns I get null pointer exceptions because some of the columns have null values. Is there a way to handle this. Also the other problem I have is that we have a column in the table with Oracle data type Date, format: mm/dd/yy hh:mm:ss, which on coversion to the java.sql.Date type returns only the Date part of the database value. Is there a way to extract the complete data format value?.

Your help would be greatly appreciated.

Thanks
Gautam
Its not request_id ..it was actually Customer_id. Sorry for tht.
I am creating an entity bean using CMP 1.1 as Jrun's CMP2.0 doesnot integrate with existing tables. I have two finder methods for the bean, findByPrimaryKey and findbyCustomerId. I am having a problem gettin the findbyCustomerId which is returning a collection of objects. I am making use of local EJB objects.

Home Interface:

public interface CustomerHome extends javax.ejb.EJBLocalHome{

public Customer findByPrimaryKey(CustomerKey key) throws javax.ejb.FinderException;

public Collection findByCustomerId(int key) throws javax.ejb.FinderException;
}

Local Interface:

public interface Customer extends javax.ejb.EJBLocalObject{
public int getCustomerId();
public int getCustIncome();
public int getAddress();
public void setCustomerId(int arg);
public void setCustIncome(int arg);
public void setAddress(int arg);
}

The bean class is nothing but provides the implementation ( getters and setters )for the interface with the abstract definitions for other callback methods.

I have a helper method which I am using to create the home objects and define some methods.

public String getDataFields(){
String fieldName = "";
Collection custcoll;
try {
CustomerHome custh = (CustomerHome)context.lookup("local/ejb/Customer");
custcoll= custhome.findByCustomerId(customerId);
int size = custcoll.size();
System.out.println("collection size: " + size);
Iterator iterator = custcoll.iterator();
while(iterator.hasNext()){
System.out.println("inside iterator");
Customer cust1 = (Customer)iterator.next();
if(cust1!=null)
fieldName=cust1.getColumnName();
System.out.println("fieldName");
}
} catch (FinderException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
}
return fieldName;
}

01/18 16:16:26 error nested exception is: jrunx.persistence.LoadingException: SELECT * FROM Customer_Audit WHERE CUSTOMER_ID=?
javax.ejb.NoSuchObjectLocalException: nested exception is: jrunx.persistence.LoadingException: SELECT * FROM Customer_Audit WHERE REQUEST_ID=?
at jrun.ejb.interceptors.EntitySynchronizationInterceptor.invokeObjectMethod(EntitySynchronizationInterceptor.java:78)
at jrun.ejb.interceptors.EntityInstanceInterceptor.invokeObjectMethod(EntityInstanceInterceptor.java:233)
at jrun.ejb.interceptors.ContainerManagedTransactionInterceptor.invokeRequired(ContainerManagedTransactionInterceptor.java:304)
at jrun.ejb.interceptors.ContainerManagedTransactionInterceptor.invokeTransactedMethod(ContainerManagedTransactionInterceptor.java:140)

In the log files i get the message printing the size of the collection returned by the finder method but somehow the EJB reference the client is gettin is invalid.

Your help would be greatly appreciated. Please provide your suggestions to help solve this problem.
Hi,

I have a jsp page containing a tree structure with hyperlinks and that jsp page also contains two iframes, one of the iframe contains login information and the other contains the main application jsp pages. The page on the second iframe changes depending on the link clicked from tree. When a user logins on one iframes certain features are added to the second iframe pages. The problem I am facing is that even though the user has logged in one iframe the second iframe does not show the additional features until the second iframe is manually refreshed. I want the second iframe to be refreshed when correct login information is entered in the first iframe i.e. i want the second iframe to be refreshed only once.

Please help!!

I sincerely appreciate your help

Thanks
Gautam
Dicky Bullin,

thanks for your help and the example you provided, but i am still not clear you would find out on the next page which button was clicked. I would appreciate if you could explain.

thanks
gautam
17 years ago
JSP
Hi,

the application has to be designed for the intranet and by the term local machine i refer to the machine that a person/developer would use to access the application. I appreciate your help.

Thanks
gautam
17 years ago
JSP
hi,

i have a JSP page page which contains a table with 5 columns. Three of the five columns contains dynamic values and the remaining two columns contain two buttons. the second column containing the dynamic value has a radio button associated with it with the value and the name of the radio button being the same as the dynamic column value. When someone selects a radio button and clicks the button in either the fourth or fifth column, i take them to the next page where i get to the know table row values in which the button was clicked by the selected radion button value which is the same as the dynamic value.

I want a method to find out the value of the items in the row the button was clicked without using the radio button.
Is there any was i can achieve it ??

Thanks
Gautam
17 years ago
JSP
Hi,

I am writing a program wherein i am required to create a file on the local machine of a user with the name of the file being the localmachinename.txt. Is there any way to find out the local name of a machine in JSP or is their any other machine property/attribute that is unique and can be used to create this file.

Thanks
Gautam
17 years ago
JSP
Hi,

I have to design a JSP page where in i am required to create a directory structure similar to the one you get in windows explorer so that when you click something you get all the applications stored under it. Please let me know if there is a way to achieve this in JSP.

Thanks
gautam
17 years ago
JSP
Hi,

Is there any way to hide the apache tomcat server window after starting the tomcat server.Your help would be sincerely appreciated.

Thanks
17 years ago
Hi,

I have a JSP page in which i am displaying a number of values in simple HTML table using for loops. Since there are around 1000 entries i want to divide the exisiting page into multiple pages.I would appreciate if someone could provide an example of pagination or how it can be achieved.

Your help would be sincerely appreciated.

Thanks
Gautam
17 years ago
JSP
Hi,

I have a JSP with two submit buttons with different names and i need to open different jsp pages when either of the button is clicked. Please let me know how can that be accomplisehed. I sincerely appreciate your help.

Thanks
Gautam
[ June 25, 2004: Message edited by: Bear Bibeault ]
Hi,

I want to create a JSP page and then call a native method from the page using JNI. I have been able to call a native method form a simple java program but having problem including the code in a JSP page.

The java program code that works is as follows:


class Native1 {
public native String getValue(String sMain, String sKey, String sFile);
static {
System.loadLibrary("native1");
}

public static void main(String[] args) {

String xxx;
xxx = new Native1().getValue("Main", "gautam", "C:\\test.ini");
System.out.println(xxx);
}
}

test.ini file contains only two entries
[Main]
gautam= Gautam

The value being printed on the console as the output is Gautam(the logic for reading the ini file and getting the value is being defined in the C++ file)

Please let me know how the above java code can be used in a JSP page. Your help would be sincerely appreciated.

Thanks
[ June 20, 2004: Message edited by: Bear Bibeault ]
17 years ago
JSP
Hi,

I want to create a JSP page and then call a native method from the page using JNI. I have been to call a native method form a simple java program but having problem including the code in a JSP page.

The java program code that works is as follows:


class Native1 {
public native String getValue(String sMain, String sKey, String sFile);
static {
System.loadLibrary("native1");
}

public static void main(String[] args) {

String xxx;
xxx = new Native1().getValue("Main", "gautam", "C:\\test.ini");
System.out.println(xxx);
}

}

test.ini file contains only two entries
[Main]
gautam= Gautam

The value being printed on the console as the outputis Gautam.. whose functionality is defined in the C++ file.

Please let me know how the above java code can be used in a JSP page. Your help would be sincerely appreciated.

Thanks
17 years ago