mihir maniar

Ranch Hand
+ Follow
since Sep 09, 2003
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 mihir maniar

I would like to insert 3 records, 1 records each in 3 different tables to complete a transaction in IBATIS. I need to repeat this for about 3 to 4 lac records. So while using the SQLMAPExecutor object , while putting a different in this object resulted in taking a long time to insert 5000 records where as if I put only one insert query (i.e. inserting to one table only) then it would hardly 2 seconds to do the same. So please help me with this, since the transaction spans across 2 tables, i need to do that at once and then repeat the same for the other records. Thanks in advance.
I get the following error "javax.naming.NamingException: Cannot create resource instance" at the line "DataSource ds = (DataSource)envContext.lookup("jdbc/mydb");" in my action class.

I am trying to connect to MySQL database using JNDI. the document that I am referring to resolve the issue is: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

the configuration of the system is: Tomcat 5.5.12 Struts 1.3 MySQL Server version: 5.0.37-community-nt MySQL Community Edition (GPL) MYSQL connector to connect frm java code mysql-connector-java-5.0.8-bin.jar (I have downloaded the connector from http://dev.mysql.com/downloads/connector/j/5.0.html ) The code to connect in the action class is



The complete error stack is


This is my server.xml




This is the web.xml




Kindly let me know what is going wrong. Thanks a million in advance.
12 years ago
well one of the better programming model would be to have a servlet that will call the DAO objects that talk to database and retrieve the values that you want in a POJO (Plain old java object). then store this in the session and call the jsp and from session access this object. i hope this helps you.
13 years ago
JSP
Hi,
i have developed a code for Nokia 6600 to talk to Computer. the only thing where it get's stuck is the UUID stuff. i am not sure what value to specify in for the UUID and the attribute set while opening the connection to the computer via the Nokia 6600 code.


this is the code on the computer so that the mobile can communicate.
in the constructor of my class.



yOU can clearly see that i've tried lot of stuff. pls help at the earliest. thanks a million.
13 years ago
I have a client.jsp on server A. I want to call server.jsp on B server with required parameters, from client.jsp and then come back to client.jsp with the some of the input controls present on the server.jsp page. how to go about it. thanks in advance.
[ December 25, 2006: Message edited by: Bear Bibeault ]
14 years ago
JSP
this is my command.
<target name="war" depends="mycreate">
<!--Create the war file now since the folder is ready-->
<war update="true" destfile="${MyApp.name}.war" basedir = "${createFolder}" >
</war>
</target>

i am getting an error :
"BUILD FAILED
C:\Mihir\Ant\CreateJar\build.xml:67: webxml attribute is required"

i am using ant 1.6.5.
i have written a command previously that copies the web.xml into the folder which will be converted to war using the above command.
<copy toDir="${createFolder}/${createWebInf}" overwrite="true">
<fileset dir=".">
<include name="web.xml"/>
</fileset>
</copy>
14 years ago
I would like to know how to start or stop the tomcat 5.0 and wsad 1.3 servers using the ant script. Thanks in advance.
14 years ago
thank you for your suggestion Mr Clapham. I would like to know the exact syntax of the "java -jar " solution. secondly there must be a easier way to deploy this code on the client side without having the client to do all this. please suggest some other way if possible. the other machine that i was referring to is that of client.
14 years ago
thank you for all the solutions . i worked it out and it is fine. i have put a jar file in the startup folder and restarted windows and java code runs without the comman prompt but the problem is that if i close that window then how should i re invoke the application? i.e. how to re invoke the application from a jar file?

this thing is working fine on my machine but on another machine it opens the winrar when the machine starts. this is because in the " open with " property of this jar file winrar program is chosen to open it. i tried to change it to javaw option but no such exe is listed there on another machine. that machine has jre installed and it is the same version as on my machine then what could be the problem. if on that machine when i place the entire path of the jar file in the classpath then it works fine.what is wrong.
14 years ago
how to ensure that only one instance of that application is running in that case? i mean to say when i click on the jar file in the start menu it will start a new application. i want to start only one instance of this application. how to achieve that?
14 years ago
thank you for all the solutions . i worked it out and it is fine. i have put a jar file in the startup folder and restarted windows and java code runs without the comman prompt but the problem is that if i close that window then how should i re invoke the application? i.e. how to re invoke the application from a jar file?
14 years ago
1.> it works on my machine but not on other machine. it says that there is some error and that command prompt window just goes away. but if i call the batch file seperately, then it works fine.
2.> it is ok for developers machine but if the same has to be deployed on the client's machine then the command prompt window looks ugly and annoying. how to solve this one?
14 years ago
I would like to run a standalone java code when the operating system loads all by itself just like any other services. i hope the question is clear enough. any kind of help is appreciated. thanks in advance
14 years ago
when i try the following code it tells me unparseable date "01022006". could you pls help me the exact area where it is causing the problem and help me rectify it. thx.

String strDate=new String("01052006");
Date d = DateFormat.getDateInstance().parse(strDate);
out.println(d.toString());
14 years ago
i have a string in the format "01022006" which should get converted to date object and give me the date as 02-01-2006. i.e. 2nd Jan 2006. How can i achieve this?
14 years ago