RE: How can I transfer a file to a struts based web application f rom a java application

2006-06-22 Thread Shoukat, Faisal
U could try sending it as an attachment in a SOPA message

-Original Message-
From: Steve Bosman [mailto:[EMAIL PROTECTED] 
Sent: 22 June 2006 11:27
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: How can I transfer a file to a struts based web application
from a java application

Thanks, but I don't see how JFileChooser will help - my application
can already obtain a File what I don't get is how to transfer the file
via http to be processed by the struts application.

Steve

On 6/19/06, Mukta <[EMAIL PROTECTED]> wrote:
> Try using JFileChooser
>
>
> -Original Message-
> From: Steve Bosman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 14, 2006 2:58 PM
> To: Struts User Mailing List
> Subject: How can I transfer a file to a struts based web application from
a
> java application
>
> Hi,
>
> I have a struts 1.1 application with an Action that processes a file
> obtained using an ActionForm containing a
> org.apache.struts.upload.FormFile parameter, I want to use this action
> from a java application and would be really grateful if someone could
> give me pointers on how to do this using URLConnection. I've used
> URLConnection before, it's just the file transfer that has me stumped.
>

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



 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: Bean Information not Displaying on Failed Validation

2006-06-20 Thread Shoukat, Faisal
Is your form in the session scope in the struts-config.xml?

-Original Message-
From: Wiles, Cory [mailto:[EMAIL PROTECTED] 
Sent: 20 June 2006 03:54
To: user@struts.apache.org
Subject: Bean Information not Displaying on Failed Validation

I have a form that a user fills out, selects from a dropdown of a recipients
and when they click submit the form it is submitted to the recipient they
choose.  In the email that the recipient receives it has a display of the
filled in form information and a link at the bottom that the user can click
on that will take them to the form information so that they can edit it and
resubmit it to someone else.  There are certain fields which are validated
against some regular expressions in the validate() method.  My problem
arises when a user is editing a form and if there is a validation error
found in the validate() method then the form information is not displayed,
only the error message(s).

So the flow would be like this.

(input) index.jsp -> inventoryChange.do

email link is http://host.name/context_name/getInventoryAction.do?id=40

user would edit the form with id of 40, hit submit:

http://host.name/context_name/getInventoryAction.do?id=40 ->
http://host.name/context_name/updateInventoryAction.do

if the form fails "validate()" validation then all you see is:

*Error message
submit button and reset button

The form information isn't displaying.  Both action mappings are using the
same backin-bean so I don't understand why it isn't retaining the form
information if validation fails.  Any insight would be GREATLY appreciated.

Thanks...


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


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: evaluating list backed action form value in javascript

2006-06-14 Thread Shoukat, Faisal
Ok, I tried the following which was using a input tag as normal: 

" size="20"
onblur="calculate(this.value,
'',
'',
'',
'')"/>

The this.value parameter passes the correct value to my javascript function
and I can submit it to the action class.  However I now run into a issue
when I try to load the data back into the form as I have lost all my values.
They come back from the DB ok but are lost in creating the tag.  I have also
tried it with value="" in the input tag but then this does not submit the
values correctly. So I had to take the value="" out to get it to submit
correctly.

If I had "
size="20" onblur="<%=jsFunction%>"/> then this brings back the correct value
to display however then I am back at the problem I started with which is how
to pass the value of the element to the JS function.

Is there anyway I can pass  as a parameter to a function into the  of struts without using the   

-Original Message-
From: Shoukat, Faisal 
Sent: 14 June 2006 11:51
To: 'Struts Users Mailing List'
Subject: evaluating list backed action form value in javascript

Hi,

I am using a list backed action form and need some advice on how to get the
value from the html:text box so I can do some logic with it in a javascript
function.

In my case I have the following:

" size="20"
onblur="<%=jsFunction%>"/>

My jsFunction is as follows:


 javascript:calculate('<%="benefits[" + index.intValue() + "].value"%>',
'',
'',
'',
'')
   

The problem I am having is how to get the actual value entered in the text
box and pass this into the function (i.e 12000 instead of what is actually
being sent which is <%="benefits[0].value"%>). So it would be the parameter
<%="benefits[" + index.intValue() + "].value"%> of the calculate function.

Thanks in adavce
Faisal

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



evaluating list backed action form value in javascript

2006-06-14 Thread Shoukat, Faisal
Hi,

I am using a list backed action form and need some advice on how to get the
value from the html:text box so I can do some logic with it in a javascript
function.

In my case I have the following:

" size="20"
onblur="<%=jsFunction%>"/>

My jsFunction is as follows:


 javascript:calculate('<%="benefits[" + index.intValue() + "].value"%>',
'',
'',
'',
'')
   

The problem I am having is how to get the actual value entered in the text
box and pass this into the function (i.e 12000 instead of what is actually
being sent which is <%="benefits[0].value"%>). So it would be the parameter
<%="benefits[" + index.intValue() + "].value"%> of the calculate function.

Thanks in adavce
Faisal

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



check invalid date with validator framework

2006-06-09 Thread Shoukat, Faisal
Hi

Is there a way to check if the date is a valid date in the validator
framework.  If I enter a invalid date such as 67/06/2006 it returns me the
error message Created Date is not a valid date format (dd/mm/).

Which is the error.date in my message resources.  However I want to not
check the format in this case but want it to check that the 67 is invalid?

Thanks

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



RE: Adding JSP tag as a parameter to another jsp tag

2006-06-06 Thread Shoukat, Faisal
Is there an equivalent of this with struts libraires



-Original Message-
From: Samere, Adam J [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2006 14:02
To: Struts Users Mailing List
Subject: RE: Adding JSP tag as a parameter to another jsp tag

Assuming your test:example tag's property attribute supports
expressions, you could set the value of the  into a
page scoped variable then write it into the property attribute using an
expression. For example, using c:set from JSTL:




-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 8:54 AM
To: Struts Users Mailing List
Subject: RE: Adding JSP tag as a parameter to another jsp tag

Hi,

Can anyone advise on how to call a jsp tag as a parameter to another jsp
tag:

For example: (this is completely hypothetical but matches my case)



Now in the property element I Want to call another tag which is already
written which returns me the string required for example


So it would look like 



However I don't know how to add the second tag

Any one know?

Thanks


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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: Adding JSP tag as a parameter to another jsp tag

2006-06-06 Thread Shoukat, Faisal
Hi,

Can anyone advise on how to call a jsp tag as a parameter to another jsp
tag:

For example: (this is completely hypothetical but matches my case)



Now in the property element I Want to call another tag which is already
written which returns me the string required for example


So it would look like 



However I don't know how to add the second tag

Any one know?

Thanks


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



Adding JSP tag as a parameter to another jsp tag

2006-06-06 Thread Shoukat, Faisal
Hi,

Can anyone advise on how to call a jsp tag as a parameter to another jsp
tag:

For example: (this is completely hypothetical but matches my case)



Now in the property element I Want to call another tag which is already
written which returns me the string required for example


So it would look like 


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



RE: dispatch action error

2006-06-02 Thread Shoukat, Faisal
I did some debugging on the getMethod() and when I submit the form the
request.getParameter() first time returns '' then in the same request
changeStatus parameter is found.

So its not that the form is not passing the parameter because it does, the
issue I don't understand is why would it pass '' initially then in the same
request it finds the correct parameter

Any pointers

-Original Message-
From: Samere, Adam J [mailto:[EMAIL PROTECTED] 
Sent: 02 June 2006 13:09
To: Struts Users Mailing List
Subject: RE: dispatch action error

I don't think your method param is being passed when the form is
submitted. You should probably make the parameters you are passing in
the query string hidden fields on the form you are submitting. If you
need to dynamically set the method parameter you can then do so in the
onclick event of the anchor element.

  




[Submit]

-Adam

-----Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 5:35 AM
To: Struts Users Mailing List
Subject: dispatch action error

Hi Guys,

 

I am after some advice with the following:

 

I am submitting a form which has the value as selected in a drop down.
>From my struts config.xml it forwards to the correct dispatch action
class method. And does the processing within that method.  However just
before returning to the next jsp it throws the logging exception
recorded below where it states that I have tried to call a dispatch
action class with a parameter of ''. I don't understand why it makes
this second call.

 

I submit the form with the following link: 

 

   

  ?method=changeStatus&applicantId= "

 
onclick="javascript:document.forms.applicationDetailsForm.submit();retur
n
false;">[Submit]

  

 

I have tried it with return false and without it.

 

Can anybody advise on this?

 

Thanks

 

10:08:12,253 DEBUG [LoginBarFilter] In doFilter() for request:
[EMAIL PROTECTED]

10:08:12,253 DEBUG [LoginBarFilter] checking access level

10:08:12,253 INFO  [LoginBarFilter] Level determined as SAVSUB

10:08:12,253 INFO  [LoginBarFilter] storing access level SAVSUB to
session with key access

10:08:12,253 INFO  [LoginBarFilter] setting module name for css to
AYRECRUIT

10:08:12,269 DEBUG [LoginBarFilter] Branding URL from DB = 

10:08:12,269 DEBUG [ModuleUtils] Get module name for path
/web/applicationDetails.do

10:08:12,269 DEBUG [ModuleUtils] Module name found: default

10:08:12,269 DEBUG [RequestProcessor] Processing a 'GET' for path
'/web/applicationDetails'

10:08:12,269 DEBUG [RequestUtils]  Looking for ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestUtils]  Can recycle existing ActionForm
instance of type 'abc.forms.ApplicationDetailsForm'?: true

10:08:12,269 DEBUG [RequestUtils]  -->
[EMAIL PROTECTED]

10:08:12,269 DEBUG [RequestProcessor]  Storing ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestProcessor]  Populating bean properties from
this request

10:08:12,269 DEBUG [RequestProcessor]  Looking for Action instance for
class abc.actions.ApplicationDetailsAction

10:08:12,269 DEBUG [RequestProcessor]   Returning existing Action
instance

10:08:12,269 ERROR [DispatchAction] Action[/web/applicationDetails] does
not contain method named ''

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:419)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

