Checking based on database value?

2006-12-20 Thread Mallik

Hi friends
my problem is i have to ArrayLists 
one contains total services and another contains assigned services to a
role.
when we select a role, assigned services from the total services should be
selected.
In a database table i have serviceids for each service and in another table,
what are the serviceids for a roleid.
how can i do this can anybody help me please.
thanks in advance

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/Checking-%3Chtml%3Acheckbox%3E-based-on-database-value--tf2863931.html#a8003324
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



For Viewing data DynaValidatorForm not working, why?

2006-12-19 Thread Mallik

HI Friends
i have a problem that for viewing data DynaValidatorForm is not working
well.
if i create normal formbean it is displaying all the data well
but when i use DynaValidatorForm, the last record only displaying repeatedly 
(exactly  oracle count(*) returned value times )
why this is ?
i have to use validation framework for data inserting forms, so i want to
use the save form for both inserting form and viewing form.
how can i overcome this problem, please let me know?
thanks in advance

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/For-Viewing-data-DynaValidatorForm-not-working%2C-why--tf2858311.html#a7985678
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



comparing two values in validation framework..help?

2006-12-15 Thread Mallik

Hi friends
i have to comparing password and confirm password with validation framework.
how can i do this let me know please

thanks in advance

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/comparing-two-values-in-validation-framework..help--tf2825561.html#a7887166
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



log4j configurations?

2006-12-13 Thread Mallik

Hi friends 
i am working on struts in Exadel studio
i am getting the error:
--
log4j:WARN No appenders could be found for logger
(org.apache.commons.beanutils.ConvertUtils).
log4j:WARN Please initialize the log4j system properly.

---
i go through google and every where saying that add log4j.properties to
classpath
but i don't know how to add to classpath in exadel studio 
please let me know how to overcome this problem

thanks in advance

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/log4j-configurations--tf2813547.html#a7851592
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



external javascript file linking problem?

2006-12-11 Thread Mallik

Hi friends
i am converting a project into struts
i want to use my javascript(js) calender file in strtus
application.(calender will display in popup)
but that javascript file is not working. 
what will be the reason
this way i link it to jsp file:
---


---
and i also tried like this:
--


and also


no one is working 
what will be the reason
or what is the way of linking external js file
let me know please
thanks in advance

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/external-javascript-file-linking-problem--tf2805692.html#a7827816
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems with tag

2006-12-11 Thread Mallik

HI Rick
make sure that  doesn't close with in start tag like this:

(i got the same problem beacuse of this silly mistake)
ur's
Mallik


Rick Schumeyer wrote:
> 
> Never mind...it turns out that I added a non-default constructor to the 
> ActionForm bean without also adding a default constructor.
> 
> Rick Schumeyer wrote:
>> I'm using struts 1.3.5.
>>
>> I have a jsp that displays a .
>>
>> If I surround the table with:
>>
>> 
>> ...
>> 
>>
>> then nothing in the page renders.  The EmployeeAdd action exists; it 
>> is associated with an ActionForm that also exists.
>>
>> Does anyone have any idea what can cause this problem?
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problems-with-%3Chtml%3Aform%3E-tag-tf2803623.html#a7827759
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



calling bean reset() in Action class?

2006-12-11 Thread Mallik

Hi friends
i have a form that contain some text fields where user enters data and click
save, then i am saving and returning to the same page.
here the previous values are redisplaying(which should not) even succefully
added to database.
for this i feel that by calling reset method of form bean we can overcome.
i did it but failed .
this is my code:(part of action class)
-
DynaValidatorForm df = (DynaValidatorForm)form;
df.reset(mapping,request);
return mapping.findForward("saved");

--
where i did mistake or is this right way or any other to do this

help me please
thanks in advance

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/calling-bean-reset%28%29-in-Action-class--tf2792982.html#a7792121
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: datasource creation problem?

2006-12-04 Thread Mallik

Hi Friend
How to add jar files to path in Exadel stuio?

Ur's
Mallik



Venkata Phani Kumar wrote:
> 
> Hi mallik,
> just try by adding commons-dbcp.jar to build path.
> 
> - Original Message ----- 
> From: "Mallik" <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, December 04, 2006 3:22 PM
> Subject: datasource creation problem?
> 
> 
>>
>> Hi friends
>> i started my application in Struts using IDE Eclipse.
>> when i create datasource like this:
>> 
>>   
>> > value="oracle.jdbc.driver.OracleDriver"/>
>> > value="jdbc:oracle:thin:@172.23.162.200:1521:arti"/>
>> 
>> 
>>   
>>  
>> in struts-config.xml i am getting the error:
>> java.lang.ClassNotFoundException:
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource
>>
>>
>> i am not getting the reason ...how to solve this. help me please.
>> ur's
>> Mallik
>> -- 
>> View this message in context:
> http://www.nabble.com/datasource-creation-problem--tf2750208.html#a7673145
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/datasource-creation-problem--tf2750208.html#a7674107
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



