hidden property null

2003-12-26 Thread ajay brar
hi!

i have a value in request scope that i would like to pass on to an action, 
called when you submit a form on the page,
i accessed the value on the page as
%
String tableName = request.getParameter(tableName);
%
and correctly retrieved the value.
in my form then i initialized a hidden property to this value, as
html:form action=/editTable
html:hidden property=tableName value=%=tableName%/

now when the form is submitted, in my action class when i retrieve the 
tableName property from the associated bean, i get the null value.
i put a print statement in the setTableName method for form bean, and it 
seems that just before the form is submitted, tableName is set to null.

can someone tell me why this is happening, and how do i workaround it.

thanks
Ajay
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


map backed forms: performing validation

2003-12-22 Thread ajay brar
hi!

i need to allow a user to enter data into a database through a form. However 
i dont know beforehand what the table structure will be. Looking around, the 
solution seems to be to use map backed forms.

What i would like to know is how do you perform error checking, bounds 
checking etc in such a case.
if you are going something like,
%
Map m = (Map)request.getAttribute(FORM_MAP);
 Set s = m.keySet();
 Iterator iterator = s.iterator();
%

   % while (iterator.hasNext()){
 String key= (String)iterator.next();
 String fieldValue=field(+key+);
   %
   TR
 TD%=key%/TD
 TDhtml:text property=%=fieldValue%
   /html:text/TD
you dont know what the field is, and what are valid values for the field. if 
the field happens to be for a phone number, how would you test whether the 
field contained only numbers. Also how would you set a 'maxlength' on the 
html:text tag?
As a more general question, in an application where you dont know what the 
database structure will be (dynamic fields) how and where would you check 
and validate form submissions?

So far the only way i have come up with is, to execute a Describe table 
query, get the field attributes and then have a whole bunch of if statements 
that check if the field is of type varchar, int, float etc and once i have 
that, check the submitted form values and see if they have the same type. A 
rather clumsy way.

if someone has any clues or has solved this before, please do reply.

thanks
Ajay
_
E-mail just got a whole lot better. New ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


error:null property value please HELP

2003-12-21 Thread ajay brar
hi!

i am getting an error when i submit a form.
briefly i have a tree stucture that gets displayed, along with checkboxes to 
select a particular node. the tree structure is of the type:

class TreeStructure{ private ArrayList children;}  //the ArrayList children 
contains objects of type
  
//TreeStructure
the structure includes a property 'selected' of type boolean.

My ActionForm includes the tree as a property called 'functions'. i display 
them as

html:form action=/saveUserConfig
 nested:nest property=functions
jsp:include page=treenode.jsp/
 /nested:nest
 html:submit value=Submit/
/html:form
//treenode.jsp is
nested:root
nested:checkbox property=selected value=true/
nested:write property=nodeName/br
   nested:iterate property=children
  jsp:include page=treenode.jsp /
   /nested:iterate
/nested:root
the error i get is
exception
javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause

java.lang.IllegalArgumentException: Null property value for 'functions'

org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755)
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:796)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
please help
thanks
Ajay
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


Re: error:null property value please HELP

2003-12-21 Thread ajay brar
hi!

'functions' is the name of the tree structure in the form class, as

class SomeForm extends ActionForm
{ private TreeStructure functions;}
this form class also includes some String attributes. The whole display 
works fine, i have some text boxes for the String fields in the form, the 
tree structure gets displayed with the corresponding checkboxes. the problem 
arises when i select a particular checkbox and submit. thats when i get the 
error i mentioned earlier.
however if i just fill the text boxes and do not select and checkbox the 
form submits fine.

any clues?

thanks
Ajay

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: error:null property value please HELP
Date: Mon, 22 Dec 2003 13:28:17 +1100
Hi Ajay

I am doing something similar... I have a Tree class and a Node class to
represent either branches or leaves of the tree.
The Tree class has a field called treeRoot that represents the root Node.
I ha ve an action that creates the tree and puts it on the request
then in the JSP I have something like:
%-- Loop through the array list of trees to display each root 
node.
   Note that 'myTree' was placed on the request by an Action --%
logic:present name=myTree
nested:root name=currentTree
nested:nest property=treeRoot
div class=root
jsp:include page=treenode.jsp 
/
/div
/nested:nest
/nested:root
/logic:present

Actually my jsp is slightly different because I can have multiple root
nodes and I also iterate through each root node to display each tree. I
have chopped those bits out to make the code more readable.
So it seems that you are trying to reference a field functions that
isn't declared in your tree class.
Hope that helps.

Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.





ajay brar [EMAIL PROTECTED]
22/12/2003 12:55 PM
Please respond to Struts Users Mailing List
To: [EMAIL PROTECTED]
cc:
Subject:error:null property value please HELP
hi!

i am getting an error when i submit a form.
briefly i have a tree stucture that gets displayed, along with checkboxes
to
select a particular node. the tree structure is of the type:
class TreeStructure{ private ArrayList children;}  //the ArrayList
children
contains objects of type
//TreeStructure
the structure includes a property 'selected' of type boolean.
My ActionForm includes the tree as a property called 'functions'. i
display
them as
html:form action=/saveUserConfig
  nested:nest property=functions
 jsp:include page=treenode.jsp/
  /nested:nest
  html:submit value=Submit/
/html:form
//treenode.jsp is
nested:root
 nested:checkbox property=selected value=true/
 nested:write property=nodeName/br
nested:iterate property=children
   jsp:include page=treenode.jsp /
/nested:iterate
/nested:root
the error i get is
exception
javax.servlet.ServletException: BeanUtils.populate
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause

java.lang.IllegalArgumentException: Null property value for 'functions'

org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755)

org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
 org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:796)
 org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729)
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java

Re: OT: Examples of HTML-based user interfaces?

2003-12-19 Thread ajay brar
hi!
A pity a student like me doesn't qualify for a beta version of Flex.
I believe DHTML currently provides a really good way of managing those fancy 
HTML interfaces.

cheers
Ajay