at
org.apache.struts.acti

dispatch action error

2006-06-02 Thread Shoukat, Faisal
Hi Guys,

 

I am after some advice with the following:

 

I am submitting a form which has the value as selected in a drop down.  From
my struts config.xml it forwards to the correct dispatch action class
method. And does the processing within that method.  However just before
returning to the next jsp it throws the logging exception recorded below
where it states that I have tried to call a dispatch action class with a
parameter of ''. I don't understand why it makes this second call.

 

I submit the form with the following link: 

 

   

  ?method=changeStatus&applicantId= "

 
onclick="javascript:document.forms.applicationDetailsForm.submit();return
false;">[Submit]

  

 

I have tried it with return false and without it.

 

Can anybody advise on this?

 

Thanks

 

10:08:12,253 DEBUG [LoginBarFilter] In doFilter() for request:
[EMAIL PROTECTED]

10:08:12,253 DEBUG [LoginBarFilter] checking access level

10:08:12,253 INFO  [LoginBarFilter] Level determined as SAVSUB

10:08:12,253 INFO  [LoginBarFilter] storing access level SAVSUB to session
with key access

10:08:12,253 INFO  [LoginBarFilter] setting module name for css to AYRECRUIT

10:08:12,269 DEBUG [LoginBarFilter] Branding URL from DB = 