datasource creation problem?

2006-12-04 Thread Mallik

Hi friends
i started my application in Struts using IDE Eclipse.
when i create datasource like this:

  
   



  
 
in struts-config.xml i am getting the error:
java.lang.ClassNotFoundException:
org.apache.tomcat.dbcp.dbcp.BasicDataSource


i am not getting the reason ...how to solve this. help me please.
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/datasource-creation-problem--tf2750208.html#a7673145
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



help?

2006-11-21 Thread Mallik

Hi friends 
this is a modifying details page.
i have a select box,that will populate with databases values. i used
. till now
everything ok.
but one of these options should select automatically when the page displayed
that value is in formBean. 
how can i do this help pease

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/%3Chtml%3Aoptions--%3E-help--tf2667275.html#a7438109
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help?

2006-11-21 Thread Mallik

Hi friend
thankyou
i got it
thankyou very much

ur's
Mallik


chamalsl wrote:
> 
> Hi,
> 
> U can do like this,
> 
> 
> 
>  property="allTeams" value="teamRef" label="teamName"/>
> 
> 
> 
> Division is a form bean.
> allTeams is the vector which contains the objects.
> Vector contains team objects which has teamRef and
> teamName properties.
> 
> division form bean also contains a property for
> teamRef.
> ""
> 
> So when this teamRef is equal to teamRef of one of the
> team objects in vector it will be selected.
> 
> Chamal.
> 
> 
> 
> 
> --- Mallik <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Hi friends 
>> this is a modifying details page.
>> i have a select box,that will populate with
>> databases values. i used
>> > labelProperty=""/>. till now
>> everything ok.
>> but one of these options should select automatically
>> when the page displayed
>> that value is in formBean. 
>> how can i do this help pease
>> 
>> ur's
>> Mallik
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/%3Chtml%3Aoptions--%3E-help--tf2667275.html#a7438109
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>> 
>> 
>>
> -
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> 
>> 
> 
> 
> 
>  
> 
> Sponsored Link
> 
> Mortgage rates near 39yr lows. 
> $510k for $1,698/mo. Calculate new payment! 
> www.LowerMyBills.com/lre
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Chtml%3Aoptions--%3E-help--tf2667275.html#a7466026
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DynaValidatorForm help?

2006-11-21 Thread Mallik

Hi friends
i don't have idea  about  DTO
can you give me some idea please

ur's
Mallik