From: Brice Ruth [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: OT:  Examples of HTML-based user interfaces?
Date: Thu, 18 Dec 2003 21:22:38 -0600
You might be interested in a previous post that talked about Macromedia's 
new Flash+Struts integration ... that would give you all the GUI goodness 
you could imagine, without getting into writing what would almost 
necessarily have to be some ugly DHTML.

http://www.macromedia.com/devnet/flex/articles/struts.html

Wendy Smoak wrote:

Does anyone have examples of some fancy things to do with HTML-based
user interfaces?  For example, I've currently got a request to show two
boxes of items with add/remove arrows.  So selecting in the left-hand
box and clicking the arrow will move the item to the right hand box.
I'm sure it's possible with CSS, JavaScript and hidden form fields.
(I'm pretty sure they got the idea from adding recipients to an email in
Outlook.)
I also have a long-standing requirement to dynamically grow a field,
when the user types something in a text box and clicks a button, that
item moves up and a new, blank field appears.  I'm currently doing
this with an add button, which submits the form to the Struts app, the
entry gets added to a session scope bean, then back to the form with
read-only displays of the stuff in the bean and [the same] blank field.
(Although it looks like a new line, it isn't, it's the same form
field.)
Googling turns up a bunch of essays on what makes a good user interface,
but not too much on tips and tricks.


--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your inbox from harmful viruses with new ninemsn Premium. Click here 
 http://ninemsn.com.au/premium/landing.asp

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


RE: URGENT - Help defending Struts [slightly off-topic]

2003-12-18 Thread ajay brar
hi!

i was going to take this opportunity to point out how CIO's are generally 
big duds, esp the CIO in Accenture, who is an even greater dud going by what 
little contact i have had with Accenture staff.

why? well there was this project i did as part of uni which used Struts and 
the accenture person chose another project that just mentioned the 
likelihood of using MS Biztalk and that was enough for a 1st prize. Seems 
Apache is not as well thought of as MS. Or so was my experience.

so i'm surprised to learn that Accenture uses Struts all the time.

but with CIO's from my experience, most of them belong to another era and 
just have difficulty coming to terms with how stuff is done today, and 
having no clue of that, they just content themselves with raising as many 
hurdles as possible. Moreover they have deep reservations for any software 
which is open source and/or free.

well thats my $0.02




From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: URGENT - Help defending Struts
Date: Thu, 18 Dec 2003 10:28:05 -0600
Sorry about that - Joe caught a Freudian slip in my mail.  It is the
client CIO (I tend to slip that way and think of him as mine).
Accenture uses Struts all of the time (we use it in our base offering -
that is why we want to use it here).
Sorry for the confusion.

Thanks again to everyone,
Russell
[EMAIL PROTECTED]
310-426-5587
-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 10:13 AM
To: Struts Users Mailing List
Subject: Re: URGENT - Help defending Struts
Importance: High
Our CIO is currently fighting the use of Struts by saying that it is
not
widely used in B2C sites.  Does anyone know of any sites, preferably
commerce sites that are using Struts?  This would be extremely helpful.
The CIO of a company as big as Accenture is going to decide whether
Struts should be used or not based on whether or not anyone else is
doing it?
That's pretty weak.  You'd think he'd at least have some trusted
technology advisers that could help him decide based on the merits
instead of just watching the crowds.  Isn't innovation a big buzzword
for consulting companies like that?
My last project, a collaborative commerce project with a major lawn
and garden equipment manufacturer, is built entirely upon Struts, and
is already available for dealer registration; the public should be
able to use the client's site to purchase tractors and accessories
from local dealers in Q1 2004.  My company has also developed a
number of applications in the home appliances industry for direct to
consumer and manufacturer-collaborative appliance sales which were
either built from the ground up with Struts, or are gradually being
ported to Struts.
We also use Struts to run the primary consumer facing sites for
companies in home furniture, office furniture, and personal
healthcare products which don't currently have commerce components.
But hey, if he wants you to write your own web application frameworks
from the ground up, and internally perform all the testing that a
large user community has already done on the Struts codebase and
train all your new employees on the internal way to do it instead of
hiring people who might come in already experienced in a
framework  well, that's one way to do it.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
  We want beef in dessert if we can get it there.
   -- Betty Hogan, Director of New Product Development, National
Cattlemen's Beef Association
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information.  If you have 
received it in error, please notify the sender immediately and delete the 
original.  Any other use of the email by you is prohibited.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


Re: Login Security

2003-12-16 Thread ajay brar
hi!

you could have an exponential backoff period, where rather than blocking a 
person (there's a genuine chance you forgot the password and are trying five 
combinations or so) you disable the account for a period of time which is 
proportional to the number of tries the user has made.
An exponential relationship between the number of tries and the time 
disabled would be best.
so if someone is trying a dictionary attack then with the number of tries 
increasing the account will be suspended for longer periods.
In terms of implementing it, yes i suppose you will need an extra field to 
record the time when the account will next be active.
security is ofcourse relative. you may go for salts when storing passwords, 
but that depends on you application and its threat model.
but i agree, to prevent someone from maliciously blocking another person's 
account, you should have a mechanism of maybe storing ip addresses, (though 
a malicious user could spoof these).

regards
Ajay
From: Janusz Dziadon [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Login Security
Date: Tue, 16 Dec 2003 23:43:41 +0100
1. I was thinking on corporate solution, where any station has its own ip
(maybe from dhcp)
2. I suggested only to store IP, not to compare on next-login or permanent
block this IP. It is for future investigation only.
3. This organization may have been yet blocked because when has common
acount its was disabled any way.
Maybe this all solution is not needed or is not good think over. That was
only my little remark.
JD

- Original Message -
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 11:24 PM
Subject: Re: Login Security
 Several organizations expose the same IP address for most or all users.
You'd be
 blocking entire organizations because of one bad login.

 --- Janusz_DziadoƱ [EMAIL PROTECTED] wrote:
  I think, that you should register blocked IP anyway in database. It
helps to
  explain situations like below.
 
  Try to imagine situation like this:
  one user (A) really doesn't like another user (B) or system
administrator
  (C). Than (A) tries to log in into his (B or C) account with bad
password.
  His (B or C) account is disabled. Than A person can accuse person B or 
C
  that they are not work.
 
  Maybe it seems silly, but I have such not good experience.
  Machine IP from wich was maked last try to log-in may helped to 
explain
all
  circumstances.
 
  JD
 
  - Original Message -
  From: Hookom, Jacob [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Tuesday, December 16, 2003 10:46 PM
  Subject: RE: Login Security
 
 
   Do a HashMap in the action:
  
   Key is username
   Value is Integer or Date
  
   If ((value = map.get(key)) != null)
   {
   if (value instanceof Date)
   {
   // compare timeout dates
   }
   else if (value instanceof Integer)
   {
   if (value == 3)
   {
   map.put(key, new Date(deadline));
   }
   else
   {
   map.put(key, new Integer(value + 1));
   }
   }
   }
  
  
  
   -Original Message-
   From: Ciaran Hanley [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, December 16, 2003 3:43 PM
   To: 'Struts Users Mailing List'
   Subject: RE: Login Security
  
  
   I am storing the username and password in a table in a mySql 
database.
  
   I think I will just add a field last_failure to the user table...
and
   after 3 unsuccessful attempts I will record the time in the
   last_failure field and work out if the timeout has elapsed by
querying
   that field and comparing it to the current time.
  
   That way, I wont be using cookies, and will avoid blocking IP 
address.
   Does that sound ok?
  
   Ciaran
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: 16 December 2003 20:46
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: RE: Login Security
  
   Avoid the cookie solution, it's too easy for the user to bypass your
   security measures and as mentioned below, this solution won't work 
if
   the browser has disabled cookies.
  
   Don't block IP addresses because they can be easily spoofed and
   redirected. Dynamic IPs pose a problem as you could be blocking out 
a
   legitimate user.
  
   How are you storing your list of usernames/passwords? Would it be
   possible to add an extra bit of data next to each username/password
   indicating when the login is valid?
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, December 16, 2003 9:09 AM
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: RE: Login Security
  
  
   You could put a cookie on the user's machine that expires after a
   certain
   period of time.  Of course this only works when cookies are turned 
one
   and
   an experienced user could always manually remove their cookie.
  
   Another solution 

form beans

2003-12-13 Thread ajay brar
hi!

i have a page that shows user operations. Each user operation is represented 
as a userbean that includes info about the user and a Tree structure for 
functions that the user can make.
the structure is eg:
manage database
 agency table
add
edit
delete
this structure is managed through a TreeNode class.
the action preceeding the page loads a list of user beans into session and 
in the page itself i iterate through the list.
against each entry i have an edit and delete option.

what i would like to know and do is that if someone clicks the edit button 
against a particular user,
the values for that user are shows as editable form fields at the bottom of 
the same page.(the tree strutcure is displayed through checkboxes)
how do i relate a an empty form at the bottom of the page to be filled with 
information depending upon the button clicked.
i currently have an empty form to add a new user at the bottom.

thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


display tree structure

2003-12-13 Thread ajay brar
hi!

i am using the following code to display a tree structure

nested:root name=newUser
nested:nest property=functions 
jsp:include page=treenode.jsp /
/nested:nest
/nested:root

treenode.jsp goes as
nested:root
nested:write property=nodeName/
nested:iterate property=children
jsp:include page=treenode.jsp/
/nested:iterate
/nested:root
newUser has the a property functions that references a Tree strcture
the Tree structure itself has properties nodeName and children, nodeName is 
just a String, children
is a arraylist of other Tree structures

however when i run the above code i dont get anything printed at all.

can someone please point out the error?

thanks
Ajay
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


nested root

2003-12-13 Thread ajay brar
hi!

i'm doing nested statements for the first time so please tell me where i am 
wrong.

can i write
bean:write name=newUser property=name/
as
nested:root name=newUser
nested:write property=name/
/nested:root
would they give the same output? i'd think yes but my results dont seem to 
agree.

thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: .do's come back as 404 file not found

2003-12-06 Thread ajay brar
hi!

i had the same problem with my tomcat, and this happened only on my online 
account and not on my home pc. The app worked fine earlier and then suddenly 
stopped working for all the .do actions.
And then again sometimes it would work fine.
However i could never find the problem.

so post up if you do find the problem.

Ajay


From: Dhaliwal, Pritpal (HQP) [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: .do's come back as 404 file not found
Date: Fri, 5 Dec 2003 14:15:24 -0800
Hello Joe,

Its maps to *.do

Remember that same conf worked like a charm two days ago :)

Same conf is also working in another setting.

TIA,
Paul
-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 11:46 AM
To: 'Struts Users Mailing List'
Subject: RE: .do's come back as 404 file not found
What's the url pattern for your action servlet defined in web.xml?

 -Original Message-
 From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 1:48 PM
 To: Struts Users Mailing List
 Subject: .do's come back as 404 file not found


 Hello Everyone,

 I am using: Struts and Resin 2.1.11

 All of sudden my index.do, or any other .do is not being
 recognized by resin anymore.

 It was working fine two days ago, all of sudden I am getting 404s


 In the logs I see that its picking up the correct
 struts-config.xml and it is that ActionServlet runs its init
 function..

 So has anyone seen it before, is it generally app server
 problem or I could have messed something up in struts also?

 TIA,
 Paul Dhaliwal



-
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]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


access dynamic records

2003-12-05 Thread ajay brar
hi!

I have a situation where a user is allowed to create tables in a database 
and then specify what fields there will be.
He should then be able to access the database from the web interface and 
add/edit/delete entries.
so far i have been using ActionForms to represent a single record and knew 
in advance what the record structure would  be.
How would i deal with the above case where the record structure(ie the 
fields) are not known in advance?

Thanks

Ajay

_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


ui generation

2003-11-26 Thread ajay brar
hi!

What i am trying to do is allow a user to create a personalized web 
interface.
he should as such be able to select layouts, choose what goes where, colours 
etc and in the end it should generate a html page for him.

my questions are:
1 is it possible for me to generate a jsp page using struts tags, feed that 
to a parser and get the resulting html, like what would happen if i made a 
regular jsp/struts page and then a user clicks on it, and the page is 
processed and html spewed to the user's browser. How do i make that happen 
from within a page. ie, in one page a user selects all these layouts etc and 
clicks some generate button and a file with the resulting html gets stored 
somewhere on the server which the user can then download.

2 can i dynamically write a tile definitions.xml, depending on the layout 
and the components chosen and have that fed to the parser from q1.

thanks for any help

cheers
Ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


Re: ui generation

2003-11-26 Thread ajay brar
hi!
thanks for the reply James.
i should probably clarify myself. This thing i am building is like a webpage 
builder, you choose everything and the person should then get a resulting 
html file, which he should be able to download.

so how do you convert the jsp (resulting from the choices he made) to html? 
Say when i make a request for a jsp page, the server processes the request 
and what gets outputted to my browser is html. How can i force that to 
happen and pipe the output to a file?

with regards to tiles, it sounds like a good way of doing things and i am 
still looking for something like this that has been done before. Haven't 
come across any open source product so far, and i am not interested in the 
proprietary ones.

Ajay


From: James Neville [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: ui generation
Date: Wed, 26 Nov 2003 11:52:54 +
Ajay,

he should as such be able to select layouts, choose what goes where, 
colours etc and in the end it should generate a html page for him.
We're doing something pretty similar here, but not using the Tiles stuff 
(for now anyway).
Basically, we have user selectable themes, which write the appropriate css 
file to the page.
There are *some* user definable colours, fonts etc, the values of which are 
pulled from the DB on login, stored in the session, and written to the page 
as styles that override the default, or user selected css theme file.

my questions are:
1 is it possible for me to generate a jsp page using struts tags, feed 
that to a parser and get the resulting html, like what would happen if i 
made a regular jsp/struts page and then a user clicks on it, and the page 
is processed and html spewed to the user's browser. How do i make that 
happen from within a page. ie, in one page a user selects all these 
layouts etc and clicks some generate button and a file with the resulting 
html gets stored somewhere on the server which the user can then download.
I'd assume that you would want a variety of layouts such as top/left/right 
navigation, one/two/three column body etc.

We do something similar where a user has selectable templates for layout as 
well as the themes.
We simply have jsps for each template, and dependant on the user requesting 
the page the Action redirects to the appropriate template.
At the moment, most of the relevant content is split into smaller jsp 
fragments, and incuded on the template pages, so that we don't need to 
rewrite the view in multiple places.
We also intend to have customisable content (a-la Yahoo portal), where the 
template simply checks which content is required for the user,  and 
includes the relevant page fragments where necessary.

2 can i dynamically write a tile definitions.xml, depending on the layout 
and the components chosen and have that fed to the parser from q1.
... i'm also keen to know whether we can do something like this with 
Tiles, but I have no experience of using them just yet.
Has anyone else has success doing custom UI generation with Tiles, possibly 
pulling the layout definition from a DB?

There surely must be something that does this out of the box already, no?

Cheers,
James
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


jdbc realms: cannot log into tomcat manager

2003-10-30 Thread ajay brar
hello

i just got a problem implementing JDBC realms
i have setup a mysql database with tables:
roles, users, user_roles with all feilds specified
i have populated the database with user role mappings
but now i cant log into tomcat manager:
from looking around i found out that i had to add the role manager
to be able to login, but this doesnt seem to help things
any suggestions will be greatly appreciated
thanks
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


logic iterate + radio

2003-10-30 Thread ajay brar
hi!
i have a code segment that displays a form. part of the form consists of a 
selection from a bunch of plans that can be selected through a radio button 
tag
here's how it goes
html:form action=/saveServiceAccount
..

logic:iterate name=serviceTypes id=serviceType
tr
tdhtml:radio idName=serviceType value=code property=serviceTypeId/
/td
/tr
/logic:iterate

what that is supposed to do is 'serviceTypes' contains a list of service 
plans. the plans are of type ServiceType an empty bean of which is stored in 
the session under serviceType
the form bean is ServiceAccountForm and has a field called serviceTypeId.
the user is basically supposed to select a plan through the radio button and 
the code for the plan should become the serviceTypeId.

i am however getting an error when i run this saying it cant find a getter 
for 'code'
however i have getCode in ServiceType

please help
thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


collection iterate

2003-10-30 Thread ajay brar
hi!
i have a collection that i would like to iterate over and print the contents 
out
i am currently doing this as
logic:iterate name=ResVector id=transactionBean

here ResVector is a collection that has been placed in session.
it is a collection of transaction beans.
i want to iterate over the collection, and print the details of the 
transaction bean stored in the collection.

pleas help
thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: collection iterate

2003-10-30 Thread ajay brar
hi!
my problem is that the above doesn't print anything.
there is data in the vector, it however prints out nothing
any suggestions
thanks
ajay

From: Appel, Jeremy D [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: collection iterate
Date: Thu, 30 Oct 2003 10:23:17 -0600
Ajay,

use the struts-bean taglibrary and bean:write tag.  Something like this:
logic:iterate name=ResVector id=transactionBean
logic:present name=transactionBean
bean:write name=transactionBean property=property1 /
  ..
  bean:write name=transactionBean property=propertyN /
   /logic:present
/logic:iterate
HTH
jeremy
-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 11:19 AM
To: [EMAIL PROTECTED]
Subject: collection iterate
hi!
i have a collection that i would like to iterate over and print the 
contents
out
i am currently doing this as
logic:iterate name=ResVector id=transactionBean

here ResVector is a collection that has been placed in session.
it is a collection of transaction beans.
i want to iterate over the collection, and print the details of the
transaction bean stored in the collection.

pleas help
thanks
ajay
_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp
-
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]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


iterate over a collection

2003-10-29 Thread ajay brar
hi!
can someone tell me whats wrong with this?
I am placing a vector of TransactionBean in session as
session.setAttribute(resVector, resVector);
i then place an empty TransactionBean in session scope as well
TransactionBean tb = new TransactionBean();
session.setAttribute(transactionBean, tb);
in my jsp i have a logic:iterate tag that goes
logic:iterate collection=resVector id=tb
//print bean values
/logic:iterate
this gives me an error saying, it cant iterate over this type of collection.
could someone help and tell me what i am doing wrong

thanks
Ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: iterate over a collection

2003-10-29 Thread ajay brar
hi!
should it matter, they both implement the Collection interface and thats 
what is really required here.

cheers
ajay

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: iterate over a collection
Date: Wed, 29 Oct 2003 13:26:32 -
Instead of Vector try using the ArrayList.

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 29 October 2003 13:25
To: [EMAIL PROTECTED]
Subject: iterate over a collection
hi!
can someone tell me whats wrong with this?
I am placing a vector of TransactionBean in session as
session.setAttribute(resVector, resVector);
i then place an empty TransactionBean in session scope as well
TransactionBean tb = new TransactionBean();
session.setAttribute(transactionBean, tb);
in my jsp i have a logic:iterate tag that goes
logic:iterate collection=resVector id=tb
//print bean values
/logic:iterate
this gives me an error saying, it cant iterate over this type of 
collection.

could someone help and tell me what i am doing wrong

thanks
Ajay
_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


redirecting

2003-10-28 Thread ajay brar
hi!
i have to redirect the user from within my action class to an external site.
i'm currently doing sendRedirect()
is this better, worse or the same as doing setHeader(Location, some 
url)

thanks
cheers
Ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


redirection - please help

2003-10-25 Thread ajay brar
hi!
is it possible for me to redirect users to an external site from inside an 
action class.
ie, say a user clicks /foo, this calls FooAction which does some intial 
processing. I now want to redirect the user to some other site. how can i do 
that?
do i write the link out into the response stream?

thanks
cheers
Ajay
_
E-mail just got a whole lot better. New ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


design question

2003-10-22 Thread ajay brar
hi!
i have the following scenario.
server0 - has a jsp page, that allows user to enter the goods they want 
etc, say foo.jsp
server1-jsp payment page, say bar.jsp and action class CommAction
on clicking done on foo.jsp, this should establish a connection with 
CommAction class on server1, perform some identity exchange, based on the 
exchange,  route to bar.jsp

i came up with
[server0] foo.jsp -FooForm -FooAction
[server1] bar.jsp -BarForm -BarAction
i have java classes to establish a secure communication between two parties.
what i want to do now is, have some way of FooAction (on successful return 
from the underlying comm establishing class) to direct the person to 
BarAction along with the information they submitted orginally.

in other words how can i conditionally submit a form to another action class 
on some other server.
I ofcourse want the form to be submitted to the local action class, that 
first checks it, then resubmits to a remote action class, the remote action 
class then forwards the user to a page on its own remote server.

sorry if the above sounds too cryptic.
any help would be greatly welcome
thanks
cheers
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


Re: design question

2003-10-22 Thread ajay brar
hi all!
would anyone in the spirit of diwali like to help me on this one.
how do i direct a form submission to a remote action class, after having 
fthe form submitted to a local action class first.
ie, communicate between two action classes, one of which is on a remote 
machine. I am looking at sending  a URL object with the form data from the 
local to the remote class, but then depending upon the remote class's 
response i want to forward the user to a page on the remote machine.
Its like a payment system, you select your good at an e-comm website, then 
click pay. This then transfers you to a payment page located on a payment 
gateway site.
Before the transfer i will have a security session establishment. This is 
being handled by two Java classes, one on each end. so when the user clicks 
pay, the following two things happen:
- establish secure session
- send form data across.
I have the first figured out, how do i implement the second?

please help. If you have an alternative way of doing it, tell me.
any ideas, thoughts would be very much helpful
cheers
Ajay


From: ajay brar [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: design question
Date: Wed, 22 Oct 2003 17:37:38 +1000
hi!
i have the following scenario.
server0 - has a jsp page, that allows user to enter the goods they want 
etc, say foo.jsp
server1-jsp payment page, say bar.jsp and action class CommAction
on clicking done on foo.jsp, this should establish a connection with 
CommAction class on server1, perform some identity exchange, based on the 
exchange,  route to bar.jsp

i came up with
[server0] foo.jsp -FooForm -FooAction
[server1] bar.jsp -BarForm -BarAction
i have java classes to establish a secure communication between two 
parties.
what i want to do now is, have some way of FooAction (on successful return 
from the underlying comm establishing class) to direct the person to 
BarAction along with the information they submitted orginally.

in other words how can i conditionally submit a form to another action 
class on some other server.
I ofcourse want the form to be submitted to the local action class, that 
first checks it, then resubmits to a remote action class, the remote action 
class then forwards the user to a page on its own remote server.

sorry if the above sounds too cryptic.
any help would be greatly welcome
thanks
cheers
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: design question

2003-10-22 Thread ajay brar
hi!
thanks for the reply.
How do i do the switch action you talked about.
cheers
ajay

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: design question
Date: Wed, 22 Oct 2003 16:49:32 +0100
AFAIK u can do the same using the serialization ( by making ur form 
implement the serializable interface) or u can also do one case like create 
the other action class as a seperate module and do switch action which 
might work out also might help u to switch back in the previous 
application.

I am no expert on security but this might work look what other people might 
say.

ur security depends on how u call ur remote class 

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 22 October 2003 16:12
To: [EMAIL PROTECTED]
Subject: Re: design question
hi all!
would anyone in the spirit of diwali like to help me on this one.
how do i direct a form submission to a remote action class, after having
fthe form submitted to a local action class first.
ie, communicate between two action classes, one of which is on a remote
machine. I am looking at sending  a URL object with the form data from the
local to the remote class, but then depending upon the remote class's
response i want to forward the user to a page on the remote machine.
Its like a payment system, you select your good at an e-comm website, then
click pay. This then transfers you to a payment page located on a payment
gateway site.
Before the transfer i will have a security session establishment. This is
being handled by two Java classes, one on each end. so when the user clicks
pay, the following two things happen:
- establish secure session
- send form data across.
I have the first figured out, how do i implement the second?
please help. If you have an alternative way of doing it, tell me.
any ideas, thoughts would be very much helpful
cheers
Ajay


From: ajay brar [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: design question
Date: Wed, 22 Oct 2003 17:37:38 +1000

hi!
i have the following scenario.
server0 - has a jsp page, that allows user to enter the goods they want
etc, say foo.jsp
server1-jsp payment page, say bar.jsp and action class CommAction
on clicking done on foo.jsp, this should establish a connection with
CommAction class on server1, perform some identity exchange, based on the
exchange,  route to bar.jsp

i came up with
[server0] foo.jsp -FooForm -FooAction
[server1] bar.jsp -BarForm -BarAction
i have java classes to establish a secure communication between two
parties.
what i want to do now is, have some way of FooAction (on successful 
return
from the underlying comm establishing class) to direct the person to
BarAction along with the information they submitted orginally.

in other words how can i conditionally submit a form to another action
class on some other server.
I ofcourse want the form to be submitted to the local action class, that
first checks it, then resubmits to a remote action class, the remote 
action
class then forwards the user to a page on its own remote server.

sorry if the above sounds too cryptic.
any help would be greatly welcome
thanks
cheers
ajay

_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp


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


_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

jboss and tomcat

2003-10-22 Thread ajay brar
hi!
this may sound really basic, but how do i deploy a war file(with a STRUTS 
application) in Jboss.
this war will interact with an ejb jar file. Do i need to put the war and 
the jar together in an ear file, or do i just put the war file by itself 
somewhere.

please help (i have this thig due tomorrow and we have to integrate today 
:))

thanks
regards
Ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated 
text. Click here  http://ninemsn.com.au/premium/landing.asp

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


Re: element type null

2003-10-21 Thread ajay brar
hi!
thanks for that.
do i still need the declaration of ApplicationResources when i have defined 
it in struts-config.xml
with message resources tag.
if not, what else could be causing this problem

thanks
ajay

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: element type null
Date: Tue, 21 Oct 2003 16:10:10 +1000
I don't know if that's right - I had a similar problem though until I put
this in my web.xml
But I assumed that your properties file is, like mine, in
WEB-INF/classes/resources/ApplicationResources.properties
sorry, I should have been more explicit in what I meant.

  init-param
  param-nameapplication/param-name
  param-valueresources.ApplicationResources/param-value
  /init-param




maybe you need this:

  init-param
  param-nameapplication/param-name
  param-valueresources.ApplicationResources/param-value
  /init-param
Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.





ajay brar [EMAIL PROTECTED]
21/10/2003 02:15 PM
Please respond to Struts Users Mailing List
To: [EMAIL PROTECTED]
cc:
Subject:Re: element type null
hi!
tried that but didn't work
i dont know about the reserved word, all struts-examples seem to use it
:-)
the error i posed is what i get in the log file, when i try to deploy it.
after deploying(successfully?) i get the error
cant find bean message resource
any ideas. i know its something with the deployment descriptor, but cant
figure out what.
the web.xml below looks fine to me
thanks
cheers
ajay
From: Martin Gainty [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: element type null
Date: Mon, 20 Oct 2003 20:26:52 -0400

my web-app has a id e.g.
web-app id=WebApp

Also is it wise to call servlet action
I thought action was a reserved name?

-M

- Original Message -
From: ajay brar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 20, 2003 8:18 PM
Subject: element type null


  hi!
  i am getting the following error, when i try to deploy my application
  Element type null must be followed by either attribute specification

or
  /
 
  could anyone help please.
  my web.xml looks like this
  ?xml version=1.0 encoding=ISO-8859-1?
 
  !DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
 
  web-app
 
 
!-- Action Servlet Configuration --
servlet
servlet-nameview/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value3/param-value
  /init-param
  init-param
param-namedetail/param-name
param-value3/param-value
  /init-param
  load-on-startup2/load-on-startup
/servlet
 
 servlet
  servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value3/param-value
  /init-param
  init-param
param-namedetail/param-name
param-value3/param-value
  /init-param
  load-on-startup2/load-on-startup
/servlet
 
 
 
!-- Action Servlet Mapping --
servlet-mapping
servlet-nameview/servlet-name
  url-pattern*.view/url-pattern
/servlet-mapping
 
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping
 
 
!-- Struts Tag Library Descriptors --
taglib
  taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
  taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib
 
taglib
  taglib-uri/WEB-INF/struts-html.tld/taglib-uri
  taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib
 
taglib
  taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
  taglib-location/WEB-INF/struts-logic.tld/taglib-location
/taglib
taglib
  taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
  taglib-location/WEB

struts security

2003-10-21 Thread ajay brar
hi!
i need to implement the following security features in my security 
application.
authentication
which is better - have a login page and keep some sort of bean in 
session on successful login
and check for the ban in every action(and have 
no direct links)
   OR use realms, define user roles etc
   (i have only 2 classes of users at the moment, the max number will 
be 4)
confidentiality - should i implement my own encryption protocol, like a 
function that takes a string,
gets a symmetric key(or private key if using public key 
encryption) and encrypt and send
   the data
integrity - again what should be my approach?
non-repudiation - digital signatures
prevent replay attacks - ???

how do i support ssl in struts?

any pointers and references would be most welcome

thanks
ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


element type null

2003-10-20 Thread ajay brar
hi!
i am getting the following error, when i try to deploy my application
Element type null must be followed by either attribute specification  or 
/

could anyone help please.
my web.xml looks like this
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
 http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
web-app

 !-- Action Servlet Configuration --
 servlet
  servlet-nameview/servlet-name
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value3/param-value
   /init-param
   init-param
 param-namedetail/param-name
 param-value3/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet
  servlet
   servlet-nameaction/servlet-name
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value3/param-value
   /init-param
   init-param
 param-namedetail/param-name
 param-value3/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet


 !-- Action Servlet Mapping --
 servlet-mapping
  servlet-nameview/servlet-name
   url-pattern*.view/url-pattern
 /servlet-mapping
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
 !-- Struts Tag Library Descriptors --
 taglib
   taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   taglib-location/WEB-INF/struts-bean.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   taglib-location/WEB-INF/struts-html.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
   taglib-location/WEB-INF/struts-logic.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
   taglib-location/WEB-INF/struts-tiles.tld/taglib-location
 /taglib
/web-app

thanks
cheers
Ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated 
text. Click here  http://ninemsn.com.au/premium/landing.asp

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


Re: element type null

2003-10-20 Thread ajay brar
hi!
tried that but didn't work
i dont know about the reserved word, all struts-examples seem to use it :-)
the error i posed is what i get in the log file, when i try to deploy it.
after deploying(successfully?) i get the error
cant find bean message resource
any ideas. i know its something with the deployment descriptor, but cant 
figure out what.
the web.xml below looks fine to me

thanks
cheers
ajay

From: Martin Gainty [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: element type null
Date: Mon, 20 Oct 2003 20:26:52 -0400
my web-app has a id e.g.
web-app id=WebApp
Also is it wise to call servlet action
I thought action was a reserved name?
-M

- Original Message -
From: ajay brar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 20, 2003 8:18 PM
Subject: element type null
 hi!
 i am getting the following error, when i try to deploy my application
 Element type null must be followed by either attribute specification 
or
 /

 could anyone help please.
 my web.xml looks like this
 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

 web-app


   !-- Action Servlet Configuration --
   servlet
   servlet-nameview/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value3/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value3/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet

servlet
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value3/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value3/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet



   !-- Action Servlet Mapping --
   servlet-mapping
   servlet-nameview/servlet-name
 url-pattern*.view/url-pattern
   /servlet-mapping

   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping


   !-- Struts Tag Library Descriptors --
   taglib
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
   /taglib
   taglib
 taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
   /taglib

 /web-app

 thanks
 cheers
 Ajay

 _
 ninemsn Premium transforms your e-mail with colours, photos and animated
 text. Click here  http://ninemsn.com.au/premium/landing.asp


 -
 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]
_
Chat via SMS. Simply send 'CHAT' to 1889918. 33c per message sent. Free to 
receive. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


Re: element type null : clarification

2003-10-20 Thread ajay brar
hi!
the exception on the webpage is
org.apache.jasper.JasperException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE

the error in the log file is
Element type null must be followed by either attribute
specification  or/
as i said its a parse error, i cant find it anywhere
any help would be immensely great
cheers
ajay

From: ajay brar [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: element type null
Date: Tue, 21 Oct 2003 14:15:33 +1000
hi!
tried that but didn't work
i dont know about the reserved word, all struts-examples seem to use it :-)
the error i posed is what i get in the log file, when i try to deploy it.
after deploying(successfully?) i get the error
cant find bean message resource
any ideas. i know its something with the deployment descriptor, but cant 
figure out what.
the web.xml below looks fine to me

thanks
cheers
ajay

From: Martin Gainty [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: element type null
Date: Mon, 20 Oct 2003 20:26:52 -0400
my web-app has a id e.g.
web-app id=WebApp
Also is it wise to call servlet action
I thought action was a reserved name?
-M

- Original Message -
From: ajay brar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 20, 2003 8:18 PM
Subject: element type null
 hi!
 i am getting the following error, when i try to deploy my application
 Element type null must be followed by either attribute specification 

or
 /

 could anyone help please.
 my web.xml looks like this
 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

 web-app


   !-- Action Servlet Configuration --
   servlet
   servlet-nameview/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value3/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value3/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet

servlet
 servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value3/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value3/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet



   !-- Action Servlet Mapping --
   servlet-mapping
   servlet-nameview/servlet-name
 url-pattern*.view/url-pattern
   /servlet-mapping

   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping


   !-- Struts Tag Library Descriptors --
   taglib
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
   /taglib
   taglib
 taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri
 taglib-location/WEB-INF/struts-tiles.tld/taglib-location
   /taglib

 /web-app

 thanks
 cheers
 Ajay

 _
 ninemsn Premium transforms your e-mail with colours, photos and 
animated
 text. Click here  http://ninemsn.com.au/premium/landing.asp


 -
 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]
_
Chat via SMS. Simply send 'CHAT' to 1889918. 33c per message sent. Free to 
receive. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
E-mail just got a whole lot better. New ninemsn Premium. Click here 
http://ninemsn.com.au/premium/landing.asp

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


URGENT: html:options

2003-10-14 Thread ajay brar
hi!
i'm getting a problem with my html:options
what i have is a MyUtils class with a method to retrieve a list of agency 
id's from the database
class MyUtils
{
  //gets agencyIds creates LabelValueBeans and chucks them into a Vector
public static Vector getAgencyIds()
}

in my jsp page i had
%@ page import=MyUtils %
jsp:useBean id=agencyIds type=java.util.Vector /
%  agencyIds= MyUtils.getAgencyIds();   %
i then had
html:select  property=agencyId
 html:options collection=agencyIds property=value
labelProperty=label /
/html:select
this gave me an error, setCollection(java.lang.String) cannot be applied to 
java.util.Vector
this was a compiler error.

i tried doing,
changed MyUtils to
class MyUtils
{
  private Vector agencyIds=new Vector();
  //gets agencyIds creates LabelValueBeans and chucks them into a Vector
public Vector getAgencyIds()
}
%@ page import=MyUtils %
jsp:useBean id=foo type=MyUtils /
html:select  property=agencyId
 html:optionsCollection name=foo property=agencyIds label=label 
value=value /
/html:select

this gave me an error saying it couldn't find bean agencyId in any scope.

could someone please help.

thanks
cheers
ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated 
text. Click here  http://ninemsn.com.au/premium/landing.asp

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


RE: URGENT: html:options

2003-10-14 Thread ajay brar
hi!

I think your collection needs to implement the List interface (use an
ArrayList instead of a vector)
but a vector implements the List interface, or so says the api
any other ideas


-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 12:45
To: [EMAIL PROTECTED]
Subject: URGENT: html:options
hi!
i'm getting a problem with my html:options
what i have is a MyUtils class with a method to retrieve a list of agency
id's from the database
class MyUtils
{
   //gets agencyIds creates LabelValueBeans and chucks them into a Vector
 public static Vector getAgencyIds()
}
in my jsp page i had
%@ page import=MyUtils %
jsp:useBean id=agencyIds type=java.util.Vector /
%  agencyIds= MyUtils.getAgencyIds();   %
i then had
html:select  property=agencyId
  html:options collection=agencyIds property=value
labelProperty=label /
/html:select
this gave me an error, setCollection(java.lang.String) cannot be applied to
java.util.Vector
this was a compiler error.
i tried doing,
changed MyUtils to
class MyUtils
{
   private Vector agencyIds=new Vector();
   //gets agencyIds creates LabelValueBeans and chucks them into a Vector
 public Vector getAgencyIds()
}
%@ page import=MyUtils %
jsp:useBean id=foo type=MyUtils /
html:select  property=agencyId
  html:optionsCollection name=foo property=agencyIds 
label=label
value=value /
/html:select

this gave me an error saying it couldn't find bean agencyId in any scope.

could someone please help.

thanks
cheers
ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated
text. Click here  http://ninemsn.com.au/premium/landing.asp
-
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]
_
E-mail just got a whole lot better. New ninemsn Premium. Click here 
http://ninemsn.com.au/premium/landing.asp

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


Re: URGENT: html:options

2003-10-14 Thread ajay brar
hi!
thanks for the reply.
doesn't the jsp import statement followed by the usebean ie,
%@ page import=MyUtils %
jsp:useBean id=agencyIds type=java.util.Vector /
introduce the agencyIds into page scope.
also with the example you gave me should
html:select  property=agencyId
   html:options collection=agencyIds
label=label
value=value /
/html:select
shouldn't the value of collections be items, since that is the key you used.

thanks
cheers
ajay

From: Nicolas De Loof [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: URGENT: html:options
Date: Tue, 14 Oct 2003 15:11:57 +0200
collection attribute of html:options tag is used to set the name of a 
bean (in some scope) that is a collection of the
items off the select-box.

You need to put your Vector into page or request scope to use this tag:

%
request.setAttribute(items, agencyIds);
%
html:select  property=agencyId
   html:options collection=agencyIds
label=label
value=value /
/html:select
Nico.

- Original Message -
From: ajay brar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 14, 2003 2:53 PM
Subject: RE: URGENT: html:options
 hi!

 I think your collection needs to implement the List interface (use an
 ArrayList instead of a vector)
 but a vector implements the List interface, or so says the api
 any other ideas



 
 -Original Message-
 From: ajay brar [mailto:[EMAIL PROTECTED]
 Sent: 14 October 2003 12:45
 To: [EMAIL PROTECTED]
 Subject: URGENT: html:options
 
 hi!
 i'm getting a problem with my html:options
 what i have is a MyUtils class with a method to retrieve a list of 
agency
 id's from the database
 class MyUtils
 {
 //gets agencyIds creates LabelValueBeans and chucks them into a 
Vector
   public static Vector getAgencyIds()
 }
 
 in my jsp page i had
 %@ page import=MyUtils %
 jsp:useBean id=agencyIds type=java.util.Vector /
 %  agencyIds= MyUtils.getAgencyIds();   %
 i then had
 html:select  property=agencyId
html:options collection=agencyIds property=value
 labelProperty=label /
 /html:select
 
 this gave me an error, setCollection(java.lang.String) cannot be 
applied to
 java.util.Vector
 this was a compiler error.
 
 i tried doing,
 changed MyUtils to
 class MyUtils
 {
 private Vector agencyIds=new Vector();
 //gets agencyIds creates LabelValueBeans and chucks them into a 
Vector
   public Vector getAgencyIds()
 }
 %@ page import=MyUtils %
 jsp:useBean id=foo type=MyUtils /
 html:select  property=agencyId
html:optionsCollection name=foo property=agencyIds
 label=label
 value=value /
 /html:select
 
 this gave me an error saying it couldn't find bean agencyId in any 
scope.
 
 could someone please help.
 
 thanks
 cheers
 ajay
 
 _
 ninemsn Premium transforms your e-mail with colours, photos and 
animated
 text. Click here  http://ninemsn.com.au/premium/landing.asp
 
 
 -
 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]
 

 _
 E-mail just got a whole lot better. New ninemsn Premium. Click here
 http://ninemsn.com.au/premium/landing.asp


 -
 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]
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


html:options

2003-10-12 Thread ajay brar
hi!
i have the following scenario
in my database i have an Agency table(which includes the attribute 
AGENCY_ID) and a Client tables(which includes a AGENCY_ID that maps to the 
id in the Agency table)
agencies are created first through a web interface.
after that you create Clients. what i want is that when you are filling in 
the details for the client, i want  a drop down list that includes the 
AGENCY_ID of all agencies that are in the database. so the person fiiling in 
the info can select a particular AGENCY_ID for that client)
right now in my ClientForm, i have an int agencyId. i want this populated on 
the basis of the selection made form the drop down list.

how do i do this? any suggestions?
i'm thinking of  reading all agencies, chucking them into a collection, 
placing the collection in the session context and then reading off it in the 
jsp page using html:options

The downside to that is that my ClientAction forwrads to client.jsp(where 
you add client details). And i do not particularly want to put all the 
Agency reading bit into ClientAction.
I could use a separate Java class, but i have an action DisplayAgency that 
reads all the agencies from the database, adds them to a User bean, puts 
this in session context and later the page this action forwards to uses 
logic:iterate to move through the collection in the User bean and display 
it. Having another Java class to read only the id's and put them in a 
collection and place this in sesision seems like duplicatng an existing 
task(with sme minor differences)

are there any other ways of doing this?

thanks
cheers
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


Re: html:options

2003-10-12 Thread ajay brar
hi!
thanks for that.
no the values are not application wide, they may change depending on the 
sequence of user actions.
LabelValueBean sounds like an excellent idea
thanks
cheers
ajay


From: Jeff Kyser [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: html:options
Date: Sun, 12 Oct 2003 09:51:17 -0500
name/value pairs from a database are handled nicely
in a list of LabelValueBeans.
I'd pull the code to load that list from the database out
into a model class, or perhaps into a Singleton loaded
by an InitServlet (at startup - if the contents weren't
changing, or were at least application-wide)
Then let your actions access the application-scoped
AgencyList instead of doing the work themselves.
And you can iterate the AgencyList in your JSPs,
dealing with both names and values, or just values -
whatever you want.
-jeff

On Sunday, October 12, 2003, at 09:33  AM, ajay brar wrote:

hi!
i have the following scenario
in my database i have an Agency table(which includes the attribute 
AGENCY_ID) and a Client tables(which includes a AGENCY_ID that maps to the 
id in the Agency table)
agencies are created first through a web interface.
after that you create Clients. what i want is that when you are filling in 
the details for the client, i want  a drop down list that includes the 
AGENCY_ID of all agencies that are in the database. so the person fiiling 
in the info can select a particular AGENCY_ID for that client)
right now in my ClientForm, i have an int agencyId. i want this populated 
on the basis of the selection made form the drop down list.

how do i do this? any suggestions?
i'm thinking of  reading all agencies, chucking them into a collection, 
placing the collection in the session context and then reading off it in 
the jsp page using html:options

The downside to that is that my ClientAction forwrads to client.jsp(where 
you add client details). And i do not particularly want to put all the 
Agency reading bit into ClientAction.
I could use a separate Java class, but i have an action DisplayAgency that 
reads all the agencies from the database, adds them to a User bean, puts 
this in session context and later the page this action forwards to uses 
logic:iterate to move through the collection in the User bean and display 
it. Having another Java class to read only the id's and put them in a 
collection and place this in sesision seems like duplicatng an existing 
task(with sme minor differences)

are there any other ways of doing this?

thanks
cheers
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

-
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]
_
Chat via SMS. Simply send 'CHAT' to 1889918.  More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


Re: action class for more than one mapping

2003-10-09 Thread ajay brar
hi!
thanks for that michael.
i am running Tomcat 4.1.24 and using struts 1,1
the url is reasonable and what i expect it to be. It incudes the jsessionid 
string, but then it includes the same for the first link, which works fine.
I have had this problem for a while on my hosting service'e webserver. At 
home on my Tomcat5.0, the apps works fine. However when i upload them to the 
account, some of the apps work and others dont.
this happens with the .do links.
I have installed the app under the context root /test-struts
and within this context, i have only the application described before. ii'm 
getting the Multiple Choices error only because i also have a file called 
tour.htm which both links are supposed to forward to and so i get an error 
saying

The document name you requested (/test-struts/tour.do) could not be found on 
this server. However, we found documents with names similar to the one you 
requested.

Available documents:

* /test-struts/tour.htm (common basename)

if i change the path to /testing, and change the link to testing.do, i get a 
file not found error.
MenuAction consists only of
public final class MenuAction extends Action
{
  public ActionForward execute(ActionMapping mapping, ActionForm form,
	HttpServletRequest request, HttpServletResponse response) throws 
IOException
  {
 		return mapping.findForward(success);
	}
}

and thus forwards regardless. I wrote this as a test application to find out 
what was causing the problem. as it is, i'm nowhere near finding out.

any more ideas would be excellent
my app is at
www.ajaybrar.net/test-struts
thanks
cheers
ajay



From: Michael D. Norman [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: action class for more than one mapping
Date: Thu, 9 Oct 2003 00:35:08 -0500
Ajay,

Yes, you can definitely have multiple action mappings defined for a
particular action class.  The snippet of struts-config.xml you give below
appears correct, as do the html:link tags on the page.
I would try a few things:

A) Make sure the URL that is getting written to the browser is reasonable.
It should be, but double-check.  That will remove any doubts about the
html:link tags.
B) Find out what happens if you change the action path for /tour.  If it
fixes your problem there is something else mapped to xxx/tour.do, either in
your web.xml or in your server configuration (are you in the default 
context
and there is another web application defined at /tour?).