10:08:12,269 DEBUG [ModuleUtils] Get module name for path
/web/applicationDetails.do

10:08:12,269 DEBUG [ModuleUtils] Module name found: default

10:08:12,269 DEBUG [RequestProcessor] Processing a 'GET' for path
'/web/applicationDetails'

10:08:12,269 DEBUG [RequestUtils]  Looking for ActionForm bean instance in
scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestUtils]  Can recycle existing ActionForm instance
of type 'abc.forms.ApplicationDetailsForm'?: true

10:08:12,269 DEBUG [RequestUtils]  -->
[EMAIL PROTECTED]

10:08:12,269 DEBUG [RequestProcessor]  Storing ActionForm bean instance in
scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestProcessor]  Populating bean properties from this
request

10:08:12,269 DEBUG [RequestProcessor]  Looking for Action instance for class
abc.actions.ApplicationDetailsAction

10:08:12,269 DEBUG [RequestProcessor]   Returning existing Action instance

10:08:12,269 ERROR [DispatchAction] Action[/web/applicationDetails] does not
contain method named ''

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMapping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:322)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
262)

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMapping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:419)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:322)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
262)

at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)

at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:419)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:192)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:306)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:333)

at com.evermind._ha.doFilter(Unknown Source)

at
com.abc.resourcelink.common.LoginBarFilter.doFilter(LoginBarFilter.java:92)

at com.evermind._csb._pvd(Unknown Source)

at com.evermind._csb._boc(Unknown Source)

at com.evermind._ax._lsc(Unknown Source)

at com.evermind._ax._uab(Unknown Source)

at com.evermind._bf.run(Unknown Source)

10:08:12,269 ERROR [SLCExceptionHandler] SLC Exception Handler called with
class java.lang.NoSuchMethodException

10:08:12,269 FATAL [SLCExceptionHandler] java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMapping
, org.apache.struts.action.ActionForm,

RE: displaying document in pop up window

2006-05-12 Thread Shoukat, Faisal
In the below example did you send a request parameter through of name
content_type too. With a value of pdf or msword etc???