nuwan chandrasoma-2 wrote:
> 
> Hi,
> 
> The loop is wrong, your are overwriteing the same form bean, and also what
> i 
> would suggest is create a DTO for this and populate the DTO and add create
> a 
> list of those DTO's, and set it to the from or request from there you can 
> get the list and can easily iterate this list
> 
> Regards,
> 
> Nuwan.
> 
> - Original Message - 
> From: "Mallik" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, November 21, 2006 7:21 AM
> Subject: RE: DynaValidatorForm help?
> 
> 
>>
>> hi friend
>> i have no idea about resetting
>> this is my source code
>> please help me in finding worng..
>>
>> Action Class
>> -
>> public ActionForward execute(ActionMapping mapping, ActionForm form,
>> HttpServletRequest request, HttpServletResponse response) throws
>> Exception
>> {
>> DynaValidatorForm block = null;
>> try // try start
>> {
>> ds = getDataSource(request);
>> conn = ds.getConnection();
>> stmt = conn.createStatement();
>>
>> String query = "SELECT UNIQUE B.BLOCKID AS BLOCKID, B.SHORTDESCRIPTION AS
>> BLOCKSHORTDESCRIPTION, B.DESCRIPTION AS DESCRIPTION, B.ADDRESS AS 
>> LOCATION,
>> B.PHONE AS PHONENO, B.COLLEGEID AS COLLEGEID, C.SHORTDESCRIPTION AS
>> COLLEGESHORTDESCRIPTION FROM BLOCKS B, COLLEGES C ORDER BY
>> B.SHORTDESCRIPTION";
>> rs = stmt.executeQuery(query);
>> blocks = new ArrayList();
>> if(rs.next())
>> {
>> do
>> {
>> block = (DynaValidatorForm)form;
>> block.set("id",rs.getString("BLOCKID"));
>> block.set("shortDesc",rs.getString("BLOCKSHORTDESCRIPTION"));
>> block.set("desc",rs.getString("DESCRIPTION"));
>> block.set("location",rs.getString("LOCATION"));
>> block.set("phoneNo",rs.getString("PHONENO"));
>> block.set("collegeShortDesc",rs.getString("COLLEGESHORTDESCRIPTION"));
>> block.set("college",rs.getString("COLLEGEID"));
>> blocks.add(block);
>> }while(rs.next());
>> }else
>> {
>> return mapping.findForward("noCollegeSetup");
>> }
>> }}catch(SQLException e)
>> {
>> e.printStackTrace();
>> return mapping.findForward("sqlException");
>> }catch(Exception e)
>> {
>> e.printStackTrace();
>> return mapping.findForward("exception");
>> }finally
>> {
>> if(conn!=null)
>> conn.close();
>> }
>> request.setAttribute("BLOCKS", blocks);
>> return mapping.findForward("continue");
>>
>> }
>> -
>> this is my jsp
>> -
>> 
>> 
>> > property="shortDesc"/>
>> > property="location"/>
>> > property="phoneNo"/>
>> > property="collegeShortDesc"/>
>>  'blocksModify.do?id=> name="blocks" property="id" '> 
>> 
>> 
>> -
>>
>> Hi,
>> Are you resetting the property correctly in your action class?
>> Using,
>> PropertyUtils.setSimpleProperty(form, "obj", List);?
>>
>> Regards,
>> Mano
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/DynaValidatorForm-help--tf2677169.html#a7466886
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DynaValidatorForm-help--tf2677169.html#a7469057
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DynaValidatorForm help?

2006-11-21 Thread Mallik

hi friend
i have no idea about resetting 
this is my source code 
please help me in finding worng..

Action Class
-
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
DynaValidatorForm block = null; 
try // try start
{
ds = getDataSource(request);
conn = ds.getConnection();
stmt = conn.createStatement();

String query = "SELECT UNIQUE B.BLOCKID AS BLOCKID, 
B.SHORTDESCRIPTION AS
BLOCKSHORTDESCRIPTION, B.DESCRIPTION AS DESCRIPTION, B.ADDRESS AS LOCATION,
B.PHONE AS PHONENO, B.COLLEGEID AS COLLEGEID, C.SHORTDESCRIPTION AS
COLLEGESHORTDESCRIPTION FROM BLOCKS B, COLLEGES C ORDER BY
B.SHORTDESCRIPTION";
rs = stmt.executeQuery(query);
blocks = new ArrayList();
if(rs.next())
{
do
{
block = (DynaValidatorForm)form;
block.set("id",rs.getString("BLOCKID"));

block.set("shortDesc",rs.getString("BLOCKSHORTDESCRIPTION"));

block.set("desc",rs.getString("DESCRIPTION"));

block.set("location",rs.getString("LOCATION"));

block.set("phoneNo",rs.getString("PHONENO"));

block.set("collegeShortDesc",rs.getString("COLLEGESHORTDESCRIPTION"));

block.set("college",rs.getString("COLLEGEID"));
blocks.add(block);
}while(rs.next());
}else
{
return mapping.findForward("noCollegeSetup");
}
}}catch(SQLException e)
{
e.printStackTrace();
return mapping.findForward("sqlException");
}catch(Exception e)
{
e.printStackTrace();
return mapping.findForward("exception");
}finally
{
if(conn!=null)
conn.close();
}
request.setAttribute("BLOCKS", blocks);
return mapping.findForward("continue");

}
-
this is my jsp 
-












 'blocksModify.do?id= 




-

Hi,
Are you resetting the property correctly in your action class?
Using,
PropertyUtils.setSimpleProperty(form, "obj", List);?

Regards,
Mano

-- 
View this message in context: 
http://www.nabble.com/DynaValidatorForm-help--tf2677169.html#a7466886
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



help?

2006-11-17 Thread Mallik
ping.findForward("continue");

}
-
this is my modify jsp page
-
























































Select



  












-------
let me know where i did worng or how to handle this
help me please

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/%3Cbean%3Adefine%3E-help--tf2658641.html#a7415847
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Preventing redisplay for .?

2006-11-14 Thread Mallik