C) Finally, if the logic is different inside MenuAction for /menu vs.
/tour, make sure the logic isn't causing the problem, (e.g. is it
forwarding to somewhere else that has a potential duplicate context issue 
as
described above?)  Also, check out your app server or web server logs and
find out what resource is actually giving the 300 server error.

It would help to know what application server you're running, as well as 
the
version of Struts.

-- Michael D. Norman
   ProbuSoft - Custom Software Development
   http://www.probusoft.com/
   913-390-6951
   [EMAIL PROTECTED]
- Original Message -
From: ajay brar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 11:33 PM
Subject: action class for more than one mapping
 hi!
 can i have an Action class for more than one action mapping.
 that is can i do
 action-mappings

   action path=/menu
   type=MenuAction
   scope=request
 forward name=success path=/tour.htm /
 /action
   action path=/tour
   type=MenuAction
   scope=request
 forward name=success path=/tour.htm /
 /action

   /action-mappings
 if i can have that, then why isn't it working. i have in my index.jsp
 html:link page=/menu.do menu /html:linkbr
 html:link page=/tour.do tour /html:linkbr
 the first link 'menu' works fine, however for the second link, 'tour' i
get
 a HTTP 300 multiple choices error.

 thanks
 ajay

 _
 E-mail just got a whole lot better. New ninemsn Premium. Click here
 http://ninemsn.com.au/premium/landing.asp


 -
 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]
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


