Abhay Kumar

Greenhorn
+ Follow
since Jun 03, 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 Abhay Kumar

Hi All,

Need some Help in Writing Jython scripts which will be used with Grinder.

I need to write a script which executes a batch(.bat) file.
the batch file is interactive, i.e it accepts paramets during its execution.

I was able to write a script which executes a batch file, but when i am trying to give the inputs, its not taking..

can you please help me.

Here is what I have written.
Let me know where am i wrong and how do i solve this issue.
---------------------
from net.grinder.script import Test;
from net.grinder.script.Grinder import grinder;
import TestGrind;

log = grinder.logger.output;
test = Test(1, "Execute");
class TestRunner:
def __call__(self):
session = test.wrap(TestGrind("client.bat"));

---------------------
best regards,
Abhay
17 years ago
Hi All,

In a client server architecture, what is the best way of getting the data from a Database on the Client Side, so that i need not hit the DB more than once.(Assuming that there is no change in the Database.)
I am using Java technology.

regards,
Abhay
17 years ago
Thank You Vamshi and also philip for your answers.
I cannot change the drivers now. So will try with vamshi's suggestions.
Thanks for the answers
A. is correct. If you use DriverManager.getConnection(), you are indeed bypassing the Connection Pool entirely.
B. usually, a third party connection pool will either give you the interface or they will give you the class file containing the DataSource object. In the latter case one has to Import the files, then create a new instance of it
"=new Source(); "
C. SEARCH AND yOU WILL GET ANSWER FOR THIS
Hi,
What exactly differntiates Oracle 8i and 9i.
If I dont use the Application Server facility with 9i, are both one and the same or is there any majot difference between these two
Reply
Hi,
Using jdbc API, I tried using these methods:
previous(), next(), last()...
to scroll through the data.
But i am unable to do it.
Does this have to do anything with the drivers?
What can be the probable reason. Sytax is all correct
Help
yes, I have enabled the plug-in.
But even then I am unable to get the result
19 years ago
Hi,
I am trying to validate using the Validator frame work and try to avoid the ActionForm.
The page is not getting validated
Can You Help me out
Here is the code:
----------
"Customer.jsp"
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<head>
<title>Example of a standard Customer form</title>
</head>
<h1>Example of a standard Customer form</h1>
<body>
<html:form action="/addCustomer.do">
Last Name: <html:text property="lastName"/>
<html:errors property="lastName" /><br>
First Name: <html:text property="firstName"/>
<html:errors property="firstName" /><br>
Street Addr: <html:text property="street"/>
<html:errors property="street" /><br>
City: <html:text property="city"/>
<html:errors property="city" /><br>
State: <html:text property="state" maxlength="2" size="2" />
<html:errors property="state" /><br>
Postal Code: <html:text property="postalCode" maxlength="5" size="5" />
<html:errors property="postalCode" /><br>
Telephone: <html:text property="phone" maxlength="11" size="11" />
<html:errors property="phone" /><br>
<html:submit/>
</html:form>
</body>
-------------------------------------
"config.xml"
Plug-in in included
<form-beans>

<form-bean name="dynaCustomerForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="lastName" type="java.lang.String"/>
<form-property name="firstName" type="java.lang.String"/>
<form-property name="street" type="java.lang.String" />
<form-property name="city" type="java.lang.String"/>
<form-property name="state" type="java.lang.String"/>
<form-property name="postalCode" type="java.lang.String"/>
<form-property name="phone" type="java.lang.String"/>
</form-bean>

</form-beans>
<action-mappings>
<action path="/addCustomer"
type="AddCustomerAction"
name="dynaCustomerForm"
scope="request"
input="/Customer.jsp">
<forward name="success" path="/addCustomerSucceeded.jsp"
redirect="false" />
</action>
</action-mappings>
----------------------------------------
"AddCustomerAction.java"
import org.apache.struts.action.*;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.validator.DynaValidatorForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.IOException;
public class AddCustomerAction extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException{

DynaValidatorForm custForm =(DynaValidatorForm)form;

System.out.println("lastName = " + custForm.get("lastName"));
System.out.println("firstName = " + custForm.get("firstName"));
System.out.println("street = " + custForm.get("street"));
System.out.println("city = " + custForm.get("city"));
System.out.println("state = " + custForm.get("state"));
System.out.println("postalCode = "
+ custForm.get("postalCode"));
System.out.println("phone = " + custForm.get("phone"));
return mapping.findForward("success");

}
}
---------------------------------------
"Validation.xml"
<formset>
<form name=dynaCustomerForm >
<field
property="lastName"
depends="required" >
<arg0 key="dynaCustomerForm.lastName.label" />
</field>
<field
property="firsttName"
depends="required" >
<arg0 key="dynaCustomerForm.firstName.label" />
</field>
<field
property="street"
depends="required" >
<arg0 key="dynaCustomerForm.street.label" />
</field>

<field
property="city"
depends="required" >
<arg0 key=”dynaCustomerForm.city.label”/>
</field>
<field
property=”state”
depends=”required,mask”>
<arg0 key=”dynaCustomerForm.state.label”/>
<var>
<var-name>mask</var-name>
<var-value>${states}</var-value>
</var>
</field>
<field
property=”postalCode”
depends=”required,mask”>
<arg0 key=”dynaCustomerForm.postalCode.label”/>
<var>
<var-name>mask</var-name>
<var-value>${zip}</var-value>
</var>
</field>
<field
property=”phone”
depends=”required,mask ”>
<arg0 key=”dynaCustomerForm.workPhone.label ”/>
<var>
<var-name>mask</var-name>
<var-value>${phone}</var-value>
</var>
</field>
</form>
</formset>
-------------------------------------------------
19 years ago
Thanks for the reply
19 years ago
Hai Chris,
Thanks for the response. The article is pretty Good
19 years ago
How to do paging in Struts
19 years ago
Hi,
Can any one help me with DynaActionForms.
I need a complete example(code) on how to use Dyna...
regards,
Abhay
19 years ago
Hai,
I am trying to call a definition and override it.
It gives me this error.
"org.apache.jasper.JasperException: Error - Tag Insert : No value defined for bean 'myDef' with property 'null' in scope 'null'.
and
javax.servlet.ServletException: Error - Tag Insert : No value defined for bean 'myDef' with property 'null' in scope 'null'. "

Below is the code.
---------------------
"file Name:indexDef.jsp"
<tiles efinition id="myDef" page="/tiles.jsp" >
<tiles ut name="one" content="/one.html" />
<tiles ut name="two" content="/two.html" />
</tiles efinition>
----------------------------------
Here i am overriding the "one" with "OneMore"
and calling the JSP
"File Name: def.jsp"
<tiles:insert beanName="myDef" flush="true" >
<tiles ut name="one" value="/oneMore.html" />
</tiles:insert>
Can any one help me out.
Thanks,
Abhay
19 years ago
Thank you Manuel for the reply.Hope this process of sharing our thoughts continues
19 years ago
I want to know exactly is the difference between Struts Tiles and Templates.
Becoz, I can design ther same using templates.
19 years ago