Hi friends 
the situation is:
i have a form in that there are some text fields when i click on submit,
data should save to database and the same form should display. If the any
primary key problem then the form with message like "record already existed"
should display.
Every thing is ok but when data inserted successfully form displaying with
data in text fields, this should not for me
how can i prevent redisplaying the data if inserted successfully.
Help me please

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/Preventing-redisplay-for-%3Chtml%3Atext%3E.--tf2634443.html#a7353114
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DispatchAction help?

2006-11-12 Thread Mallik

HI friends
i am using DispatchAction but i don't want to validate for some buttons and
i want validate the data for some another buttons
like suppose
i have
 "save" (to add the data and go to view details page) for this validation
should work
 "Add more" (to add the data and back to same page) for this validation
should work
 "cancel" (just go back) for this validation should not work
 "View" (just go to View page) for this validation should not work

how can i do this
help me please

Ur's
Mallik





-- 
View this message in context: 
http://www.nabble.com/DispatchAction--help--tf2620433.html#a7312355
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



if("N".equals()),can I?

2006-10-31 Thread Mallik

hi Frineds
i have a problem that based on one field value i should display some fields 
for that i need to check  value...
for example if no lunch break, i should not display lunch from and lunch to
fields otherwise i should display ?
how can i do this ?
this is the way i did, but it is not working..
(i set ArrayList withthe name "COLLEGEDETAILS" to request object  )
--

























<%

if("N".equals())

{

%>













<%

}

%>















-
let me know please

ur's
Mallik
 
-- 
View this message in context: 
http://www.nabble.com/if%28%22N%22.equals%28%3Cbean%3Awrite-name%3D%22college%22-property%3D%22noLunch%22-%3E%29%29%2Ccan-I--tf2545551.html#a7093036
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session tracking in struts?

2006-10-27 Thread Mallik

HI friends
In my application i want to test session valid or not before affaring any
service to the user.
that means, once the user logon, i will maintain a session and for any
request thenafter upto logout i need to test that session is valid,
otherwise i need to display sessionExpire page and requires relogin.
please let me know that how to do it?

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/Session-tracking-in-struts--tf2527634.html#a7045712
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ActionMessages in Struts?

2006-10-26 Thread Mallik

HI friends 
i want to send some message from action class to view. that is like
"Inserted successfully", after inserting data to database.
how can i do this?
help me please...

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/ActionMessages-in-Struts--tf2512442.html#a7006628
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to use SET method of DynaValidatorForm?

2006-10-25 Thread Mallik

Hi friends
my problem is :
how to use set method of DynaValidatorForm like get("");
i am using like this but it is not working.let me know where i did
mistake...

this is my execute method of BlocksSetup action
(i want to show all the blocks existed,and give text boxes to enter new)
--
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
DynaValidatorForm block = null;
try
{

ds = getDataSource(request);
conn = ds.getConnection();
stmt = conn.createStatement();
String query = "SELECT
BLOCKID,COLLEGEID,ADDRESS,SHORTDESCRIPTION,PHONE,CREATEDBY,CREATEDDATE FROM
BLOCKS ORDER BY BLOCKID";
rs = stmt.executeQuery(query);

while(rs.next())
{
block = new DynaValidatorForm();
block.set("blockNo",rs.getString("BLOCKID"));
block.set("location",rs.getString("ADDRESS"));

block.set("shortDesc",rs.getString("SHORTDESCRIPTION"));
block.set("phoneNo",rs.getString("PHONE"));
blocksDetails.add(block);
}

}catch(SQLException e)
{
e.printStackTrace();
}
request.setAttribute("BLOCKS",blocksDetails);
return mapping.findForward("continue");

}


this is my jsp




Block Details



*Block No

*Short Desc

Location

Phone No



























this is struts-config.xml part
---







-----
let me know the problem

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/how-to-use-SET-method-of-DynaValidatorForm--tf2506863.html#a6989684
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem?

2006-10-18 Thread Mallik

Hi friends
 i have a problem with , i am not getting where i am going
worng
this is my code ...
this is action class
--
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
BlocksForm block = null;
try
{

ds = getDataSource(request);
conn = ds.getConnection();
stmt = conn.createStatement();
String query = "SELECT
BLOCKID,COLLEGEID,ADDRESS,SHORTDESCRIPTION,PHONE,CREATEDBY,CREATEDDATE FROM
BLOCKS ORDER BY BLOCKID";
rs = stmt.executeQuery(query);

while(rs.next())
{
block = new BlocksForm();
block.setBlockId(rs.getString("BLOCKID"));
block.setCollegeId(rs.getString("COLLEGEID"));
block.setLocation(rs.getString("ADDRESS"));

block.setShortDesc(rs.getString("SHORTDESCRIPTION"));
block.setPhoneNo(rs.getString("PHONE"));
block.setCreatedBy(rs.getString("CREATEDBY"));

block.setCreatedDate(rs.getString("CREATEDDATE"));

blocksDetails.add(block);
}

}catch(SQLException e)
{
e.printStackTrace();
}
request.setAttribute("blocksDetails",blocksDetails);
return mapping.findForward("continue");

}

