RE: pdf file open.

2004-03-10 Thread Jacqueline Gomes
Hi,

I use the following code:

I get the pdf as bytes from the dbase, read it into a ByteArrayOutputStream baos, then 
write the contents of the baos to the response output stream sos.

if (!exId.equals()) { 
extractBytes = getPDF(exId);
ByteArrayOutputStream baos = new ByteArrayOutputStream();  
  
baos.write(extractBytes,0,extractBytes.length);

//Set up the content-disposition variable
StringBuffer sb = new StringBuffer();
sb.append(inline; filename=);
sb.append(extract.pdf);

//Set the headers etc.
response.reset();
response.addHeader(Cache-Control, max-age=30);
response.setContentType(application/pdf);
 

response.setHeader(Content-disposition,sb.toString());
response.setContentLength(extractBytes.length);

ServletOutputStream sos;
sos = response.getOutputStream();
baos.writeTo(sos);

sos.flush();   
 
baos.close();
return null;
}

Jackie.

-Original Message-
From: HG [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 March 2004 4:22 PM
To: Struts Users Mailing List
Subject: Re: pdf file open.


Hi

I don't know if this helps...But I have read somewhere, that you must set up
the content-length header of your response, when doing PDF streaming.

Just set it as the size of your FileStream (or another stream object)

Try it out..and let me know..





- Original Message - 
From: deepaksawdekar [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 10, 2004 6:07 AM
Subject: pdf file open.


Hi,
I am trying to open a pdf file. I am using servlet and struts in my
application. Everything is working fine except it ask me two times do you
want to open or save the file, once for the file whoes name is session id
and second time for the actual file.
Am i doing some thing wrong.
Please help me


Servelet code is as follows

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException {

//Method name
final String METHOD_NAME = CLASS_NAME.concat(.doGet());

String sessionId =
request.getParameter(GUIConstants.USER_SESSION_ID);
String encodefileName =
request.getParameter(GUIConstants.USER_FILE_NAME);
String fileName = new String();
try {
fileName =
URLDecoder.decode(encodefileName,
GUIConstants.CHAR_ENCODING);
} catch (Exception ex) {
LOGGER.error(METHOD_NAME, ex);
}
HttpSession session = request.getSession();

if (!session.getId().equals(sessionId)) {
// Don't do anything - just return
//response.sendRedirect(GUIConstants.LOGIN_URL);
return;
}

LOGGER.debug(File Name  + fileName);
int dot = fileName.lastIndexOf(CommonConstants.DOT) + 1;
if(fileName.substring(dot).equalsIgnoreCase(CommonConstants.PDF)) {
response.setContentType(GUIConstants.PDF_CONTENT_TYPE);
} else {
response.setContentType(GUIConstants.CONTENT_TYPE);
}
response.setHeader(
GUIConstants.CONTENT_DIS,
GUIConstants.CONTENT_ATT + \ + fileName + \);

try {
String filePath =
GetProperties.getValue(
PropertiesFileConstants.PMP_PROP_FILE_PATH,
CommonConstants.DOCUMENT_LOCAL_STORE_PATH_FOR_VIEWING);
ServletOutputStream out = response.getOutputStream();
String fullFilePath = filePath + File.separator + fileName;
FileInputStream fin = new FileInputStream(new
File(fullFilePath));
byte[] buf = new byte[GUIConstants.FILE_SIZE];
int len = 0;
while ((len = fin.read(buf)) != -1) {
out.write(buf);
}
out.flush();
fin.close();

} catch (Exception e) {
//e.printStackTrace();
LOGGER.error(e.getMessage(), e);
}

}

/**
 * @param req HttpServletRequest
 * @param res HttpServletResponse
 * @throws ServletException servlet exception
 */
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException {
doGet(req, res);
}


Thanks and Regards

RE: How to create a No Action ActionForward

2004-02-24 Thread Jacqueline Gomes
I have a LoginAction which calls my class UserAuthorisation which implements Authorise.

Heres what I do within LoginAction:

auth = new UserAuthorisation(username,password);
if (auth.authenticate()) {  
  //save Subject in session
  Subject user = auth.getSubject(); 
  logger.debug(AUTHENTICATED USER); 
  HttpSession session = request.getSession(); 
  session.setAttribute(BNOnlineConstants.USER_SUBJECT,user); 
  return mapping.findForward(success);

These tutorials helped a lot:
 
http://www.mooreds.com/jaas.html

http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnAndAzn.html

-Original Message-
From: Carl [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 24 February 2004 5:21 PM
To: Struts Users Mailing List
Subject: Re: How to create a No Action ActionForward


Same question : JAAS, how did you get hold of the user's session? It's 
the last think I can't do.

Carl


Adam Hardy wrote:

 Jackie, auth-constraint lists the roles that are allowed access. If you
 have no roles, that means you need just one role for all. And you must
 enter it there. Having no roles listed means no-one has permission. Or
 you could try * for all roles (haven't tried it myself).
 
 Re: JAAS, how did you get hold of the user's session? I don't see any 
 way of obtaining access to it from the LoginModule.
 
 Adam
 
 On 02/24/2004 02:00 AM Jacqueline Gomes wrote:
 
 That sounds like a good idea!  However, I don't have any 'roles',
 they are just users that need to authenticate, and I wanted to secure
 blah/do/admin/*.  I couldn't implement the web.xml security either
 - this didn't work:

 security-constraint web-resource-collection 
 web-resource-nameBN_ONLINE Administration/web-resource-name 
 descriptionSecurity constraint for resources in the admin
 directory/description url-pattern/do/admin/*/url-pattern 
 http-methodPOST/http-method http-methodGET/http-method 
 /web-resource-collection auth-constraint/ /security-constraint

 Can you please send me any links to OSUser API - I've not heard of
 it.

 -Original Message- From: Nick Faiz
 [mailto:[EMAIL PROTECTED] Sent: Tuesday, 24 February 2004 8:53 AM 
 To: 'Struts Users Mailing List' Subject: RE: How to create a No
 Action ActionForward


 Guys, I'm at this point, myself, with an application sitting on the 
 back-burner. I've thought about an approach, which is slightly
 different to yours.

 I agree that declarative security in J2EE, for Servlets and JSP.s, 
 does not really seem to go far enough, at first glance.

 On the other hand, it has considerable benefits (the mappings of 
 roles, relying upon app. server controlled ACLs, etc.).

 Why not allow declarative security to do its work, then build the user 
 information in the session, based upon whether or not the user
 is in the correct role, etc.? This is what I plan to do - I'm using
 the OSUser API. I'll build its information, partly, by querying roles
 using the request, and relying upon WebLogic's internal LDAP server.


 Declarative security is passive; it actively doesn't `do' stuff but 
 only waits for someone to pass through something it secures. Users
 make requests to post, which can be mapped to an Action class. I
 don't see how they are at odds.

 Nick Faiz.



 -Original Message- From: Jacqueline Gomes
 [mailto:[EMAIL PROTECTED] Sent: Tuesday, 24 February 2004 11:38
 AM To: Struts Users Mailing List Subject: RE: How to create a No
 Action ActionForward

 Neither can I. There was no way with j_security_check that I could
 post to an Action class. So I implemented JAAS and in the module I
 interact with a Domain Facade that does the check with the database
 for a valid user.  I then construct a User object and put that in the
 session. Each of my jsp's has a check (done using an include) for the
 user object and if it does not exist then it redirects to the login
 page.

 If anyone wants any code, let me know!!

 Jackie.

 -Original Message- From: Carl [mailto:[EMAIL PROTECTED] 
 Sent: Monday, 23 February 2004 5:01 PM To: Struts Users Mailing List 
 Subject: Re: How to create a No Action ActionForward


 By integarting with struts, I mean to have a loginAction witch fill
 the session with data about the logged user.

 I can't see how to manage that with classic j_security_check.

 regards,

 Carl

 Adam Hardy wrote:


 Not having any roles effectively means from the container managed 
 security point of view that you have only one role.

 What problems did you have 'integrating' the container security? As
 far as your app is concerned, j_security_check is not something
 that is relevant. The whole login should be transparent to your
 app. As long as you map the security constraints correctly, the
 user will never see a protected page unless they login.

 Adam

 On 02/23/2004 08:54 AM Carl wrote:


 I've faced the same issue too

RE: How to create a No Action ActionForward

2004-02-23 Thread Jacqueline Gomes
Neither can I. There was no way with j_security_check that I could post to an Action 
class. So I implemented JAAS and in the module I interact with a Domain Facade that 
does the check with the database for a valid user.  I then construct a User object and 
put that in the session. Each of my jsp's has a check (done using an include) for the 
user object and if it does not exist then it redirects to the login page.

If anyone wants any code, let me know!!

Jackie.

-Original Message-
From: Carl [mailto:[EMAIL PROTECTED]
Sent: Monday, 23 February 2004 5:01 PM
To: Struts Users Mailing List
Subject: Re: How to create a No Action ActionForward


By integarting with struts, I mean to have a loginAction witch fill the 
session with data about the logged user.

I can't see how to manage that with classic j_security_check.

regards,

Carl

Adam Hardy wrote:

 Not having any roles effectively means from the container managed 
 security point of view that you have only one role.
 
 What problems did you have 'integrating' the container security? As far 
 as your app is concerned, j_security_check is not something that is 
 relevant. The whole login should be transparent to your app. As long as 
 you map the security constraints correctly, the user will never see a 
 protected page unless they login.
 
 Adam
 
 On 02/23/2004 08:54 AM Carl wrote:
 
 I've faced the same issue too. (using tomcat)
 To solve it I've found 2 options :
 - implement a filter witch intercept each request an redirect if 
 needed to the struts login action. It allow a good interaction with 
 struts but no securty by container.
 - use the container : I do that by adding a CUSTOM login scheme along 
 BASIC  FORM in org.apache.catalina.startup.Authenticators.properties. 
 It's like the filter solution but use roles and the security is 
 managed by the security constrains defined in web.xml. For now my 
 CUSTUM login is similar to the FORM login, so it's not intergrated 
 with struts, but I've planned to modify it soon.
 This second solution need too to define a Realm in Context :
 Realm className=org.apache.catalina.realm.JAASRealm
 appName=catalogue
 userClassNames=com.asserina.atypone.catalogue.impl.ClientImpl
 roleClassNames=com.asserina.atypone.catalogue.Role /

 (I'm using JAAS)

 To conclude I would say that the second option is far more powerfull 
 and addaptable to specific needs however you have too look close to :
 JAAS, custom Realm, Authenticators.properties and is tide to your 
 container (for me Tomcat)

 Let me know if you find quiker or simpler solutions,

 Regards,

 Carl



 Jacqueline Gomes wrote:

 Hi James,

 I was also trying to do the same thing, however, we are using JRun 
 and we don't have any user 'roles'. Specifically, I wanted the 
 container to do the authorisation i.e if a user tried to access any 
 pages after blah blah/admin/* then they would be redirected to the 
 login page if they have not logged in.  However, the application does 
 not have any 'roles' as such. The user is authenticated by calling a 
 stored procedure in the dbase.

 I tried to implement the j_security_check also but was having a tough 
 time integrating it with the actionform etc.
 Do you have any ideas as to how I would do this given that I don't 
 have any user roles in the application?  I was going to add a 'user' 
 object in the session and check on each page if it exists. If it 
 doesn't then redirect the user back to the login page.  I have set 
 the session.setMaxInactiveInterval(72000);

 Any help would be appreciated.

 Thanks, Jackie.

 -Original Message-
 From: James Adams [mailto:[EMAIL PROTECTED]
 Sent: Monday, 23 February 2004 4:43 AM
 To: Struts Mailing List
 Subject: Re: How to create a No Action ActionForward


 I think Srikanth has hit the nail on the head, in that
 I am not fully utilizing what is already available
 with vanilla J2EE, namely security roles,
 authorization constraints, and error pages, all of
 which I can declare in the deployment descriptor of my
 web app.  But I still want to use a Struts component
 for the authentication instead of a more traditional
 form-based authentication scheme.

 Let me outline below what is, I think, a much better
 approach and kindly ask for comments, as I'm not
 certain that this will work or if it's actually the
 smartest way to go.

 I would like to use a Struts Action class to handle my
 login form, instead of vanilla form-based
 authentication, i.e. j_security_check, for two
 reasons: 1) form-based authentication is not very
 secure since it passes the user name and password
 across the network in clear text, and 2) I want to use
 a LDAP server (within my login Action class) to do the
 authentication, and this would not be possible using
 plain form-based authentication.

 So the plan is to have a form in my Login.jsp with the
 form's action being the login Action class.  The login
 Action class will connect to the LDAP server

RE: How to create a No Action ActionForward

2004-02-23 Thread Jacqueline Gomes
That sounds like a good idea!  However, I don't have any 'roles', they are just users 
that need to authenticate, and I wanted to secure blah/do/admin/*.  I couldn't 
implement the web.xml security either - this didn't work:

security-constraint
web-resource-collection
web-resource-nameBN_ONLINE Administration/web-resource-name
descriptionSecurity constraint for resources in the admin 
directory/description
url-pattern/do/admin/*/url-pattern
http-methodPOST/http-method
http-methodGET/http-method  
/web-resource-collection
auth-constraint/
/security-constraint

Can you please send me any links to OSUser API - I've not heard of it.

-Original Message-
From: Nick Faiz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 24 February 2004 8:53 AM
To: 'Struts Users Mailing List'
Subject: RE: How to create a No Action ActionForward


Guys,
I'm at this point, myself, with an application sitting on the
back-burner. I've thought about an approach, which is slightly different to
yours. 

I agree that declarative security in J2EE, for Servlets and JSP.s,
does not really seem to go far enough, at first glance.

On the other hand, it has considerable benefits (the mappings of
roles, relying upon app. server controlled ACLs, etc.).

Why not allow declarative security to do its work, then build the
user information in the session, based upon whether or not the user is in
the correct role, etc.? This is what I plan to do - I'm using the OSUser
API. I'll build its information, partly, by querying roles using the
request, and relying upon WebLogic's internal LDAP server. 

Declarative security is passive; it actively doesn't `do' stuff but
only waits for someone to pass through something it secures. Users make
requests to post, which can be mapped to an Action class. I don't see how
they are at odds.

Nick Faiz.



-Original Message-
From: Jacqueline Gomes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 24 February 2004 11:38 AM
To: Struts Users Mailing List
Subject: RE: How to create a No Action ActionForward

Neither can I. There was no way with j_security_check that I could post to
an Action class. So I implemented JAAS and in the module I interact with a
Domain Facade that does the check with the database for a valid user.  I
then construct a User object and put that in the session. Each of my jsp's
has a check (done using an include) for the user object and if it does not
exist then it redirects to the login page.

If anyone wants any code, let me know!!

Jackie.

-Original Message-
From: Carl [mailto:[EMAIL PROTECTED]
Sent: Monday, 23 February 2004 5:01 PM
To: Struts Users Mailing List
Subject: Re: How to create a No Action ActionForward


By integarting with struts, I mean to have a loginAction witch fill the 
session with data about the logged user.

I can't see how to manage that with classic j_security_check.

regards,

Carl

Adam Hardy wrote:

 Not having any roles effectively means from the container managed 
 security point of view that you have only one role.
 
 What problems did you have 'integrating' the container security? As far 
 as your app is concerned, j_security_check is not something that is 
 relevant. The whole login should be transparent to your app. As long as 
 you map the security constraints correctly, the user will never see a 
 protected page unless they login.
 
 Adam
 
 On 02/23/2004 08:54 AM Carl wrote:
 
 I've faced the same issue too. (using tomcat)
 To solve it I've found 2 options :
 - implement a filter witch intercept each request an redirect if 
 needed to the struts login action. It allow a good interaction with 
 struts but no securty by container.
 - use the container : I do that by adding a CUSTOM login scheme along 
 BASIC  FORM in org.apache.catalina.startup.Authenticators.properties. 
 It's like the filter solution but use roles and the security is 
 managed by the security constrains defined in web.xml. For now my 
 CUSTUM login is similar to the FORM login, so it's not intergrated 
 with struts, but I've planned to modify it soon.
 This second solution need too to define a Realm in Context :
 Realm className=org.apache.catalina.realm.JAASRealm
 appName=catalogue
 userClassNames=com.asserina.atypone.catalogue.impl.ClientImpl
 roleClassNames=com.asserina.atypone.catalogue.Role /

 (I'm using JAAS)

 To conclude I would say that the second option is far more powerfull 
 and addaptable to specific needs however you have too look close to :
 JAAS, custom Realm, Authenticators.properties and is tide to your 
 container (for me Tomcat)

 Let me know if you find quiker or simpler solutions,

 Regards,

 Carl



 Jacqueline Gomes wrote:

 Hi James,

 I was also trying to do the same thing, however, we are using JRun 
 and we

RE: How to create a No Action ActionForward

2004-02-22 Thread Jacqueline Gomes
Hi James,

I was also trying to do the same thing, however, we are using JRun and we don't have 
any user 'roles'.  

Specifically, I wanted the container to do the authorisation i.e if a user tried to 
access any pages after blah blah/admin/* then they would be redirected to the login 
page if they have not logged in.  However, the application does not have any 'roles' 
as such. The user is authenticated by calling a stored procedure in the dbase.

I tried to implement the j_security_check also but was having a tough time integrating 
it with the actionform etc. 

Do you have any ideas as to how I would do this given that I don't have any user roles 
in the application?  I was going to add a 'user' object in the session and check on 
each page if it exists. If it doesn't then redirect the user back to the login page.  
I have set the session.setMaxInactiveInterval(72000);

Any help would be appreciated.

Thanks, Jackie.

-Original Message-
From: James Adams [mailto:[EMAIL PROTECTED]
Sent: Monday, 23 February 2004 4:43 AM
To: Struts Mailing List
Subject: Re: How to create a No Action ActionForward


I think Srikanth has hit the nail on the head, in that
I am not fully utilizing what is already available
with vanilla J2EE, namely security roles,
authorization constraints, and error pages, all of
which I can declare in the deployment descriptor of my
web app.  But I still want to use a Struts component
for the authentication instead of a more traditional
form-based authentication scheme.

Let me outline below what is, I think, a much better
approach and kindly ask for comments, as I'm not
certain that this will work or if it's actually the
smartest way to go.

I would like to use a Struts Action class to handle my
login form, instead of vanilla form-based
authentication, i.e. j_security_check, for two
reasons: 1) form-based authentication is not very
secure since it passes the user name and password
across the network in clear text, and 2) I want to use
a LDAP server (within my login Action class) to do the
authentication, and this would not be possible using
plain form-based authentication.

So the plan is to have a form in my Login.jsp with the
form's action being the login Action class.  The login
Action class will connect to the LDAP server and try
to authenticate using the username and password
supplied as form inputs.  If the authentication
succeeds then the user's session is set with the
user's role (also retrieved from the LDAP server), and
then the control is forwarded to the first logged in
welcome page.  If the authentication fails then the
appropriate error message (Login failed - try again)
will be added to the ActionErrors and control is
forwarded back to the login page, which will display
the ActionError message via a html:errors tag, and
allow the user to try again.

In order to accomplish session authorization of a
session for each *.jsp of the application I will
declare a security constraint in the web.xml, like so:

security-constraint
web-resource-collection
web-resource-name
Restricted Pages
/web-resource-name
url-pattern*.jsp/url-pattern
/web-resource-collection
auth-constraint
role-nameadmin/role-name
role-namecustomer/role-name
/auth-constraint
/security-constraint


With the above I will get automatic checking of the
user's role by the container at each access of any
*.jsp, and anyone accessing a *.jsp without an
appropriate role set in their session will not be
allowed to access the page.  If the user is not in the
appropriate role then I can forward to an error page
by declaring an error-page in the deployment
descriptor.

The above authorization strategy takes care of what I
was trying to accomplish with my SessionValidator
Action class idea from before, which was to check for
a loggedIn session attribute before allowing a user
to continue with page processing.  In fact it is even
better, in that it allows the flexibility of allowing
different roles and authorization of pages based on
roles and not just on a single loggedIn flag.  

I am not sure how I will programmatically set the
user's role in the login Action class execute()
method.  Is it as simple as just setting a session
attribute named role ?

Thanks in advance for your insight.


-James


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-
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]



multiple parameters within iterate loop

2004-02-18 Thread Jacqueline Gomes
Hi All,

I have a question regarding sending multiple parameters through a html:link tag.

I understand that you can set it up like this:

%
 java.util.HashMap paramValuesExtract = new java.util.HashMap(); 
 paramValuesExtract.put(nextAction,BNOnlineConstants.NEXT_ACTION_EXTRACT_PDF);   
 
 request.setAttribute(paramValuesExtract,paramValuesExtract);  
% 
 
html:link page=/do/extract/retrieveExtractSearch
  target=_blank  
  name=paramValuesExtractClick to retrieve extract/html:link 

However, I have dynamic values within a bean that I want to send through to the link.
I have a collection retrieveExtractDetails from which I am reading attributes.  I want 
to attach extractId and organisationId to the link as name/value pairs.

logic:iterate id=retrieveExtractDetails name=extracts

html:link page=/do/extract/retrieveExtractSearch
  target=_blank  
  name=paramValuesExtractClick to retrieve 
extract/html:link 

/logic:iterate

Any advice would be apprciated.

Thanks,

Jackie. 

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



Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes
Hi All,

I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One 
of the properties of adminReceipts is a list.  So I display the normal string 
properties of the object, such as receiptNumber and transactionDate, but can't then 
get the list adminPaymentDetails within the adminReceipts object.

I am trying to execute the following code:

  logic:iterate id=adminReceipts name=paymntTrnsctns
div id=ExtractResults style=width: 760px; background-color: #FF; border: 
1px; padding: 1px; margin: 0px auto;  
  table width=100% border=1 cellpadding=0 cellspacing=0
tr class=extractResultsTRHeading bgcolor=#FF
  td class=extractResultsTD
bean:message key=prompt.label.receiptNumber/
  /td 
  td class=extractResultsTD
bean:message key=prompt.label.dateTime/
  /td
/tr
tr class=extractResultsTRHeading bgcolor=jsp:getProperty 
name=colour property=next/
  td class=extractResultsTD
bean:write name=adminReceipts property=receiptNumber/
  /td
  td class=extractResultsTD
bean:write name=adminReceipts property=transactionDate/ 
  /td
/tr   
  /table
/div  
logic:iterate id=adminPaymentDetails name=adminReceipts
  /logic:iterate
/logic:iterate

Can anyone please tell me what I'm doing wrong.

Thanks,

Jackie.

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



Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes

 I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. 
 One of the properties of adminReceipts is a list.  So I display the normal string 
 properties of the object, such as receiptNumber and transactionDate, but can't then 
 get the list adminPaymentDetails within the adminReceipts object.
 
 I am trying to execute the following code:
 
   logic:iterate id=adminReceipts name=paymntTrnsctns
 div id=ExtractResults style=width: 760px; background-color: #FF; border: 
 1px; padding: 1px; margin: 0px auto;  
   table width=100% border=1 cellpadding=0 cellspacing=0
   tr class=extractResultsTRHeading bgcolor=#FF
 td class=extractResultsTD
   bean:message key=prompt.label.receiptNumber/
 /td 
 td class=extractResultsTD
   bean:message key=prompt.label.dateTime/
 /td
   /tr
   tr class=extractResultsTRHeading bgcolor=jsp:getProperty 
 name=colour property=next/
 td class=extractResultsTD
   bean:write name=adminReceipts property=receiptNumber/
 /td
 td class=extractResultsTD
   bean:write name=adminReceipts property=transactionDate/ 
 /td
   /tr   
 /table
   /div  
   logic:iterate id=adminPaymentDetails name=adminReceipts
   /logic:iterate
 /logic:iterate
 
 Can anyone please tell me what I'm doing wrong.
 
 Thanks,
 
 Jackie.

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



RE: Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes
I did put a bean:write in there and it still doesn't work.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 5:35 PM
To: Struts Users Mailing List
Subject: Re: Logic Iterate - Cannot Create iterator for this collection


I have not looked at this closely, but I notice there is no write in the 
nested iterator.  Can you say what happens with this when you run it?

At 01:06 AM 2/4/2004, you wrote:
Hi All,

I have a List collection (paymntTrnsctns) which contains an adminReceipts 
objects. One of the properties of adminReceipts is a list.  So I display 
the normal string properties of the object, such as receiptNumber and 
transactionDate, but can't then get the list adminPaymentDetails within 
the adminReceipts object.

I am trying to execute the following code:

   logic:iterate id=adminReceipts name=paymntTrnsctns
 div id=ExtractResults style=width: 760px; background-color: 
 #FF; border: 1px; padding: 1px; margin: 0px auto;
   table width=100% border=1 cellpadding=0 cellspacing=0
 tr class=extractResultsTRHeading bgcolor=#FF
   td class=extractResultsTD
 bean:message key=prompt.label.receiptNumber/
   /td
   td class=extractResultsTD
 bean:message key=prompt.label.dateTime/
   /td
 /tr
 tr class=extractResultsTRHeading 
 bgcolor=jsp:getProperty name=colour property=next/
   td class=extractResultsTD
 bean:write name=adminReceipts 
 property=receiptNumber/
   /td
   td class=extractResultsTD
 bean:write name=adminReceipts 
 property=transactionDate/
   /td
 /tr
   /table
 /div
 logic:iterate id=adminPaymentDetails name=adminReceipts
   /logic:iterate
/logic:iterate

Can anyone please tell me what I'm doing wrong.

Thanks,

Jackie.

-
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]


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



RE: Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes
I am still getting Cannot Create Iterator for this collection error.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 5:42 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate - Cannot Create iterator for this collection


What happens?


At 01:36 AM 2/4/2004, you wrote:
I did put a bean:write in there and it still doesn't work.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 5:35 PM
To: Struts Users Mailing List
Subject: Re: Logic Iterate - Cannot Create iterator for this collection


I have not looked at this closely, but I notice there is no write in the
nested iterator.  Can you say what happens with this when you run it?

At 01:06 AM 2/4/2004, you wrote:
 Hi All,
 
 I have a List collection (paymntTrnsctns) which contains an adminReceipts
 objects. One of the properties of adminReceipts is a list.  So I display
 the normal string properties of the object, such as receiptNumber and
 transactionDate, but can't then get the list adminPaymentDetails within
 the adminReceipts object.
 
 I am trying to execute the following code:
 
logic:iterate id=adminReceipts name=paymntTrnsctns
  div id=ExtractResults style=width: 760px; background-color:
  #FF; border: 1px; padding: 1px; margin: 0px auto;
table width=100% border=1 cellpadding=0 cellspacing=0
  tr class=extractResultsTRHeading bgcolor=#FF
td class=extractResultsTD
  bean:message key=prompt.label.receiptNumber/
/td
td class=extractResultsTD
  bean:message key=prompt.label.dateTime/
/td
  /tr
  tr class=extractResultsTRHeading
  bgcolor=jsp:getProperty name=colour property=next/
td class=extractResultsTD
  bean:write name=adminReceipts
  property=receiptNumber/
/td
td class=extractResultsTD
  bean:write name=adminReceipts
  property=transactionDate/
/td
  /tr
/table
  /div
  logic:iterate id=adminPaymentDetails name=adminReceipts
/logic:iterate
 /logic:iterate
 
 Can anyone please tell me what I'm doing wrong.
 
 Thanks,
 
 Jackie.
 
 -
 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]


-
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]


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



RE: Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes
RUN/servers/bnonline/bnonline.war
04/02 18:05:58 info [axis]   getConnection()
04/02 18:05:58 info [axis]Check for timeout, activeCount=1, useCount=1
04/02 18:05:58 info [axis]Found available connection
04/02 18:05:58 info [axis]Return allocated connection, activeCount=1, useCou
nt=2
04/02 18:05:58 user FileServlet: destroy
04/02 18:05:58 info 1 session(s) persisted
04/02 18:05:58 info Removing web application service from servlet engine service
: bnonline.war
04/02 18:05:59 info Deploying web application file:/C:/Tools/JRUN/servers/bnonl
ine/bnonline.war from: file:/C:/Tools/JRUN/servers/bnonline/bnonline.war
04/02 18:05:59 user JSPServlet: init
04/02 18:05:59 user action: init
04/02 18:05:59 info [axis] Initializing, config='org.apache.struts.util.LocalStr
ings', returnNull=true04/02 18:05:59 error [axis] Parse Error at line 215 column
 -1: Element action does not allow text.
org.xml.sax.SAXParseExcept
04/02 18:05:59 info [axis] Initializing, config='org.apache.struts.action.Action
Resources', returnNull=true
ion: Element action does not allow text.
at org.apache.crimson.parser.Parser2.error(Parser2.java:3317)
at org.apache.crimson.parser.ValidatingParser$ChildrenValidator.text(Val
idatingParser.java:355)
at org.apache.crimson.parser.InputEntity.parsedContent(InputEntity.java:
597)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1973)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)

at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
java:1208)
at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
ice.java:763)
at jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
va:258)
at jrun.deployment.DeployerService.initModules(DeployerService.java:711)

at jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
ce.java:242)
at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
Here's the stack trace.


04/02 18:09:09 info [axis] Initializing, config='org.apache.struts.taglib.logic.
LocalStrings', returnNull=true04/02 18:09:09 error Unhandled exception thrown fr
om /admin/adm_obtain_extract_results.jsp:81
[1]javax.servlet.jsp.JspException
04/02 18:09:09 info [axis] Initializing, config='org.apache.struts.taglib.bean.L
ocalStrings', returnNull=true
: Cannot create iterator for this collection
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:
310)
at jrun__admin__adm_obtain_extract_results2ejsp25._jspService(jrun__admi
n__adm_obtain_extract_results2ejsp25.java:478)
at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
at jrun.jsp.JSPServlet.service(JSPServlet.java:106)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.j
ava:414)
at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatche
r.java:387)
at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java
:172)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.
java:1069)
at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques
tProcessor.java:455)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:
241)
at 

RE: Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes
Sorry Michael.  I do that in a jsp page.

  logic:iterate id=adminReceipts name=paymntTrnsctns
div id=ExtractResults style=width: 760px; background-color:
#FF; border: 1px; padding: 1px; margin: 0px auto;
  table width=100% border=1 cellpadding=0 cellspacing=0
tr class=extractResultsTRHeading bgcolor=#FF
  td class=extractResultsTD
bean:message key=prompt.label.receiptNumber/
  /td
  td class=extractResultsTD
bean:message key=prompt.label.dateTime/
  /td
/tr
tr class=extractResultsTRHeading
bgcolor=jsp:getProperty name=colour property=next/
  td class=extractResultsTD
bean:write name=adminReceipts
property=receiptNumber/
  /td
  td class=extractResultsTD
bean:write name=adminReceipts
property=transactionDate/
  /td
/tr
  /table
/div
bean:write name=adminReceipts property=adminPaymentDetails/
   /logic:iterate

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 6:14 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate - Cannot Create iterator for this collection


If you do this where?  You are not giving enough information.  Either give 
it up or I have to retire.  Thanks.


At 02:07 AM 2/4/2004, you wrote:
if I do a bean:write name=adminReceipts property=adminPaymentDetails/
I get
[EMAIL PROTECTED]
So I know that the element is there!!

I will send a stack trace in a second.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 5:50 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate - Cannot Create iterator for this collection


Could you please give more details?  Show me the stack trace or whatever
you are seeing.

At 01:44 AM 2/4/2004, you wrote:
 I am still getting Cannot Create Iterator for this collection error.
 
 -Original Message-
 From: Michael McGrady [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 4 February 2004 5:42 PM
 To: Struts Users Mailing List
 Subject: RE: Logic Iterate - Cannot Create iterator for this collection
 
 
 What happens?
 
 
 At 01:36 AM 2/4/2004, you wrote:
  I did put a bean:write in there and it still doesn't work.
  
  -Original Message-
  From: Michael McGrady [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 4 February 2004 5:35 PM
  To: Struts Users Mailing List
  Subject: Re: Logic Iterate - Cannot Create iterator for this collection
  
  
  I have not looked at this closely, but I notice there is no write in the
  nested iterator.  Can you say what happens with this when you run it?
  
  At 01:06 AM 2/4/2004, you wrote:
   Hi All,
   
   I have a List collection (paymntTrnsctns) which contains an 
 adminReceipts
   objects. One of the properties of adminReceipts is a list.  So I display
   the normal string properties of the object, such as receiptNumber and
   transactionDate, but can't then get the list adminPaymentDetails within
   the adminReceipts object.
   
   I am trying to execute the following code:
   
  logic:iterate id=adminReceipts name=paymntTrnsctns
div id=ExtractResults style=width: 760px; background-color:
#FF; border: 1px; padding: 1px; margin: 0px auto;
  table width=100% border=1 cellpadding=0 cellspacing=0
tr class=extractResultsTRHeading bgcolor=#FF
  td class=extractResultsTD
bean:message key=prompt.label.receiptNumber/
  /td
  td class=extractResultsTD
bean:message key=prompt.label.dateTime/
  /td
/tr
tr class=extractResultsTRHeading
bgcolor=jsp:getProperty name=colour property=next/
  td class=extractResultsTD
bean:write name=adminReceipts
property=receiptNumber/
  /td
  td class=extractResultsTD
bean:write name=adminReceipts
property=transactionDate/
  /td
/tr
  /table
/div
logic:iterate id=adminPaymentDetails name=adminReceipts
  /logic:iterate
   /logic:iterate
   
   Can anyone please tell me what I'm doing wrong.
   
   Thanks,
   
   Jackie.
   
   -
   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 

RE: Logic Iterate - Cannot Create iterator for this collection

2004-02-04 Thread Jacqueline Gomes
Oh, i see. Nope, it isn't.  Its an object that should be in a collection! doh!!

Thanks very much Michael.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 6:22 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate - Cannot Create iterator for this collection


Is [EMAIL PROTECTED] a collection?

At 02:07 AM 2/4/2004, you wrote:
if I do a bean:write name=adminReceipts property=adminPaymentDetails/
I get
[EMAIL PROTECTED]
So I know that the element is there!!

I will send a stack trace in a second.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 February 2004 5:50 PM
To: Struts Users Mailing List
Subject: RE: Logic Iterate - Cannot Create iterator for this collection


Could you please give more details?  Show me the stack trace or whatever
you are seeing.

At 01:44 AM 2/4/2004, you wrote:
 I am still getting Cannot Create Iterator for this collection error.
 
 -Original Message-
 From: Michael McGrady [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 4 February 2004 5:42 PM
 To: Struts Users Mailing List
 Subject: RE: Logic Iterate - Cannot Create iterator for this collection
 
 
 What happens?
 
 
 At 01:36 AM 2/4/2004, you wrote:
  I did put a bean:write in there and it still doesn't work.
  
  -Original Message-
  From: Michael McGrady [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 4 February 2004 5:35 PM
  To: Struts Users Mailing List
  Subject: Re: Logic Iterate - Cannot Create iterator for this collection
  
  
  I have not looked at this closely, but I notice there is no write in the
  nested iterator.  Can you say what happens with this when you run it?
  
  At 01:06 AM 2/4/2004, you wrote:
   Hi All,
   
   I have a List collection (paymntTrnsctns) which contains an 
 adminReceipts
   objects. One of the properties of adminReceipts is a list.  So I display
   the normal string properties of the object, such as receiptNumber and
   transactionDate, but can't then get the list adminPaymentDetails within
   the adminReceipts object.
   
   I am trying to execute the following code:
   
  logic:iterate id=adminReceipts name=paymntTrnsctns
div id=ExtractResults style=width: 760px; background-color:
#FF; border: 1px; padding: 1px; margin: 0px auto;
  table width=100% border=1 cellpadding=0 cellspacing=0
tr class=extractResultsTRHeading bgcolor=#FF
  td class=extractResultsTD
bean:message key=prompt.label.receiptNumber/
  /td
  td class=extractResultsTD
bean:message key=prompt.label.dateTime/
  /td
/tr
tr class=extractResultsTRHeading
bgcolor=jsp:getProperty name=colour property=next/
  td class=extractResultsTD
bean:write name=adminReceipts
property=receiptNumber/
  /td
  td class=extractResultsTD
bean:write name=adminReceipts
property=transactionDate/
  /td
/tr
  /table
/div
logic:iterate id=adminPaymentDetails name=adminReceipts
  /logic:iterate
   /logic:iterate
   
   Can anyone please tell me what I'm doing wrong.
   
   Thanks,
   
   Jackie.
   
   -
   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]
  
  
  -
  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]
 
 
 -
 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]


-
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]


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