Pravin Sharma

Greenhorn
+ Follow
since Jun 18, 2009
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 Pravin Sharma

Hi Harvinder,
You have mentined that you got solution for above problem.
I am using the same solution,but still i am getting that problem.
I am using JdbcTemplate of spring framework to get connection.
Following is what i am doing:

Connection conn = jdbcTemplate.getDataSource().getConnection();
OracleConnection ocon = ((DelegatingConnection) conn).getInnermostDelegate();

In abve cas i got null reference.

if try with getDelegate method i got the wraaper object so it is giving classcast exception.
java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

Please Help me out.
Hi,
I am using log4j for logging my application errors.with this a common log file is creating for logger.
But in my company there is requirement like ,logger should create userwise log files.
Is it possible to create userwise log files with Log4j.
If yes please help me out.....
hi carol,

in my property file ,i mentioned date pattern as of i know.is there any data pattern for it.shall i have to configure in my case.
please suggest.
thks tanzy to help me,
you are right that i need to create file with current timestamp.but i want it to be created dynamically.
as i read on some docs,if i give file name and date pattern,file will be created with that file name appended with date as of date pattern.
so if you can tell me more about DailyRollingFileAppender,please tell.

Hi,
I am using dailyRollingFileAppender for logger.i have configured it as follows

log4j.appender.fileAppender = org.apache.log4j.DailyRollingFileAppender
log4j.appender.fileAppender.File = .\\App_Error_Log.log
log4j.appender.fileAppender.DatePattern='.'yyyy-MM-dd
log4j.appender.fileAppender.Append = true
log4j.appender.fileAppender.layout = org.apache.log4j.PatternLayout
log4j.appender.fileAppender.layout.ConversionPattern =[%d{dd MM yy HH:mm:ss}] %-5p %C : %L - %m%n

it is creating new file but file name does not contains any date pattern that i defined.

Please help me.....
No we are avoiding the caching of pages...
here is my code for jsp
<html:form action="AllocationPlanAction">
<table border="0">
<tr id="order" >
<td >
<table border="0">
<tr>
<td class="form">
Start Date
</td>
<td >
<html:text name="allocationPlanForm"
property="planStartDate" styleClass="form" tabindex="-1"
maxlength="25" size="14" readonly="true" />
<input type="image"
src="images\calender_icon.gif" id="imgPlanStartDate"
tabindex="1" width="18" height="16" />

</td>
<td class="form">
Bucket Size
</td>
<td >
<html:text styleClass="form" name="allocationPlanForm"
property="planBucketSize" />
</td>
<td class="form">
<html:checkbox name="allocationPlanForm"
property="allowProjection"/>
Allow Projection
</td>
<td class="form">
<html:checkbox name="allocationPlanForm" property="allMaterialSelected">
All Material
</html:checkbox>
</td>
</tr>
<tr>
<td class="form">
End Date
</td>
<td>
<html:text name="allocationPlanForm" property="planEndDate"
styleClass="form" tabindex="2" maxlength="25" size="14"
readonly="true" />
<input type="image"
src="images\calender_icon.gif" id="imgPlanEndDate"
tabindex="1" width="18" height="16" />

</td>
<td class="form">
<html:checkbox name="allocationPlanForm"
property="inventory" />
Inventory
</td>
<td class="form">
<html:checkbox name="allocationPlanForm" property="freeWIP" />
Free WIP
</td>
<td class="form">
<html:checkbox name="allocationPlanForm" property="freeFG" value="0" />
Free FG
</td>
<td class="form">
<html:checkbox name="allocationPlanForm"
property="allOrderSelected" />
All Order
</td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>



also the form code is:

public class AllocationPlanForm extends ActionForm {
/**
*
*/
private static final long serialVersionUID = 1L;
private String planStartDate;
private String planEndDate;
private String planBucketSize;
private boolean allowProjection;
private boolean inventory;
private boolean freeWIP;
private boolean freeFG;
private boolean allMaterialSelected;
private boolean allOrderSelected;
private String isAllMatSelected;

public String getIsAllMatSelected() {
return isAllMatSelected;
}

public void setIsAllMatSelected(String isAllMatSelected) {
this.isAllMatSelected = isAllMatSelected;
}

public AllocationPlanForm(){
// set the current date to planStartDate by default.
DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy");
java.util.Date date = new java.util.Date();
planStartDate = dateFormat.format(date);
// set the end date to one month after start date by default.
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.DATE, 30);
planEndDate = dateFormat.format(c1.getTime());

planBucketSize = "";
}

public String getPlanStartDate() {
return planStartDate;
}
public void setPlanStartDate(String planStartDate) {
this.planStartDate = planStartDate;
}
public String getPlanEndDate() {
return planEndDate;
}
public void setPlanEndDate(String planEndDate) {
this.planEndDate = planEndDate;
}
public String getPlanBucketSize() {
return planBucketSize;
}
public void setPlanBucketSize(String planBucketSize) {
this.planBucketSize = planBucketSize;
}
public boolean isAllowProjection() {
return allowProjection;
}
public void setAllowProjection(boolean allowProjection) {
this.allowProjection = allowProjection;
}
public boolean isInventory() {
return inventory;
}
public void setInventory(boolean inventory) {
this.inventory = inventory;
}
public boolean isFreeWIP() {
return freeWIP;
}
public void setFreeWIP(boolean freeWIP) {
this.freeWIP = freeWIP;
}
public boolean isFreeFG() {
return freeFG;
}
public void setFreeFG(boolean freeFG) {
this.freeFG = freeFG;
}
public boolean isAllMaterialSelected() {
return allMaterialSelected;
}
public void setAllMaterialSelected(boolean allMaterialSelected) {
this.allMaterialSelected = allMaterialSelected;
}
public boolean isAllOrderSelected() {
return allOrderSelected;
}
public void setAllOrderSelected(boolean allOrderSelected) {
this.allOrderSelected = allOrderSelected;
}


}


i checked one parameter with string property but that time also its not updating.
14 years ago
Hi,
I have used scope as session in struts-config.xml for my action(Struts 1.3).In jsp page i am having some checkboxes which are mapped to forms' some boolean properties.first time when i request that jsp page,i am getting false as all checkbox values .
After checking any checkbox if i submit that form that time i am getting correct values means true.but when i again uncheck that checkboxes,after submiting i am getting old values i.e. true.

Please HELP me.....
14 years ago
Hi
In my company there is need to authenticate the user against windows active directory.
So i need your help.Please tell me the way how i can authenticate the user against Active directory.
I read some where i can do it with LDAP server.but i dont know about LDAP server.
Is there ay way to access activer directory without ldap.
Also please tell me how i can use activeds.IADsOpenDSObject class in my java code.

Please HELP me....

Thanks.
14 years ago
Hi,
Is it possible to make client side validation in struts 1.3.10.
So if yes,can anyone tell me how to implement that.
I tried it with validaotr.xml.but while starting server its giving error
like
SEVERE: Skipping validation rules file from '/WEB-INF/validator.xml'. No url could be located.
javax.servlet.ServletException: Skipping validation rules file from '/WEB-INF/validator.xml'. No url could be located.

i placed validator.xml file in WEB-INF folder.
Please help me to apply clent side validation in struts 1.3.10 or with any 1.3.*

Thank you.
14 years ago