this is by jsp












--



---
this is my form bean 
-
public class BlocksForm extends DynaValidatorForm
{
private String blockId;
private String collegeId;
private String location;
private String shortDesc;
private String phoneNo;
private String createdBy;
private String createdDate;

public void setBlockId(String blockId){this.blockId = blockId;}
public void setCollegeId(String collegeId){this.collegeId = collegeId;}
public void setLocation(String location){this.location = location;}
public void setShortDesc(String shortDesc){this.shortDesc = shortDesc;}
public void setPhoneNo(String phoneNo){this.phoneNo = phoneNo;}
public void setCreatedBy(String createdBy){this.createdBy = createdBy;}
public void setCreatedDate(String createdDate){this.createdDate =
createdDate;}

public String getBlockId(){ return this.blockId;}
public String getCollegeId(){ return this.collegeId;}
public String getLocation(){ return this.location;}
public String getShortDesc(){ return this.shortDesc;}
public String getPhoneNo(){ return this.phoneNo;}
public String getcreatedBy(){ return this.createdBy;}
public String getCreatedDate(){ return this.createdDate;}


}
---
let me know where i went worng

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/%3Cbean%3Awrite%3E-problem--tf2465683.html#a6873390
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



displaying resultset in jsp(view) from Action(model)?

2006-10-18 Thread Mallik

HI friends
i  new to this struts and now i come to presenting the data in view 
how to present the data in view?
can i use my  ActionForm to create ArrayList or i need to code another
simple bean.
how to pass that ArrayList to View or it defaultly available to View?
what are the meaings of attributes of logic tag? 
let me know all these and give me some sample code or example
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/displaying-resultset-in-jsp%28view%29-from-Action%28model%29--tf2464788.html#a6870990
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adding dynamic elements to form?

2006-10-13 Thread Mallik

HI friend i am very new to struts, can you please send some example or
artical on it
ur's
Mallik

Sandeep Gupta wrote:
> 
> create a main form VO which will hold an array of child form VO.
> the child form VO will map to the row elements
> pass this main form VO to struts and in the action class
> iterate over this array to get all row elements
> 
> hope this helps.
> 
> - Sandeep
> 
> On 10/12/06, Mallik <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi friends
>> i have a situation where i should go for dynamic form elements.
>> that is i have aproblem like this:
>> i will give statically one row to enter the details, if he needs more
>> rows
>> he will click on button then we should provide one more row.how can we do
>> it
>> in struts,help me please
>>
>> form looks like:
>> ---
>> id  name  phoneno
>> --
>> txt_id   txt_name txt_ph "button"
>>
>> after giveing details,if user click on button, the form should
>> ---
>> id  name  phoneno
>> --
>> 001 xyz   123
>> txt_id   txt_name txt_ph "button"
>>
>> like this we should add dynamically
>> waiting for advice with some code
>>
>> ur's
>> Mallik
>> --
>> View this message in context:
>> http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6775012
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Regards,
> 
> Sandeep Gupta
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6793662
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Adding dynamic elements to form?

2006-10-12 Thread Mallik

Hi friends
i have a situation where i should go for dynamic form elements.
that is i have aproblem like this:
i will give statically one row to enter the details, if he needs more rows
he will click on button then we should provide one more row.how can we do it
in struts,help me please

form looks like:
---
id  name  phoneno
--
txt_id   txt_name txt_ph "button"

after giveing details,if user click on button, the form should
---
id  name  phoneno
--
001 xyz   123   
txt_id   txt_name txt_ph "button"

like this we should add dynamically
waiting for advice with some code

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6775012
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



validWhen problem?

2006-10-10 Thread Mallik
  
13:40

13:45

13:50

13:55

14:00

14:05

14:10

14:15

14:20

14:25

14:30

14:35

14:40

14:45

14:50

14:55

15:00




  

-
let me know where i went worng
if the user check "noLunch" he no need to give any details for "lunchFrom"
and "lunchTo", if not she should give 
let me know how to meet that need 

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/validWhen-problem--tf2416301.html#a6735359
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: requiredif help?

