kaushik saha

Greenhorn
+ Follow
since Sep 22, 2005
Merit badge: grant badges
For More
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 kaushik saha

sorry it is still not working..
13 years ago
action class

public String execute() throws Exception {

System.out.println("I am inside execute method of customerMaster update ");
UserLogSetting lobj_ULSetting =(UserLogSetting)session.get("USER_LOG");


customerData= salesManager.getCustomerDetail( customerData,lobj_ULSetting);

System.out.println("I am inside execute method of after customer update");
return SUCCESS;
}

jsp page



<s:form action="updateCustomer" id="custDetailFrm" method="POST" theme="simple" namespace="/salesmgmt" target='_self' validate="true">


strutsxml

<action name="updateCustomer" class="com.hrms.salesmgmt.action.UpdateCustomer">
<result name="input">/salesmgmt/customerDetails.jsp</result>
<result >/salesmgmt/customerDetails.jsp</result>
</action>
13 years ago
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

<validators>
<field name="taxId">
<field-validator type="regex">
<param name="expression">[0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9]</param>
<message>The value of Tax Id must be in the format "NN-NNNNNNN", where N is number between 0 and 9</message>
</field-validator>
</field>
</validators>

put it in the WEB-INF/classes/pkgname/action/<actionclass name>-validation.xml

and in the jsp page in the form tag write validate="true" ...but still the validation is not working ....

Other than these what i have to do???Please reply me..
13 years ago
where i place this <actionclassname>-validation.xml file
13 years ago
how can i validate this type field using xml validation in struts2

the format is NN-NNNNNNN

N is no from (0->9) must be 9 digits in all


13 years ago
Hi all,

I have customer table. Its primary key will be generated by the system. When i update the customer value object using hibernate
(code follows............)

this.hibernateTemplate.saveOrUpdate(customerData);

Now i want to get back on that particular object . Actually i want the primary key of that object .(Before updation i can not get the pk. )

So what will be the HQL for getting back the object ?


kaushik


The between method is not working ....Is there another way?

Criteria crit =this.hibernateTemplate.getSessionFactory().openSession().createCriteria(LoanData.class);
crit.add(Expression.between("dateOfTransaction", new Date(fromDate.getTime()), new Date(toDate.getTime())));

Actually this date object is the search criteria .I am using oracle database .In the database the way it is stored is 03-Dec-08.So for matching
the date i have to send the date object in the database in this way 03-Dec-08. As it is not matching so the criteria is not satisfied . I am using hibernet query

"from MasterData masterData where masterData.dateOfTransaction like '"+localDate+"'");

Is there another way....then please tell me....
14 years ago
I want to get the date object in the 03-Dec-08 format.....Is it possible?
14 years ago
From a jsp i submit a date object .In the java code i am getting the date object in this format Wed Dec 03 00:00:00 GMT+05:30 2008.But I need the date object in this format 03-Dec-08.
What i have done so far -----
Date date=getDateOfTransaction(); // Get the date obj from the form
DateFormat dtformat=new SimpleDateFormat("dd-MMM-yy");
String trandate= dtformat.format(date); // In the string output 03-Dec-08
Date dt=(Date)dtformat.parse(trandate); //output of dt Wed Dec 03
00:00:00 GMT+05:30 2008


How can i get only this thing (03-Dec-08) in the date object....
14 years ago
I have a UDP client program .In my program i want to send a file to the server.I have created a GUI form .I use JFileChooser to select the file.
after Choosing it i send the file to the UDP server.
But in the server i receive the file in the Datagrampacket.After that i want to save the file in the server side. How i convert the DatagramPacket
to file? And the file will be saved in the server side with the specific extension that will be sent by the client.

Please help me.
15 years ago
Which book is good for JMF ?
15 years ago
Dear Members,

I want to build a whiteboard application. The characteristics of this application will be ....
1) Must have a canvas upon which i draw something... It just like a
Microsoft paint..
2) After that two from diffrent mechine(connected by the network) will communicate the same interface of this whiteboard..

From where i can get the reference. How i start this project..?
15 years ago
Is it possiible to create javadoc in Html format by writing some command or making some batch file ?
15 years ago
I wrote a java program(named vechile.java) in a file in the package Automobile.

package Automobile;

public abstract class vechile
{
public abstract void speed();
}


Now in diffrent file but in a same package i wrote another java program (named car.java)

package Automobile;

public class car extends vechile
{
public void speed()
{
System.out.println("car specific speed");
}
}


My problem is that i can not compile car.java. The compiler error is "vechile class not found".

I have kept the two program in the Automobile folder.

And when compile then i write this way

f:/Automobile/>javac car.java;


why the second one is not compiling..

Please give me your valueable suggestion.
15 years ago