-Original Message-
From: Avramucz István [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2006 13:34
To: Struts Users Mailing List
Subject: Re: displaying document in pop up window

Hello, maybe this helps:


...
<%
response.reset();
response.setContentType(request.getParameter("content_type"));

response.setContentLength(Integer.parseInt(request.getParameter("size")));
response.setHeader("Content-Disposition", "inline; filename=" + 
request.getParameter("origname"));
response.setHeader("Expires",new java.util.Date(new 
java.util.Date().getTime()+100).toString());
BufferedInputStream in = new BufferedInputStream(new 
FileInputStream(request.getParameter("origname")));
ByteArrayOutputStream byteStream = new ByteArrayOutputStream(512);
int imageByte;
while((imageByte = in.read()) != -1) {
byteStream.write(imageByte);
}
    in.close();
byteStream.writeTo(response.getOutputStream());
%>



Shoukat, Faisal wrote:
> Hi All,
>
> I am wanting to know how to display an uploaded document from clicking on
a
> link on my JSP.  I have managed to save the document into the database,
and
> I can load the document from the database.
>
> When I click to open the document I have to save it to my file system
first
> then open it.  Has anyone got any example of how to just click on the
> document and it opens another window which shows the contents.
>
> For example if it was a word documents that I saved, clicking on it would
> open up the document in a word window
>
> Thanks in advance
>
> -
> 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]



 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



displaying document in pop up window

2006-05-12 Thread Shoukat, Faisal
Hi All,

I am wanting to know how to display an uploaded document from clicking on a
link on my JSP.  I have managed to save the document into the database, and
I can load the document from the database.

When I click to open the document I have to save it to my file system first
then open it.  Has anyone got any example of how to just click on the
document and it opens another window which shows the contents.

For example if it was a word documents that I saved, clicking on it would
open up the document in a word window

Thanks in advance

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



RE: how to deal with request attributes and validation?

2006-05-12 Thread Shoukat, Faisal
R u using the validator framework


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of dario
Sent: 12 May 2006 09:36
To: user@struts.apache.org
Subject: how to deal with request attributes and validation?

hello everybody,

I'd like to know how do you deal with situations where you need to 
display some dynamic elements (menus, dropdowns...) on the page?
putting those in the request scope in the action thus making them 
available to JSP, seems most naturally to me. problem is when form data 
does not pass validation, and action is never called, so JSP page breaks 
because it has no data to display.

is there any proven tactics for this? basicly, i want some action/method 
executed even if validation fails, but still want validation to work and 
error messages passed to JSP.

thanks a lot!


dario


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



 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: Problems fetching struts-config DTD

2006-05-11 Thread Shoukat, Faisal
U could use a classpath entity resolver and put the dtd in a jar on the path