2006-10-10 Thread Mallik
  
13:40

13:45

13:50

13:55

14:00

14:05

14:10

14:15

14:20

14:25

14:30

14:35

14:40

14:45

14:50

14:55

15:00




  

-
if the user check "noLunch" he no need to give any details for "lunchFrom"
and "lunchTo", if not she should give 
let me know how to meet that need 
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/requiredif-help--tf2414782.html#a6734975
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



select box validation in validation framework help?

2006-10-10 Thread Mallik

hi friends
i have to validate that the user should selected any option except
default('select', this is a text to indicate the user to select options in
this select box) option.
how can i do it help me..
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/select-box-validation-in-validation-framework-help--tf2415520.html#a6733244
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: requiredif help?

2006-10-10 Thread Mallik

Thank you friend
no i got some idea, i hope it will work
ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/requiredif-help--tf2414782.html#a6731806
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



requiredif help?

2006-10-09 Thread Mallik

HI friends 
In my form, i have to validate two fields,if another check box is not
selected, 

means if the user checked no lunch break,lunch from and lunch to are not
required,else both are monadatory. 

i hope requiredif suits for this, if so, give me some sample code or any
artical for this 

or is there any better solution for this,help for that 

ur's
Mallik


-- 
View this message in context: 
http://www.nabble.com/requiredif-help--tf2414782.html#a6731043
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem

2006-10-06 Thread Mallik

Hi friends
i have a form where i
use
if i use first three it is ok,but when i use  it is stopping
display from there after
why this problem?
let me know
thanks in advance
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/%3Chtml%3Acheckbox%3E-problem-tf2394658.html#a6676742
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: extending from DynaValidator problem?

2006-09-25 Thread Mallik

hi Friends

Yes it is there in \WEB-INF\lib
let me know the problem ...

ur's
Mallik


Venkata Phani Kumar wrote:
> 
> check commons-beanutils.jar is present or not
> 
> - Original Message - 
> From: "Mallik" <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, September 25, 2006 4:08 PM
> Subject: extending from DynaValidator problem?
> 
> 
>>
>> HI friends
>> i want to do some validations, that why i want to extends from
>> DynaValidatorForm in my app
>>  this is the error i am getting when compile:
>> -
>> CollegeForm.java:12: cannot access org.apache.commons.beanutils.DynaBean
>> file org\apache\commons\beanutils\DynaBean.class not found
>>
>> help me please
>>
>> ur's
>> Mallik
>> -- 
>> View this message in context:
> http://www.nabble.com/extending-from-DynaValidator-problem--tf2330744.html#a6483946
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/extending-from-DynaValidator-problem--tf2330744.html#a6484204
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



extending from DynaValidator problem?

2006-09-25 Thread Mallik

HI friends 
i want to do some validations, that why i want to extends from
DynaValidatorForm in my app
 this is the error i am getting when compile:
-
CollegeForm.java:12: cannot access org.apache.commons.beanutils.DynaBean
file org\apache\commons\beanutils\DynaBean.class not found

help me please

ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/extending-from-DynaValidator-problem--tf2330744.html#a6483946
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Indexed Properties in validation Framework help?

2006-09-25 Thread Mallik

HI friends,
i have form which need indexed properties technique...(by net surfing i
came to know)
i need a full length tutorial on this topic ,or some code snipats
help me please 
ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/Indexed-Properties-in-validation-Framework-help--tf2329886.html#a6481541
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how can i use two properties files?

2006-09-19 Thread Mallik

Hi Friends 
my application in big and it moduled into 4
i wnat to use one properties file for each module
let me know how to configure in struts-config.xml
and how can i specify which file to use
 thanks inadvance
ur's
Mallik


-- 
View this message in context: 
http://www.nabble.com/how-can-i-use-two-properties-files--tf2298661.html#a6386912
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validation framework problem?

2006-09-15 Thread Mallik

Hi friends 
i have stuckup in validation framework because my form will get fields
dynamically on user request
and i cannot predect how my fields it will have when posting the form
i am creating Dynamic form fields using javascript like

txt = document.createElement('input');
txt.type='text';
txt.name = 'element1';
and adding to form td element
so now
how can i set for form bean property in struts-config.xml and in
validation.xml

please let me know the solution...
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/Validation-framework-problem--tf2276854.html#a6323111
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validation framework for Dynamically added HTML elements?

2006-09-14 Thread Mallik

Hi friend,
i want how to create array of elements 
please help me
urs
Mallik