Re: Cannot retrieve definition for form bean null

2003-10-08 Thread ajay brar
hi!
i have defined a form KioskForm, that i am using later in the application.
since my current form consists only of a submit button and no fields,
html:form action=/kiosk  browse kiosks html:submit 
value=Submit//html:form
can i define kioskForm in the action mapping as the form for this empty 
form?
what i am trying to do is just test struts forms on my server. i have been 
having problems with it not matching my requests to the appropriate action 
class.

thanks
cheers
ajay



From: Max Cooper [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Cannot retrieve definition for form bean null
Date: Tue, 7 Oct 2003 22:33:54 -0700
Struts is looking for the action form defined for the /kiosk action 
(since
that is what the html:form submits to on your page. The action or action
form does not exist, so you get the error of Struts looking for the null
action form.

Use a regular HTML form tag to evade that issue, or define the stuff for
your /kiosk action.
-Max

- Original Message -
From: ajay brar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 9:30 PM
Subject: Cannot retrieve definition for form bean null
 hi!
 i had heard that a form bean for a form was optional, not sure why i am
 getting this error here.
 i have a button on a page and it goes like
 html:form action=/kiosk  browse kiosks html:submit
 value=Submit//html:form
 in my struts-config.xml i have defined the following action mapping
 action path=/kiosk
 type=KioskAction
 scope=request
  forward name=successpath=/kiosk.jsp /
 /action

 could someone please help with this error.

 thanks
 cheers
 ajay

 _
 Chat via SMS. Simply send 'CHAT' to 1889918. More info at
 http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800


 -
 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]
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


RE: ejb's and tomcat

2003-10-08 Thread ajay brar
hi!
its actually for my software project at university. i am in uni. and the aim 
of the project is to use ejb with struts.
we are developing a transaction/payment gateway.
the ejb's will be implementing the model, ie, the actual transaction and 
also merchant support functions.
since me and my group are still in uni(and learning among other things 
groupwork), we divided the tasks. so while i developed the web tier using 
struts someone else developed the ejb's
and ofcourse now we have to integrate the two sides and hence my question. 
we are currently experimenting with openEJB; any alternative recommendations 
will be most welcome.

thanks
cheers
ajay



From: Mark Galbreath [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: ejb's and tomcat
Date: Wed, 8 Oct 2003 07:03:51 -0400
If you are asking these questions, you probably should not be using EJB.
The ONLY reason to use EJB is if you are developing a distributed
application; anything else is overkill.  If you simply need data
persistence, use JDBC and use DAO, or one of the persistence frameworks:
Ibatus, Hibernate, or Kodo-JDO.
Mark

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 9:51 PM
To: [EMAIL PROTECTED]
Subject: ejb's and tomcat
Hi!
does tomcat support ejb's. I'm building a web app which uses struts. i'm
using  ejb's  for the model part.
can i deploy the ejb component on tomcat?
what other alternate ways are there to do so?
thanks
cheers
ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated
text. Click here  http://ninemsn.com.au/premium/landing.asp
-
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]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


action class for more than one mapping

2003-10-08 Thread ajay brar
hi!
can i have an Action class for more than one action mapping.
that is can i do
action-mappings
  actionpath=/menu
  type=MenuAction
  scope=request
forward name=success path=/tour.htm /
/action
  actionpath=/tour
  type=MenuAction
  scope=request
forward name=success path=/tour.htm /
/action
 /action-mappings
if i can have that, then why isn't it working. i have in my index.jsp
html:link page=/menu.do menu /html:linkbr
html:link page=/tour.do tour /html:linkbr
the first link 'menu' works fine, however for the second link, 'tour' i get 
a HTTP 300 multiple choices error.

thanks
ajay
_
E-mail just got a whole lot better. New ninemsn Premium. Click here 
http://ninemsn.com.au/premium/landing.asp

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


ejb's and tomcat

2003-10-07 Thread ajay brar
Hi!
does tomcat support ejb's. I'm building a web app which uses struts. i'm 
using  ejb's  for the model part.
can i deploy the ejb component on tomcat?
what other alternate ways are there to do so?

thanks
cheers
ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated 
text. Click here  http://ninemsn.com.au/premium/landing.asp

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


Cannot retrieve definition for form bean null

2003-10-07 Thread ajay brar
hi!
i had heard that a form bean for a form was optional, not sure why i am 
getting this error here.
i have a button on a page and it goes like
html:form action=/kiosk  browse kiosks html:submit 
value=Submit//html:form
in my struts-config.xml i have defined the following action mapping
action path=/kiosk
   type=KioskAction
   scope=request
forward name=successpath=/kiosk.jsp /
   /action

could someone please help with this error.

thanks
cheers
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


Multiple Choices

2003-10-06 Thread ajay brar
hi!
ihave a link as
html:link page=/blah.jsp blah /html:link
this adds a dynamic string to the link and so you have something like
blah.jsp;jsessionid=fjwdjkfh342lkjl3kj4
however on my webserver, this gives me a 300 Multiple Choices error.
ie i get an error like
Multiple Choices
The document name you requested 
(/cinv3/agency.jsp;jsessionid=92A584A32AFDC25FEF6DB8554D5F4D12) could not be 
found on this server. However, we found documents with names similar to the 
one you requested.
Available documents:

/cinv3/agency.jsp (common basename)
Please consider informing the owner of the referring page about the broken 
link.

is this something to do with my server setting.
similarly, if i have links that with *.do, these give the same error.
i thought that maybe the server isn't calling the ActionServlet, but my 
forms work fine(on submit, the appropriate action is called), my view 
components(i have an instance of ActionServlet mapped to *.view) also work 
fine.

could someone please help.

thanks
ajay

From: Max Cooper [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: data disappearing in jsp
Date: Mon, 6 Oct 2003 16:53:14 -0700
If the missing fields are display-only, you might need to add hidden fields
to carry their values along in the request when the page is submitted so
that they will be available on a validation error.
reset() is called before the ActionForm is populated with the values from
the request, so I don't think it matters what you do to them there. As long
as they are in the request (and the names in the HTML form match your
ActionForm), they should be populated in the ActionForm when a validation
error occurs.
-Max

- Original Message -
From: krishnamohan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 06, 2003 6:10 AM
Subject: data disappearing in jsp
 Hi,

 In my jsp page I have 5 fields out of which 2 fields are required.   
When
 the jsp is submitted I am displaying the error messages for the required
 fields using Action Error in the form bean's validate method.  When the
jsp
 page is displayed with the error messages, the data for the remaining 3
 fields is disappearing.  Can anyone let me know why this is happening.
In
 the reset method all the fields are made to null.

 Thanks,
 Krishna

 -
 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]
_
Chat via SMS. Simply send 'CHAT' to 1889918.  More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


Please HELP 300 Multiple choices

2003-10-04 Thread ajay brar
hi!
i'm getting a HTTP 300 Multiple choices response when i try to run my 
application.
I have had this problem for a while now, and it comes when i have a link 
like
html:link page=/agency.doagency/html:link
i then get an error, that agency.do does not exist or if there is an 
agency.jsp i get the multiple choices error.
i thought the error might be something to do with the server setting, since 
this works at home and only gives an error on my hosting service's server. 
But struts-example.war(which cmes with struts) works fine.
this seems to happen only if in struts-config.xml, for my link i haven't 
declared a corresponding ActionForm,(which i dont need anyways)
eg
i have
action	path=/agency
   		type=AgencyAction
   		scope=request
forward name=success  path=/agency.jsp /
   /action
this gives me an error.
AgencyAction, basically reads from a database, places a bean in session and 
then forwards to agency.jsp
However other applications, which have a request path that requires a form 
as well, dont generate this error. so eg:
actionpath=/agency
  type=AgencyAction
  name=agencyForm
 scope=request
  validate=true
 forward name=success  path=/menu.jsp/
   /action
does not generate the error. the above is from a previous version of the 
same application that used a form.
please help, i have a project due in the next few days and really need help.
the code works fine at home
the 300 Multiple Choices error, also happens with struts-example.war, 
however it goes away when i refresh the page.
any help would be very much appreciated
thanks
ajay

my web.xml is
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
 http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
web-app

 !-- Action Servlet Configuration --
 servlet
   servlet-nameaction/servlet-name
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value3/param-value
   /init-param
   init-param
 param-namedetail/param-name
 param-value3/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet
 !-- Action Servlet Mapping --
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
 !-- The Welcome File List --
 welcome-file-list
   welcome-filemenu.jsp/welcome-file
 /welcome-file-list
 !-- Struts Tag Library Descriptors --
 taglib
   taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   taglib-location/WEB-INF/struts-bean.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   taglib-location/WEB-INF/struts-html.tld/taglib-location
 /taglib
 taglib
   taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
   taglib-location/WEB-INF/struts-logic.tld/taglib-location
 /taglib
/web-app

and my struts-config.xml is
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;
struts-config

 !-- == Form Bean Definitions === 
--
 form-beans

   !-- Agency form bean --
   form-bean  name=agencyForm
   type=AgencyForm/
 /form-beans

 !-- == Global Forward Definitions == 
--
 global-forwards
   forward   name=success  path=/menu.jsp/
   forward   name=error		   path=/menu.jsp/
 /global-forwards

 !-- == Action Mapping Definitions == 
--
 action-mappings

   !-- Edit agency --
   actionpath=/editAgency
  type=EditAgencyAction
  name=agencyForm
 scope=request
  validate=false
 forward name=editSuccess  path=/editAgency.jsp/
 forward name=deleteSuccesspath=/deleteAgency.do/
   /action
   action   path=/agency
type=AgencyAction
scope=request
forward name=success  path=/agency.jsp /
   /action
   action   path=/saveAgency
type=SaveAgencyAction
name=agencyForm
scope=request
 forward name=successpath=/menu.jsp /
   /action
   action   path=/deleteAgency
type=DeleteAgencyAction
scope=request
 forward name=successpath=/menu.jsp /
   /action
 /action-mappings

 !-- == Controller Configuration  
--

 controller
   !-- The input parameter on action elements is the name of a
local or global forward rather than a module-relative path --
   set-property property=inputForward value=true/
 /controller
 !-- == Message Resources Definitions === 
--

 message-resources
   

file not found

2003-10-02 Thread ajay brar
hi!
i am a new struts user.
i am having the following problem
when i click on a link that is supposed to perform an action and either 
return an error or success, it says fileTransfer.do not found
here is my link
html:link page=/fileTransfer.do?action=getStatistics/html:link

my struts-config.xml is
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;
struts-config

!-- == Global Forward Definitions 
== --

global-forwards
forward   name=success  path=/fileTransfer.jsp/
forward   name=errorpath=/fileTransfer.jsp/
/global-forwards
!-- == Action Mapping Definitions 
== --

action-mappings
!-- Process a fileTransfer --
actionpath=/fileTransfer
   type=FileTransferAction
   scope=request
   input=fileTransfer/
/action-mappings

controller
!-- The input parameter on action elements is the name of a
local or global forward rather than a module-relative path --
set-property property=inputForward value=true/
/controller
!-- == Message Resources Definitions 
=== --

message-resources
parameter=ApplicationResources/
/struts-config

FileTransferAction is in WEB-INF/classes
the program works fine at home where i'm using tomcat 5.0 (the one that 
comes with java web services developer's pack)
however when i upload it to my hosting service provider, www,eroute.net 
(which uses Tomcat 4.1.24), i get the File Not Found Error
the file can be seen at
www.ajaybrar.net/projectv2

thanks a lot
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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