-Original Message-
From: A. Alonso Dominguez [mailto:[EMAIL PROTECTED] 
Sent: 11 May 2006 11:25
To: Struts Users Mailing List
Subject: Re: Problems fetching struts-config DTD

Take a look to the possible configurations of commons-digester, the
ActionServlet fallsback to that library when it loads all the
struts-config.xml files for your webapp.

A working solution is to remove the DOCTYPE reference in the xml files.

Alonso

2006/5/11, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Hi!
>
> I have a Struts webapp with a struts-config.xml that starts with the usual
>
> 
>
>"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
>   "http://struts.apache.org/dtds/struts-config_1_3.dtd";>
>
> So when the web application is started Struts goes out to
> struts.apache.org to try to fetch the DTD file. This is becoming a problem
> since the Internet can't be reached from all environments that the web
> application is going to run in.
>
> What is the preferred way to handle this?
>
> Can you turn of validation so Struts never tries to fetch the DTD file? I
> have tried to add an init-param validating=false to web.xml (also tried
> validate=true) but that didn't seem to help.
>
> Can you put the DTD file locally womewhere inside the webapp and reference
> it in a way so that it works regardless of the environment?
>
> Thanks for any help!
>
> /Niklas
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: [OT] calling js function with list backed form value

2006-05-04 Thread Shoukat, Faisal
Unfortuately as before it just prints out benefits[index.intValue()].value
and not the actual value.

-Original Message-
From: siva sajja [mailto:[EMAIL PROTECTED] 
Sent: 04 May 2006 15:12
To: Struts Users Mailing List
Subject: Re: [OT] calling js function with list backed form value

Hi

Try replacing the code

javascript:calculate('<%="benefits[" + index.intValue() +
"].value"%>',...with
javascript:calculate('<%= benefits[index.intValue()].value%>',... (removing
the string concatenation)

Hope this will help

Cheers,
Siva.

On 5/4/06, Shoukat, Faisal <[EMAIL PROTECTED]> wrote:
>
> If I use the html; text property the only diff would be
> "
> size="20"
> onblur="<%=jsFunction%>"/>
>
> I still have the same problem. If I put this in then the value becomes
> [object]
>
> Thanks
>
> -Original Message-
> From: vijay venkataraman [mailto:[EMAIL PROTECTED]
> Sent: 04 May 2006 13:12
> To: Struts Users Mailing List
> Subject: Re:[OT] calling js function with list backed form value
>
> In your JS function can you add 'this' as one of the parameter. Then in
> your js function you can get the value from the element.
> Like  which
> implies the element on which the event occured.
> Note: I have never used  and  don't know much about it.
> My thoughts.
>
> Thanks,
> Vijay Venkataraman
>
> Shoukat, Faisal wrote:
>
> >Hi,
> >
> >I have a list backed action form and want to call a javascript function
> with
> >one of the parameters to the function being a value from the list backed
> >action form.
> >
> >My js function is as such:
> >
> >
> > javascript:calculate('<%="benefits[" + index.intValue() + "].value"%>',
> >' property="benMaxRange"/>',
> >' property="benMinRange"/>',
> >'',
> >'')
> >
> >
> >The value I want substituted into the function is <%="benefits[" +
> >index.intValue() + "].value"%>
> >
> >My input text tag is as such which calls the function:
> >
> >"
> >value="" size="20" onblur="<%=jsFunction%>"/>
> >
> >Can anyone help with explaining how to get the value from the input text
> box
> >of the form and send it to the function. The text boxes name is dynamic
> thus
> >causes me problems.
> >
> >The html source shows the following: benefit[0].value in the function and
> >not the actual value.
> >
> >Thanks
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> --DISCLAIMER--
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission.
>
> If you receive this message in error, please immediately delete it and
> all copies of it from your system, destroy any hard copies of it and
> notify the sender. You must not, directly or indirectly, use, disclose,
> distribute, print, or copy any part of this message if you are not the
> intended recipient.
>
> Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each
> reserve the right to monitor all e-mail communications through its
> networks.
>
> Any views expressed in this message are those of the
> individual sender, except where the message states otherwise and the
> sender is authorized to state them to be the views of any such entity.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>

> 
> The Northgate IS Content Screening and Inspection system has scanned this
> message for malicious and inappropriate content and none was found. Please
> take care
> when opening attachments even when these are expected and from known and
> trusted
> sources.
>
>

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


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: [OT] calling js function with list backed form value

2006-05-04 Thread Shoukat, Faisal
If I use the html; text property the only diff would be 
" size="20"
onblur="<%=jsFunction%>"/>

I still have the same problem. If I put this in then the value becomes
[object]

Thanks

-Original Message-
From: vijay venkataraman [mailto:[EMAIL PROTECTED] 
Sent: 04 May 2006 13:12
To: Struts Users Mailing List
Subject: Re:[OT] calling js function with list backed form value

In your JS function can you add 'this' as one of the parameter. Then in 
your js function you can get the value from the element.
Like  which 
implies the element on which the event occured.
Note: I have never used  and  don't know much about it.  
My thoughts.

Thanks,
Vijay Venkataraman

Shoukat, Faisal wrote:

>Hi,
>
>I have a list backed action form and want to call a javascript function
with
>one of the parameters to the function being a value from the list backed
>action form. 
>
>My js function is as such:
>
>
> javascript:calculate('<%="benefits[" + index.intValue() + "].value"%>',
>'',
>'',
>'',
>'')
>
>
>The value I want substituted into the function is <%="benefits[" +
>index.intValue() + "].value"%>
>
>My input text tag is as such which calls the function:
>
>"
>value="" size="20" onblur="<%=jsFunction%>"/>
>
>Can anyone help with explaining how to get the value from the input text
box
>of the form and send it to the function. The text boxes name is dynamic
thus
>causes me problems.
>
>The html source shows the following: benefit[0].value in the function and
>not the actual value.
>
>Thanks
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.

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



 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



???en_GB. in errors

2006-05-04 Thread Shoukat, Faisal
Hi,

I throw a application exception back to the web layer and catch it in my
action class.  I then create a errors object with the exception as follows:

errors.add("errors", new ActionMessage(e.getCause().getMessage()));
saveErrors(request, errors);

When it displays the error on the jsp it displays the following

???en_GB.This form is invalid.???

How do I get rid of the ???en_GB. And ??? in the error.  All I want to
display is the This form is invalid.

Because it is an application exception and could be a number of things I
have not added anything to the message resources bundle

Thanks

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



calling js function with list backed form value

2006-05-04 Thread Shoukat, Faisal
Hi,

I have a list backed action form and want to call a javascript function with
one of the parameters to the function being a value from the list backed
action form. 

My js function is as such:


 javascript:calculate('<%="benefits[" + index.intValue() + "].value"%>',
'',
'',
'',
'')


The value I want substituted into the function is <%="benefits[" +
index.intValue() + "].value"%>

My input text tag is as such which calls the function:

"
value="" size="20" onblur="<%=jsFunction%>"/>

Can anyone help with explaining how to get the value from the input text box
of the form and send it to the function. The text boxes name is dynamic thus
causes me problems.

The html source shows the following: benefit[0].value in the function and
not the actual value.

Thanks

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



RE: creating dynamic forms with struts

2006-05-02 Thread Shoukat, Faisal
U want to use Map or List backed action forms

Look it up on the web in the struts doc for an example

-Original Message-
From: Silvija Cardzic-Mrsa [mailto:[EMAIL PROTECTED] 
Sent: 02 May 2006 09:33
To: user@struts.apache.org
Subject: creating dynamic forms with struts

Hi,

is it possible to create dynmic forms with struts ? Order of pages, the 
actions and
form fields will be generated from datasources.

I read about DynaActionForms, but Im not sure if this is the right thing.

Greetings Silvija 



 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



writing struts tags within other struts tags

2006-04-26 Thread Shoukat, Faisal
Hi,

 

I am wanting to know how to include the   tag  within a
 tag inside a javascript function

 

For example: The following loads the JSP page:

 

" 

value="" 

size="20" 

onblur="javascript:calculate(<%="benefits["+index.intValue()+"].value"%>,
, , , )"/>

 

However the following when it is inside a html: text tag does not load the
jsp page because it is expecting some equal symbol: 

 

" 

size="20" 

onblur="javascript:calculate(<%="benefits["+index.intValue()+"].value"%>,
<%=%>, <%=%>, <%=%>, <%=%>)"/>

 

I know there must be someway of doing it without using the input tag?  Any
advice??

 

Thanks



RE: referencing variable in onclick event of html:link tag

2006-04-18 Thread Shoukat, Faisal
That was the first thing I tried but unfortunately does not work!

-Original Message-
From: Anil Kumar Pippalapalli [mailto:[EMAIL PROTECTED] 
Sent: 18 April 2006 10:49
To: Struts Users Mailing List
Subject: Re: referencing variable in onclick event of html:link tag

hi,
  may be you can try removing the double quotes from the 
  expression [<%=count%>].
  
  bye
  
  
  
  

"Shoukat, Faisal" <[EMAIL PROTECTED]> wrote:  Can anyone help
with explaining to me how to get a scriptlet into a
html:linl tag in the onclick event.

 

For example: I have two forms of the same name in my jsp page.  The way I am
submitting the forms is to call the onclick event within the html:link tag
as follows:

 


paramName="app" paramProperty="appId"
onclick='javascript:document.forms.applicationDetailsForm[0].submit();'>[Sub
mit]

 

However where I have this:
document.forms.applicationDetailsForm[0].submit();  0 could be anything up
to 10.  I am within a logic:iterate tag so have declared the indexId as
index.  

 

The problem I am having is how do I get index into the square brackets of
the  document.forms.applicationDetailsForm[0].submit();  so what I want to
say is document.forms.applicationDetailsForm[index].submit();  

 

I have tried the following none of which work:

 

document.forms.applicationDetailsForm[<%=index%>].submit(); 

document.forms.applicationDetailsForm[<%="index"%>].submit();

document.forms.applicationDetailsForm["<%=index%>"].submit();

 

I also tried assigning it to a scriplet variable and using this but it did
not work.

 

<%

  int count = index.intValue();

  

  %>

 

   document.forms.applicationDetailsForm["<%=count%>"].submit();

 

Can anyone advise on how to get the index variable into the square brackets.


Thanks

 

   




-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



referencing variable in onclick event of html:link tag

2006-04-18 Thread Shoukat, Faisal
Can anyone help with explaining to me how to get a scriptlet into a
html:linl tag in the onclick event.

 

For example: I have two forms of the same name in my jsp page.  The way I am
submitting the forms is to call the onclick event within the html:link tag
as follows:

 

[Sub
mit]

 

However where I have this:
document.forms.applicationDetailsForm[0].submit();  0 could be anything up
to 10.  I am within a logic:iterate tag so have declared the indexId as
index.  

 

The problem I am having is how do I get index into the square brackets of
the  document.forms.applicationDetailsForm[0].submit();  so what I want to
say is document.forms.applicationDetailsForm[index].submit();  

 

I have tried the following none of which work:

 

document.forms.applicationDetailsForm[<%=index%>].submit(); 

document.forms.applicationDetailsForm[<%="index"%>].submit();

document.forms.applicationDetailsForm["<%=index%>"].submit();

 

I also tried assigning it to a scriplet variable and using this but it did
not work.

 

<%

  int count = index.intValue();

  

  %>

 

   document.forms.applicationDetailsForm["<%=count%>"].submit();

 

Can anyone advise on how to get the index variable into the square brackets.


Thanks

 

   



RE: html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
I have this working using the following code:



 <%
   String literal =(String) act;

   %>
 

 


But as you can see I am using java in the jsp: can anyone advise of some
other way of doing this

-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2006 15:35
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

Try using:


If act is the third element in the list apps.


On 3/23/06, Shoukat, Faisal <[EMAIL PROTECTED]> wrote:
>
> When I do the below in the form it submits
> {exampleFormBean.apps.actions.act}
>
> As the value.  I have a getter defined for apps in the formbean and in
> apps
> there is a getter for actions.
>
> There is no getter for act as this is deifined in the iterate tag
>
> Still stuck!!
>
> -Original Message-
> From: Vinit Sharma [mailto:[EMAIL PROTECTED]
> Sent: 23 March 2006 15:01
> To: Struts Users Mailing List
> Subject: Re: html:option on a nested collection
>
> You can use EL extention of html tag and use something like this:
>
>  name="act"/>
>
> Assuming getters are defined for all properties.
>
> Regds,
>
>
> On 3/23/06, Shoukat, Faisal <[EMAIL PROTECTED]> wrote:
> >
> > Hi Guys,
> >
> >
> >
> > I have a formBean which has a collection of objects within it called
> Apps.
> > Each App object has several fields with one of these fields being a
> > collection or list of Strings.
> >
> >
> >
> > ExampleFormBean properties are
> >
> >
> >
> > String Name
> >
> > String Class
> >
> > String Student
> >
> > List apps
> >
> >
> >
> > Each app object looks like this
> >
> > String first
> >
> > String second
> >
> > List actions.  --- This is a collection of Strings
> >
> >
> >
> > I am trying to display the actions of the app object in a drop down
> list.
> > But am having a few problems with the option tag.
> >
> >
> >
> > So far I have this:
> >
> > 
> >
> >
> >
> > 
> >
> > > indexId="index">
> >
> >   > name="act"/>
> >
> >
> >
> > 
> >
> >  
> >
> >
> >
> > This code displays the drop down with the correct string values showing.
> > However where I have put one above as the option value I actually want
> to
> > put something like the actual String i.e: .
> >
> >
> >
> > Does anyone know how I can do this. I have tried html:options and
> > optionscollections but could not get them to work.
> >
> >
> >
> > If the suggestion is to go with nested tags please provide an example as
> I
> > could not get far with this either.
> >
> >
> >
> > Secondly, If I submit the form but have modified two rows from the drop
> > down
> > when I get to the action class how can I know which rows I have
> modified.
> >
> >
> >
> > Thanks in advance
> >
> >
> >
> >
> >
>
>
> --
> Vinit Sharma
>
>
>

> 
> The Northgate IS Content Screening and Inspection system has scanned this
> message for malicious and inappropriate content and none was found. Please
> take care
> when opening attachments even when these are expected and from known and
> trusted
> sources.
>
>

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


--
Vinit Sharma


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
I don't see how the order of elements would matter because apps is a
collection within the formBean.  A get on this returns the actions
collection.  The action collection is just a list of Strings.  

The act variable you are speaking about is just something I have assigned as
an id in my logic iterate tag  : mailto:[EMAIL PROTECTED] 
Sent: 23 March 2006 15:35
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

Try using:


If act is the third element in the list apps.


On 3/23/06, Shoukat, Faisal <[EMAIL PROTECTED]> wrote:
>
> When I do the below in the form it submits
> {exampleFormBean.apps.actions.act}
>
> As the value.  I have a getter defined for apps in the formbean and in
> apps
> there is a getter for actions.
>
> There is no getter for act as this is deifined in the iterate tag
>
> Still stuck!!
>
> -Original Message-
> From: Vinit Sharma [mailto:[EMAIL PROTECTED]
> Sent: 23 March 2006 15:01
> To: Struts Users Mailing List
> Subject: Re: html:option on a nested collection
>
> You can use EL extention of html tag and use something like this:
>
>  name="act"/>
>
> Assuming getters are defined for all properties.
>
> Regds,
>
>
> On 3/23/06, Shoukat, Faisal <[EMAIL PROTECTED]> wrote:
> >
> > Hi Guys,
> >
> >
> >
> > I have a formBean which has a collection of objects within it called
> Apps.
> > Each App object has several fields with one of these fields being a
> > collection or list of Strings.
> >
> >
> >
> > ExampleFormBean properties are
> >
> >
> >
> > String Name
> >
> > String Class
> >
> > String Student
> >
> > List apps
> >
> >
> >
> > Each app object looks like this
> >
> > String first
> >
> > String second
> >
> > List actions.  --- This is a collection of Strings
> >
> >
> >
> > I am trying to display the actions of the app object in a drop down
> list.
> > But am having a few problems with the option tag.
> >
> >
> >
> > So far I have this:
> >
> > 
> >
> >
> >
> > 
> >
> > > indexId="index">
> >
> >   > name="act"/>
> >
> >
> >
> > 
> >
> >  
> >
> >
> >
> > This code displays the drop down with the correct string values showing.
> > However where I have put one above as the option value I actually want
> to
> > put something like the actual String i.e: .
> >
> >
> >
> > Does anyone know how I can do this. I have tried html:options and
> > optionscollections but could not get them to work.
> >
> >
> >
> > If the suggestion is to go with nested tags please provide an example as
> I
> > could not get far with this either.
> >
> >
> >
> > Secondly, If I submit the form but have modified two rows from the drop
> > down
> > when I get to the action class how can I know which rows I have
> modified.
> >
> >
> >
> > Thanks in advance
> >
> >
> >
> >
> >
>
>
> --
> Vinit Sharma
>
>
>

> 
> The Northgate IS Content Screening and Inspection system has scanned this
> message for malicious and inappropriate content and none was found. Please
> take care
> when opening attachments even when these are expected and from known and
> trusted
> sources.
>
>

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


--
Vinit Sharma


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
When I do the below in the form it submits
{exampleFormBean.apps.actions.act}

As the value.  I have a getter defined for apps in the formbean and in apps
there is a getter for actions.  

There is no getter for act as this is deifined in the iterate tag

Still stuck!!

-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2006 15:01
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

You can use EL extention of html tag and use something like this:



Assuming getters are defined for all properties.

Regds,


On 3/23/06, Shoukat, Faisal <[EMAIL PROTECTED]> wrote:
>
> Hi Guys,
>
>
>
> I have a formBean which has a collection of objects within it called Apps.
> Each App object has several fields with one of these fields being a
> collection or list of Strings.
>
>
>
> ExampleFormBean properties are
>
>
>
> String Name
>
> String Class
>
> String Student
>
> List apps
>
>
>
> Each app object looks like this
>
> String first
>
> String second
>
> List actions.  --- This is a collection of Strings
>
>
>
> I am trying to display the actions of the app object in a drop down list.
> But am having a few problems with the option tag.
>
>
>
> So far I have this:
>
> 
>
>
>
> 
>
> indexId="index">
>
>   name="act"/>
>
>
>
> 
>
>  
>
>
>
> This code displays the drop down with the correct string values showing.
> However where I have put one above as the option value I actually want to
> put something like the actual String i.e: .
>
>
>
> Does anyone know how I can do this. I have tried html:options and
> optionscollections but could not get them to work.
>
>
>
> If the suggestion is to go with nested tags please provide an example as I
> could not get far with this either.
>
>
>
> Secondly, If I submit the form but have modified two rows from the drop
> down
> when I get to the action class how can I know which rows I have modified.
>
>
>
> Thanks in advance
>
>
>
>
>


--
Vinit Sharma


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
Hi Guys,

 

I have a formBean which has a collection of objects within it called Apps.
Each App object has several fields with one of these fields being a
collection or list of Strings.

 

ExampleFormBean properties are

 

String Name

String Class

String Student

List apps

 

Each app object looks like this

String first

String second

List actions.  --- This is a collection of Strings

 

I am trying to display the actions of the app object in a drop down list.
But am having a few problems with the option tag.

 

So far I have this:



 



   

 

 



 

 

This code displays the drop down with the correct string values showing.
However where I have put one above as the option value I actually want to
put something like the actual String i.e: .

 

Does anyone know how I can do this. I have tried html:options and
optionscollections but could not get them to work.

 

If the suggestion is to go with nested tags please provide an example as I
could not get far with this either.

 

Secondly, If I submit the form but have modified two rows from the drop down
when I get to the action class how can I know which rows I have modified.

 

Thanks in advance