Patil, Sheetal wrote:
> 
> U can create array and create field as per reqiuirment,but this has
> limit and here problem is for "arrayindexoutofboundexception" after
> limit exceeds.
> Elsewise u can use ajax, put ur form in session and send requeset to an
> action which will increase the size of array and again put into the
> session. Then u can dynamically create as many fields u want...
> 
> -Original Message-
> From: Mallik [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 14, 2006 11:40 AM
> To: user@struts.apache.org
> Subject: Validation framework for Dynamically added HTML elements?
> 
> 
> Hi Friends
> i have one form where user enter his family details for this i create on
> row of fields (like name,relationtype,occupation) if user want to add
> one more relation, he click on addmore button then i provied one more
> row and user need more, click on addmore and i create another row this
> way my form will get fields dynamically using javascript
> createElement() method,
> now i want to add validation framework for this form how to manage in
> struts-config.xml ( for each form field we specify  name="" type=""/> or is there any alternative solution for this problem
> in struts framework please let me know urs Mallik
> 
> --
> View this message in context:
> http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-el
> ements--tf2269760.html#a634
> Sent from the Struts - User forum at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-elements--tf2269760.html#a6303477
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validation framework for Dynamically added HTML elements?

2006-09-13 Thread Mallik

Hi Friends 
i have one form where user enter his family details 
for this i create on row of fields (like name,relationtype,occupation) if
user want to add one more relation, he click on addmore button then i
provied one more row and user need more, click on addmore and i create
another row
this way my form will get fields dynamically using javascript
createElement() method,
now i want to add validation framework for this form
how to manage in struts-config.xml ( for each form field we specify

or is there any alternative solution for this problem in struts framework
please let me know
urs
Mallik

-- 
View this message in context: 
http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-elements--tf2269760.html#a634
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Globalizing some general validations in validation frame work?

2006-09-12 Thread Mallik

HI friends
i would like to say thanks to every one on this forum for your support

the problem is..
i have some forms, each from has some common fields like id, name, etc
i would like to specify the validations only once in validator.xml for all
forms ( globalizing them for all forms)
if possible, how would i do? please let me know
and i need a tutorial or book which deals with most of the validator
framework...
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/Globalizing-some-general-validations-in-validation-frame-work--tf2258065.html#a6263447
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Adding another form fields to validator.xml problem

2006-09-11 Thread Mallik

HI friends 
i am using validator framework  for client side validations in my web
application 
i added login page validations in validator.xml file , it working fine

the problem starts when i added another collegeForm fields,
if i added atleast one field like id 
the server saying that no service for the path you requesting.
why this is?
this is my validator.xml file...
--


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>


 




mask
^[0-9a-zA-Z_]*$



minlength
4



maxlength
10






mask
^[0-9a-zA-Z_]*$



minlength
4



maxlength
10














code in struts-config.xml is 


















this is my form field
--

like i added for all that form fields

please let me know the reason why? or where i went worng
ur's
Mallik
-- 
View this message in context: 
http://www.nabble.com/Adding-another-form-fields-to-validator.xml-problem-tf2256969.html#a6260393
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DynaValidatorForm

2006-09-11 Thread Mallik

Hi friends 
i am using DynaActionForm and client side validations using Validator
fromework
i can specify java.lang.String for type of form field in struts-config.xml
like





but how to specify for numbers and time( time should be 24 hours format)

please give me any idea or send any link on this topic

urs
Mallik

-- 
View this message in context: 
http://www.nabble.com/DynaValidatorForm-tf2251930.html#a6245318
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validation framework problem?

2006-09-05 Thread Mallik

Hi friends
--
this is my Action Login.java
package com.pack1;

import org.apache.struts.action.*;
import javax.servlet.http.*;

public class Login extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
return mapping.findForward("find");
}
}

-
this is my total struts-config.xml

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>






























   





















---
i hope this will help u in better 
waiting for solutions and thanks inadvance
Mallik


Mallik wrote:
> 
> HI Friends
> i am using validation framework with struts at fontend
> but the validation is not working properly
> first-time validation is taking place at server side ( displaying errors
> on window)
> second-time onwards it is taking place at client side (getting alert)
> why these all?
> this is my code:
> --
> struts-config.xml
> 
>  type="org.apache.struts.validator.DynaValidatorForm">
>   
>   
> 
> ...
> .
> 
>  value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> 
> 
> --
> validator.xml
> 
> 
> 
> 
> 
> 
> minlength
> 4
> 
> 
> 
> maxlength
> 10
> 
> 
> 
> 
> 
> 
> minlength
> 4
> 
> 
> 
> maxlength
> 10
> 
> 
> 
> 
> resources.properties file
> 
> #validator errors
> errors.required = {0} is required.
> errors.minlength = {0} cann't be less than {1} characters.
> errors.maxlength = {0} cann't be more than {2} characters.
> errors.invalid = {0} is invalid.
> 
> # -- Label messages --
> label.userId = User ID
> label.password = Password
> 
> login.jsp file
> 
>  staticJavascript="false" />
> 
> and i didn't change anything in validation-rules.xml
> 
> 
> please let me know where i went worng
> 
> Mallik
> 
> 

-- 
View this message in context: 
http://www.nabble.com/validation-framework-problem--tf2220180.html#a6150067
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



validation framework problem?

2006-09-05 Thread Mallik

HI Friends
i am using validation framework with struts at fontend
but the validation is not working properly
first-time validation is taking place at server side ( displaying errors on
window)
second-time onwards it is taking place at client side (getting alert)
why these all?
this is my code:
--
struts-config.xml





...
.




--
validator.xml






minlength
4



maxlength
10






minlength
4



maxlength
10




resources.properties file

#validator errors
errors.required = {0} is required.
errors.minlength = {0} cann't be less than {1} characters.
errors.maxlength = {0} cann't be more than {2} characters.
errors.invalid = {0} is invalid.

# -- Label messages --
label.userId = User ID
label.password = Password

login.jsp file



and i didn't change anything in validation-rules.xml


please let me know where i went worng

Mallik

-- 
View this message in context: 
http://www.nabble.com/validation-framework-problem--tf2220180.html#a6149898
Sent from the Struts - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dynamic/on the fly Form fields

2005-04-20 Thread Mallik
Hi,
I have a situation where I need to create a form fields based on the user
selection in the previous form.
For example, in the first form user selects the Departments from multi
selection box and when this form is submitted, I have to show some x number of
form fields for every department selected in the previous page. 
generally we have to specify the form fields in the configuration.xml file in
advance. 
Is there any way I can create on the fly dynamic form fields?? if so how?

Thanks,
Mallik


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: accessing session variables in java Bean(In business logic Layer)

2005-04-13 Thread Mallik
I can use  getSesssion and setSession in the action class but I need to access
session variable in my java bean where I perform my business logic, not in
action class methods. (java beans are called from action class). I hope I am
clear this time.

Thanks,
Mallik


--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> struts-config identifies a forward to an identifier
> The identifier is associated with the implementted action Class
> The action class contain execute methods which reference 
> HTTPServletRequest/HTTPServletResponse parameters
> which can getSesssion and setSession for whatever parameter you desire
> Is there something specific you want?
> Martin-
> - Original Message - 
> From: "Mallik" <[EMAIL PROTECTED]>
> To: 
> Sent: Wednesday, April 13, 2005 8:08 PM
> Subject: accessing session variables in java Bean(In business logic Layer)
> 
> 
> > Hi
> > I use plain java beans for model/business layer.
> > I have a question regarding accessing session variables in java Beans(In 
> > model
> > Layer). I can pass session variables from action class but is there any 
> > other
> > way I can access session variables directly by extending any class.
> > Because I need "session.userID" every time I make an insert/update in the
> > database and I feel it is redundant passing session variables every time 
> > along
> > with the form data(DTO) to java bean.
> >
> > My example java bean code is as follows
> >
> > public class DoInsertBean
> > {
> > private DataSource dataSource = null;
> > public DoInsertBean(DataSource dataSource)
> > {
> > this.dataSource = dataSource;
> > }
> >
> >public int insert(UserDTO user){
> >//Insertion into database
> >//need session variables here??
> >   }
> > }
> >
> > Thanks,
> > Mallik
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources site!
> > http://smallbusiness.yahoo.com/resources/
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



accessing session variables in java Bean(In business logic Layer)

2005-04-13 Thread Mallik
Hi
I use plain java beans for model/business layer.
I have a question regarding accessing session variables in java Beans(In model
Layer). I can pass session variables from action class but is there any other
way I can access session variables directly by extending any class. 
Because I need "session.userID" every time I make an insert/update in the
database and I feel it is redundant passing session variables every time along
with the form data(DTO) to java bean.

My example java bean code is as follows

public class DoInsertBean
{   
private DataSource dataSource = null;   
public DoInsertBean(DataSource dataSource)
{
this.dataSource = dataSource;
} 

public int insert(UserDTO user){
//Insertion into database
//need session variables here??
   }
}

Thanks,
Mallik



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]