Re: Question on parameterizing action attribute to html:form

2004-07-16 Thread Erik Weber
I found the answer. It is to use the struts-el html tag library instead 
of the standard html tag library, and then to refer to the variable 
using the expression language syntx:


. . .

Erik Weber wrote:
I want to use c:choose to decide how to set the value of the action 
parameter in an html:form tag (add or update).

How exactly do I refer to the variable that is set in the c:when and 
c:otherwise conditionals from within my html:action tag?

The only thing I can think of that works is something like this:

So how do I declare someVar, with c:set? Or do I have to use Scriptlet 
or JSP declaration syntax?

Erik
-
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: Re: problem Please Help me.....

2004-07-16 Thread Srinivas Rao
Hi Sunil,
Thank you for your interest and My problem was solved.Some of the friends in the list 
have sent the solution to me...
My problem is ...
I am display the number of files ie.suppose 100 files ...100 files to poplate the 
popup windows.Here i am using the nested:text So the problem is the popup window was 
doesn't  Recognizing the relevent text field to the parent window.

The solution is, to pass the parameter from parent window to popup window and put the 
value to revelent text field.

Once again thank you for your interest ...

Thanks

Srinivas.

 


Sunil Sahu <[EMAIL PROTECTED]> wrote:

Hi srinivas, 

What is the exact problem u r facing. 

-Original Message- 
From: Ajay Patil [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 30, 2004 3:14 PM 
To: Srinivas Rao; [EMAIL PROTECTED] 
Subject: Re: Re: problem Please Help me. 

Dear Srinivas 

You are right. Your code in child window cannot identify 
the relevant text field. I havent tried the case when there are 
multiple text fields, each of which could be selected. 

I cant think of a way to get it working. Maybe some Javascript 
expert might know. 

Ajay 

> Hi Ajay, 
> Thanks to the intrest and replay to me.It's working when one or 
> single file displaying but if more than one file it's not working 
> .I don't know why it is not working ... 
> I thing its not identify the relavent text field. 
> Please help me 
> 
> Thanks 
> Srinivas 
> 



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

-
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!

RE: NEWBIE: how to submit a named html:form via javascript

2004-07-16 Thread Buland Altaf
Hi There,

Youi don't even need to give _javascript. As when your
jsp comples, it replaces your form tag attibute name
with the value u provided under action attribute name.
So if your acton tag is like this:-



Then you can use
"document.helpActionForm.submit()" in the jsp file
to submit a form like this:





Regards,
Buland

--- Sunil Sahu <[EMAIL PROTECTED]> wrote:
> Adam,
> 
> Name parameter in form tag is optional. If you want
> to submit your page then
> u can do it by supplying onclick event for default
> form.
> 
>  scope="request"
>
type="com.expensys.expensyswt.struts.action.DisplayHelp"
> />
> 
> 
>  
> 
> 
>  onclick="javascript:document.forms[0].submit();" >
> 
>  
> 
> nothing else is required.
> 
> sahu
> 
> 
> 
> 
> 
> -Original Message-
> From: Adam Lipscombe
> [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, June 26, 2004 3:01 AM
> To: 'Struts Users Mailing List'
> Subject: RE: NEWBIE: how to submit a named html:form
> via javascript
> 
> Thanks Jim,
> 
> 
> If I understand you correctly, if I have this config
> in struts-config:
> 
>  scope="request"
>
type="com.expensys.expensyswt.struts.action.DisplayHelp"
> />
> 
> Then I can use
> "javascript:document.helpActionForm.submit()" in the
> jsp file
> to submit a form like this:
> 
> 
> 
> 
> 
> 
> Is my understanding correct?
> 
> 
> TIA - Adam
> 
> 
> 
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED] 
> Sent: 25 June 2004 18:31
> To: Struts Users Mailing List
> Subject: RE: NEWBIE: how to submit a named html:form
> via javascript
> 
> 
> The name is optional.  I never use it in the form. 
> For JavaScript porpoises
> I use the name of the 
> ActionForm your using in the struts config.
> 
> > -Original Message-
> > From: Adam Lipscombe
> [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 25, 2004 10:27 AM
> > To: 'Struts Users Mailing List'
> > Subject: NEWBIE: how to submit a named html:form
> via javascript
> > 
> > 
> > 
> > Folks,
> > 
> > I want to submit a named html:form. e.g.
> > 
> >  method="POST">
> >
> >href="" 
> > onclick="javascript:document.helpForm.submit()" >
> >
> > 
> > 
> > 
> > Wit the above construct Struts complains that the
> form
> > requires a "type"
> > attribute - it seems to want me to specify the
> classname of 
> > the ActionForm
> > as the "type".
> > 
> > My understanding is that Struts deduces the
> ActionForm to use
> > automatically
> > from the struts-config action definition. Is this
> correct?
> > 
> > 
> > I know I could use
> "javascript:document.forms[n].submit()" but I would 
> > prefer to submit the named form so that if further
> forms are added to 
> > the page it does not mess up the submit.
> > 
> > Is this possible? How?
> > 
> > 
> > TIA - Adam
> > 
> > 
> >
>
-
> > 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]


=

Buland Altaf Malik,
Software Engineer, 
Softech System's(pvt)Ltd. 
10/25 asad jan road lahore,cantt - 54810 Pakistan
Tel: 92-42-6665812 , 92-42-6660802

Mob: 0333-4344113
Fax: 92-42-6665792

http://www.softech.com.pk
[EMAIL PROTECTED]





__
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


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



RE: javax.servlet.ServletException: Cannot find bean dblist in sc ope request

2004-07-16 Thread Sunil Sahu
Title: RE: javax.servlet.ServletException: Cannot find bean dblist in sc ope request





Yes, buland is right.


-Original Message-
From: Buland Altaf [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 17, 2004 10:58 AM
To: Struts Users Mailing List
Subject: RE: javax.servlet.ServletException: Cannot find bean dblist in sc ope request


Hi there,


There may be two solutions:


1. Sometimes this error comes if there is nothing in
the db and your collection is empty. So go and check
it and print collection data before storing it in
request object.


2. if there is some error and you are comming back to
your page, but at this time there will be nothing
dblist in your request object, u need to store it
again in case of an error/or store it in session and
remove it on successfull operation.


Hoep this will might help you.


Regards,
Buland


--- Sunil Sahu <[EMAIL PROTECTED]> wrote:
> Hi patrick,
> 
> What is the package name for your bean and dao.
> 
> Please have a fresh look at package name u have
> specified for bean and dao.
> U are accessing the page thru
> http://localhost:port/list.do. Am i right.
> 
> Check it "scope="request" including in your mapping
> in struts-config.xml
> file.
> 
> -Original Message-
> From: AKEDJO Guy-Patrick [mailto:[EMAIL PROTECTED]] 
> Sent: Saturday, July 03, 2004 8:52 AM
> To: [EMAIL PROTECTED]
> Subject: javax.servlet.ServletException: Cannot find
> bean dblist in scope
> request
> 
> I've been trying to solve that issue for 3 days now
> I went also to the Net
> trying to find all information related to this but
> no way. I tried
> everything I know and all I found out but the error
> still the same.
> Can you help me please.
> Here are some information you need to check my code.
>  
> = The error
> message=
> javax.servlet.ServletException: Cannot find bean
> dblist in scope request
>  
>
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> mpl.java:867)
>  
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:800)
> 
>
org.apache.jsp.form.list_jsp._jspService(list_jsp.java:129)
> 
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 11)
> 
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 
>
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> root cause 
> javax.servlet.jsp.JspException: Cannot find bean
> dblist in scope request
> 
>
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
> 
>
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
> 
>
org.apache.jsp.form.list_jsp._jspService(list_jsp.java:85)
> 
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 11)
> 
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 
>
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
> Action class XML
> config
> 
> type="com.youcompany.struts.action.ListAction"
> validate="false">
> 
> 
> my Action
> class==
>  
> package com.youcompany.struts.action;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import com.youcompany.struts.bean.*;
> import javax.sql.*;
> import org.apache.struts.action.ActionError;
> import org.apache.struts.action.ActionErrors;
> import java.util.ArrayList;
> import java.util.Collection;
>  
> public class ListAction extends Action {
> //
>
-
> Instance
> Variables
> //
>
-
> Methods
> /** 
> * Method execute
> * @param ActionMapping mapping
> * @param ActionForm form
> * @param HttpServletRequest request
> * @param HttpServletResponse response
> * @return ActionForward
> * @throws Exception
> */
> public ActionForward execute(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws Exception {
> // throw new
> UnsupportedOperationException("Generated method
> 'execute(...)'
> not implemented.");
>  
> // Get the datasource 
> ActionErrors errors = new ActionErrors();
> DatabaseDVDManager DAOdvd = new
> DatabaseDVDManager();
> DataSource dataSource =
>
(DataSource)servlet.getServle

RE: RE [OT]: onsubmit form ERROR

2004-07-16 Thread Buland Altaf
Hi there,

try this one:-

 

Hoep it will work.

Regards,
Buland

--- Sunil Sahu <[EMAIL PROTECTED]> wrote:
> Your code is right there may besome problem with
> your browser.
> 
> 
> -Original Message-
> From: Barnett, Brian W.
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 1:38 AM
> To: 'Struts Users Mailing List'
> Subject: RE [OT]: onsubmit form ERROR
> 
> Hmm. I've never seen that syntax, but that doesn't
> mean much. Here are the
> syntaxes I've seen:
> 
> document.MonitorForm.submit()
> document.forms[0].submit()
> document.forms["MonitorForm"].submit()
> 
> I've seen something as simple as a semi-colon at the
> end of javascript work
> wonders too :)
> 
> 
> 
> -Original Message-
> From: Isaac Mosquera [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 14, 2004 2:01 PM
> To: Struts Users Mailing List
> Subject: RE: onsubmit form ERROR
> 
> thanks, but that didn't work, it seems as though i'm
> getting a valid form 
> object because if use:
>   alert( document.forms.MonitorForm.name )
> and alert( 
> document.forms.MonitorForm.action )
> they both return the right output, however its just
> the submit() function 
> which gives me errors.
> -isaac
> At 12:45 PM 7/14/2004 -0700, you wrote:
> >Try document.MonitorForm.submit()
> >
> >-Original Message-
> >From: Isaac Mosquera [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, July 14, 2004 1:47 PM
> >To: [EMAIL PROTECTED]
> >Subject: onsubmit form ERROR
> >
> >i have the following piece of HTML/JavaScript and
> this problem happens
> >quite frequently but i dont know how to fix it.
> >
> >   >onchange="document.forms.MonitorForm.submit()">
> >
> >although there is a valid form with the name
> "MonitorForm" in the html page
> >i get this error:
> >
> >"object doesn't support this property or method"
> >
> >-isaac
> >
> >
> >
>
>-
> >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]


=

Buland Altaf Malik,
Software Engineer, 
Softech System's(pvt)Ltd. 
10/25 asad jan road lahore,cantt - 54810 Pakistan
Tel: 92-42-6665812 , 92-42-6660802

Mob: 0333-4344113
Fax: 92-42-6665792

http://www.softech.com.pk
[EMAIL PROTECTED]





__
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


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



Question on parameterizing action attribute to html:form

2004-07-16 Thread Erik Weber
I want to use c:choose to decide how to set the value of the action 
parameter in an html:form tag (add or update).

How exactly do I refer to the variable that is set in the c:when and 
c:otherwise conditionals from within my html:action tag?

The only thing I can think of that works is something like this:

So how do I declare someVar, with c:set? Or do I have to use Scriptlet 
or JSP declaration syntax?

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


RE: javax.servlet.ServletException: Cannot find bean dblist in sc ope request

2004-07-16 Thread Buland Altaf
Hi there,

There may be two solutions:

1. Sometimes this error comes if there is nothing in
the db and your collection is empty. So go and check
it and print collection data before storing it in
request object.

2. if there is some error and you are comming back to
your page, but at this time there will be nothing
dblist in your request object, u need to store it
again in case of an error/or store it in session and
remove it on successfull operation.

Hoep this will might help you.

Regards,
Buland

--- Sunil Sahu <[EMAIL PROTECTED]> wrote:
> Hi patrick,
> 
> What is the package name for your bean and dao.
> 
> Please have a fresh look at package name u have
> specified for bean and dao.
> U are accessing the page thru
> http://localhost:port/list.do. Am i right.
> 
> Check it "scope="request" including in your mapping
> in struts-config.xml
> file.
> 
> -Original Message-
> From: AKEDJO Guy-Patrick [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, July 03, 2004 8:52 AM
> To: [EMAIL PROTECTED]
> Subject: javax.servlet.ServletException: Cannot find
> bean dblist in scope
> request
> 
> I've been trying to solve that issue for 3 days now
> I went also to the Net
> trying to find all information related to this but
> no way. I tried
> everything I know and all I found out but the error
> still the same.
> Can you help me please.
> Here are some information you need to check my code.
>  
> = The error
> message=
> javax.servlet.ServletException: Cannot find bean
> dblist in scope request
>  
>
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> mpl.java:867)
>  
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:800)
> 
>
org.apache.jsp.form.list_jsp._jspService(list_jsp.java:129)
> 
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 11)
> 
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 
>
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> root cause 
> javax.servlet.jsp.JspException: Cannot find bean
> dblist in scope request
> 
>
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
> 
>
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
> 
>
org.apache.jsp.form.list_jsp._jspService(list_jsp.java:85)
> 
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 11)
> 
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 
>
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>  
> Action class XML
> config
>  type="com.youcompany.struts.action.ListAction"
> validate="false">
> 
> 
> my Action
> class==
>  
> package com.youcompany.struts.action;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts.action.Action;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import com.youcompany.struts.bean.*;
> import javax.sql.*;
> import org.apache.struts.action.ActionError;
> import org.apache.struts.action.ActionErrors;
> import java.util.ArrayList;
> import java.util.Collection;
>  
> public class ListAction extends Action {
> //
>
-
> Instance
> Variables
> //
>
-
> Methods
> /** 
> * Method execute
> * @param ActionMapping mapping
> * @param ActionForm form
> * @param HttpServletRequest request
> * @param HttpServletResponse response
> * @return ActionForward
> * @throws Exception
> */
> public ActionForward execute(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws Exception {
> // throw new
> UnsupportedOperationException("Generated method
> 'execute(...)'
> not implemented.");
>  
> // Get the datasource 
> ActionErrors errors = new ActionErrors();
> DatabaseDVDManager DAOdvd = new
> DatabaseDVDManager();
> DataSource dataSource =
>
(DataSource)servlet.getServletContext().getAttribute("org.apache.struts.acti
> on.DATA_SOURCE");
> Collection c = new ArrayList();
> 
> try {
> // connection
> DAOdvd.setDataSource(dataSource);
> c = DAOdvd.getAll();
>  
> 
> } catch (DAOException e) {
> // Message for the user:
> errors.add("label", new
> ActionError("error.listfailed"));
> saveErrors(request, errors);
> 
> // Log

RE: html:submit button

2004-07-16 Thread Sunil Sahu
Title: RE: html:submit button





U can user 'onclick' event in html:button and simply call a _javascript_ function in which u have to pass the one parameter which would be exactly the 'value' u want to pass.


-Original Message-
From: Denis Avdic [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 08, 2004 9:34 PM
To: [EMAIL PROTECTED]
Subject: html:submit button


Hello, 


From what I understand, the value attribute on html:submit button is
both the value of the label and the value submitted to the property
attribute when the button is pressed.


Is there a way to separate those two?  I need 10 buttons, all the same
label, but with different values submitted, depending on which button
is pressed.   I am not sure how to achieve that with html:submit. 
Should I just throw in a regular  tag instead?


Thanks, 


Denis


-
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: How to append select option to html:link

2004-07-16 Thread Sunil Sahu
Title: RE: How to append select option to html:link





Hi cdroderick,


I think this is piece of code which will fulfill ur requirement..




function testLink(actionName)
{
Var selectValue =document.fm.chartFormat.options[document.fm.chartFormat.selectedIndex].value;

document.fm.action=""
document.fm.submit();

}
chart   DHTML (IE Only)   Java    sahu -Original Message- From: cdroderick [mailto:[EMAIL PROTECTED]] Sent: Friday, June 25, 2004 3:16 PM To: [EMAIL PROTECTED] Subject: How to append select option to html:link Hello, I have a JSP with a list of dynamically generated html:links.  Each link has a map of attributes appended e.g.: chart On the same page, I have a html:select e.g.:   DHTML (IE Only)   Java    I would like that when a link is clicked, not only the map of attributes is appended, but also the current value of the select option. I know how to get the current option value with _javascript_ e.g.: document.forms[0].chartFormat.options[document.forms [0].chartFormat.selectedIndex].value but I don't know how to append this to link. Does anybody know how to do this without re-submitting the form? 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]


RE: RE [OT]: onsubmit form ERROR

Title: RE: RE [OT]: onsubmit form ERROR





Your code is right there may besome problem with your browser.



-Original Message-
From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 15, 2004 1:38 AM
To: 'Struts Users Mailing List'
Subject: RE [OT]: onsubmit form ERROR


Hmm. I've never seen that syntax, but that doesn't mean much. Here are the
syntaxes I've seen:


document.MonitorForm.submit()
document.forms[0].submit()
document.forms["MonitorForm"].submit()


I've seen something as simple as a semi-colon at the end of _javascript_ work
wonders too :)




-Original Message-
From: Isaac Mosquera [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 14, 2004 2:01 PM
To: Struts Users Mailing List
Subject: RE: onsubmit form ERROR


thanks, but that didn't work, it seems as though i'm getting a valid form 
object because if use:
  alert( document.forms.MonitorForm.name ) and alert( 
document.forms.MonitorForm.action )
they both return the right output, however its just the submit() function 
which gives me errors.
-isaac
At 12:45 PM 7/14/2004 -0700, you wrote:
>Try document.MonitorForm.submit()
>
>-Original Message-
>From: Isaac Mosquera [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, July 14, 2004 1:47 PM
>To: [EMAIL PROTECTED]
>Subject: onsubmit form ERROR
>
>i have the following piece of HTML/_javascript_ and this problem happens
>quite frequently but i dont know how to fix it.
>
>  
>>
>
>although there is a valid form with the name "MonitorForm" in the html page
>i get this error:
>
>"object doesn't support this property or method"
>
>-isaac
>
>
>
>-
>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: javax.servlet.ServletException: Cannot find bean dblist in sc ope request

Title: RE: javax.servlet.ServletException: Cannot find bean dblist in scope request





Hi patrick,


What is the package name for your bean and dao.


Please have a fresh look at package name u have specified for bean and dao.
U are accessing the page thru http://localhost:port/list.do. Am i right.


Check it "scope="request" including in your mapping in struts-config.xml file.


-Original Message-
From: AKEDJO Guy-Patrick [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 03, 2004 8:52 AM
To: [EMAIL PROTECTED]
Subject: javax.servlet.ServletException: Cannot find bean dblist in scope request


I've been trying to solve that issue for 3 days now I went also to the Net trying to find all information related to this but no way. I tried everything I know and all I found out but the error still the same.

Can you help me please.
Here are some information you need to check my code.
 
= The error message=
javax.servlet.ServletException: Cannot find bean dblist in scope request
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
 org.apache.jsp.form.list_jsp._jspService(list_jsp.java:129)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause 
javax.servlet.jsp.JspException: Cannot find bean dblist in scope request
 org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
 org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
 org.apache.jsp.form.list_jsp._jspService(list_jsp.java:85)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
Action class XML config



my Action class==
 
package com.youcompany.struts.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.youcompany.struts.bean.*;
import javax.sql.*;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import java.util.ArrayList;
import java.util.Collection;
 
public class ListAction extends Action {
// - Instance Variables
// - Methods
/** 
* Method execute
* @param ActionMapping mapping
* @param ActionForm form
* @param HttpServletRequest request
* @param HttpServletResponse response
* @return ActionForward
* @throws Exception
*/
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
// throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented.");
 
// Get the datasource 
ActionErrors errors = new ActionErrors();
DatabaseDVDManager DAOdvd = new DatabaseDVDManager();
DataSource dataSource = (DataSource)servlet.getServletContext().getAttribute("org.apache.struts.action.DATA_SOURCE");
Collection c = new ArrayList();


try {
// connection
DAOdvd.setDataSource(dataSource);
c = DAOdvd.getAll();
 


} catch (DAOException e) {
// Message for the user:
errors.add("label", new ActionError("error.listfailed"));
saveErrors(request, errors);


// Logging the error:
String message = "DVDs could not be listed";


// Save the chained exceptions:
request.setAttribute("MYEXCEPTION", new DAOException(message, e));


}


request.setAttribute("dblist",c);


return (mapping.findForward("listok"));
 
}
}
===My Jsp for the view ==
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
 
DVD library

Click on Id to edit DVD.


Id
Title


type="com.youcompany.struts.bean.DVD">

">





 
=My DVD bean:==


import java.io.Serializable;
/*
* This a bean - and also a Value - or Data Transfer Object 
*/
public class DVD implements Serializable {
private String id;
private Str

RE: Re: problem Please Help me.....

Title: RE: Re: problem Please Help me.





Hi srinivas,


What is the exact problem u r facing.


-Original Message-
From: Ajay Patil [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 30, 2004 3:14 PM
To: Srinivas Rao; [EMAIL PROTECTED]
Subject: Re: Re: problem Please Help me.


Dear Srinivas


You are right. Your code in child window cannot identify 
the relevant text field. I havent tried the case when there are
multiple text fields, each of which could be selected.


I cant think of a way to get it working. Maybe some _javascript_ 
expert might know.


Ajay


> Hi Ajay,
> Thanks to the intrest and replay to me.It's working when one or 
> single file displaying but if more than one file it's not working 
> .I don't know why it is not working ...
> I thing its not identify the relavent text field.
> Please help me
> 
> Thanks
> Srinivas
> 




-
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: NEWBIE: how to submit a named html:form via javascript

Title: RE: NEWBIE: how to submit a named html:form via javascript





Adam,


Name parameter in form tag is optional. If you want to submit your page then u can do it by supplying onclick event for default form.


type="com.expensys.expensyswt.struts.action.DisplayHelp" />



 
    
   
  >
    
 


nothing else is required.


sahu






-Original Message-
From: Adam Lipscombe [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, June 26, 2004 3:01 AM
To: 'Struts Users Mailing List'
Subject: RE: NEWBIE: how to submit a named html:form via _javascript_


Thanks Jim,



If I understand you correctly, if I have this config in struts-config:



type="com.expensys.expensyswt.struts.action.DisplayHelp" />


Then I can use "_javascript_:document.helpActionForm.submit()" in the jsp file
to submit a form like this:








Is my understanding correct?



TIA - Adam





-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]] 
Sent: 25 June 2004 18:31
To: Struts Users Mailing List
Subject: RE: NEWBIE: how to submit a named html:form via _javascript_



The name is optional.  I never use it in the form.  For _javascript_ porpoises
I use the name of the 
ActionForm your using in the struts config.


> -Original Message-
> From: Adam Lipscombe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 25, 2004 10:27 AM
> To: 'Struts Users Mailing List'
> Subject: NEWBIE: how to submit a named html:form via _javascript_
> 
> 
> 
> Folks,
> 
> I want to submit a named html:form. e.g.
> 
> 
>    
>   
>  >
>    
> 
> 
> 
> Wit the above construct Struts complains that the form
> requires a "type"
> attribute - it seems to want me to specify the classname of 
> the ActionForm
> as the "type".
> 
> My understanding is that Struts deduces the ActionForm to use
> automatically
> from the struts-config action definition. Is this correct?
> 
> 
> I know I could use "_javascript_:document.forms[n].submit()" but I would 
> prefer to submit the named form so that if further forms are added to 
> the page it does not mess up the submit.
> 
> Is this possible? How?
> 
> 
> TIA - Adam
> 
> 
> -
> 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: About datasource

^^ thanks so much !
I am going to have a try and let see what will happen (maybe somemore
question, ^^)

Regards

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



Re: Intermediate loading page

Rizwan Merchant wrote:
Hi Craig,
Thanks for the reply. I came across this solution, but does this not mean
that the user will only be able to generate one report at a time (since we
are storing the flag in the user's session)? If the user starts generating a
second report which is much smaller than the first then would this not
create a problem?
 

You could accomodate such a thing in several different ways, but how 
would the user even start requesting the second report?  If they're 
sitting on the auto-repeat "Please Wait" page, they won't have the 
opportunity.  If you want them to be able to go request a second report 
while the first one is still generating, you'll probably be better off 
just navigating back to the main menu (or something) after firing off 
the first thread, then let them fire off a different thread (using a 
different flag) for the second report -- then have a screen where they 
can "pick up" their completed reports and display them.

If the computational effort to produce reports becomes severe, you might 
also consider using some sort of job queueing package so that a single 
background thread could do the report generation for all your users (one 
report at a time).  If you go this way, the "pick up your completed 
report" page becomes an even better idea.

Thanks again for your input. Much appreciated.
-Riz.
 

Craig
-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 16, 2004 3:37 PM
To: Struts Users Mailing List
Subject: Re: Intermediate loading page

Rizwan Merchant wrote:
 


I am working on a web application using the Struts framework. Using a 
form on a jsp page, I generate a report which is displayed in pdf on a 
new screen. The report is generated through an Action class method. I 
would like to display a "Please wait" screen while the report is being 
generated.

The action class method calls functions that generate a pdf file and 
then redirects control to that file. So I cannot use the flush() 
method to send html to the browser while the report is being generated 
(once a response is committed it cannot be written to again). Neither 
can I use the 'div' tag method as my new page is not a jsp page (it is 
a new browser window with pdf file displayed inside it).
   

One common strategy for this sort of thing is to refactor your action into
several, along the following lines:
* The Action that is currently creating the PDF should instead
 fire off a background thread to do the report preparation.  It
 will then forward to a "Please Wait" page (see below).
* The background thread should do whatever is needed to prepare
 the PDF file, and set a flag variable in the user's session when it's
done,
 followed by terminating the thread.
* The "Please Wait" page should say something like "Report generation
 in progress", and use a meta-refresh tag to automatically submit itself
 every few seconds, with the destination being a "Done Yet" action.
* The "Done Yet" action will consult the flag variable in the user's
session.
 If its not there, forward back to the "Please Wait" page again.  If it's
 done, forward to the URL to retrieve the PDF itself.
Craig
 

My code is shown below
//the jsp code calling the action


// The Action class
public ActionForward getTransactionReports(ActionMapping mapping, 
ActionForm form, HttpServletRequest request, HttpServletResponse 
response) throws Exception {

ICustomerAdministrationClient admin_impl = 
getCustomerAdministrationService(request);

//enforce user permission
enforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 1);
EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form; ReportsForm 
reportsForm = admin_form.getReportsForm();

//cant do this as it creates an IllegalStateException // PrintWriter 
html = response.getWriter(); // // html.print("\nmy 
test\n"); // html.print("");
// html.flush();
// html.close();

//if details type is summary then output format can only be PDF
if(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))
reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);
//generate the reports using jasper reports 
doJasperReports(reportsForm, request);

CustomerForm customer_form = (CustomerForm)getSessionObject(request,
"customerForm");
Collection all_region_list_forms =
(Collection)getSessionObject(request, "allRegionListForms");
admin_form.setCustomerForm(customer_form);
admin_form.setRegionListForms(all_region_list_forms);
request.setAttribute(EMSConstants.FORM_VIEW, admin_form);
String relativePath = File.separator + "temp_" + 
request.getSession().getId(); String pdfFilePath = File.separator + 
"temp" + relativePath + File.separator + "ReportinPDF.pdf"; String 
csvFilePath = File.separator + "temp" + relativePath + File.separator 
+ "ReportinCSV.dpt";

if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PD
F)) return (new ActionForward(pdfFilePath, true));
return (new ActionForward(csvFilePath, true)); }
Any help would be

RE: Intermediate loading page



> -Original Message-
> From: Rizwan Merchant [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 4:06 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Intermediate loading page
> 
> 
> 
> Hi Craig,
> 
> Thanks for the reply. I came across this solution, but does 
> this not mean
> that the user will only be able to generate one report at a 
> time (since we
> are storing the flag in the user's session)? If the user 
> starts generating a
> second report which is much smaller than the first then would this not
> create a problem?

If you use the same session variable as a flag, then yes.. but you could use the same 
session variable
as a "char of your choice" delimited string, where the values indicate the report name 
being generated.  Or, if you like easy a different session var for each report.

> 
> Thanks again for your input. Much appreciated.
> 
> -Riz.
> 
> -Original Message-
> From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
> Sent: Friday, July 16, 2004 3:37 PM
> To: Struts Users Mailing List
> Subject: Re: Intermediate loading page
> 
> Rizwan Merchant wrote:
> 
> >  
> >
> > I am working on a web application using the Struts 
> framework. Using a 
> > form on a jsp page, I generate a report which is displayed 
> in pdf on a 
> > new screen. The report is generated through an Action class 
> method. I 
> > would like to display a "Please wait" screen while the 
> report is being 
> > generated.
> >
> > The action class method calls functions that generate a pdf 
> file and 
> > then redirects control to that file. So I cannot use the flush() 
> > method to send html to the browser while the report is 
> being generated 
> > (once a response is committed it cannot be written to 
> again). Neither 
> > can I use the 'div' tag method as my new page is not a jsp 
> page (it is 
> > a new browser window with pdf file displayed inside it).
> 
> One common strategy for this sort of thing is to refactor 
> your action into
> several, along the following lines:
> 
> * The Action that is currently creating the PDF should instead
>   fire off a background thread to do the report preparation.  It
>   will then forward to a "Please Wait" page (see below).
> 
> * The background thread should do whatever is needed to prepare
>   the PDF file, and set a flag variable in the user's session 
> when it's
> done,
>   followed by terminating the thread.
> 
> * The "Please Wait" page should say something like "Report generation
>   in progress", and use a meta-refresh tag to automatically 
> submit itself
>   every few seconds, with the destination being a "Done Yet" action.
> 
> * The "Done Yet" action will consult the flag variable in the user's
> session.
>   If its not there, forward back to the "Please Wait" page 
> again.  If it's
>   done, forward to the URL to retrieve the PDF itself.
> 
> Craig
> 
> 
> >
> > My code is shown below
> >
> > //the jsp code calling the action
> >  > target="_blank">
> >
> >
> > // The Action class
> > public ActionForward getTransactionReports(ActionMapping mapping, 
> > ActionForm form, HttpServletRequest request, HttpServletResponse 
> > response) throws Exception {
> >
> > ICustomerAdministrationClient admin_impl = 
> > getCustomerAdministrationService(request);
> >
> > //enforce user permission
> > enforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 1);
> >
> > EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form; ReportsForm 
> > reportsForm = admin_form.getReportsForm();
> >
> > //cant do this as it creates an IllegalStateException // 
> PrintWriter 
> > html = response.getWriter(); // // 
> html.print("\nmy 
> > test\n"); // html.print(" > src=\"images/dpt_logo.jpg\">");
> > // html.flush();
> > // html.close();
> >
> >
> > //if details type is summary then output format can only be PDF
> > 
> if(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))
> > reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);
> >
> > //generate the reports using jasper reports 
> > doJasperReports(reportsForm, request);
> >
> > CustomerForm customer_form = (CustomerForm)getSessionObject(request,
> > "customerForm");
> > Collection all_region_list_forms =
> > (Collection)getSessionObject(request, "allRegionListForms");
> >
> > admin_form.setCustomerForm(customer_form);
> > admin_form.setRegionListForms(all_region_list_forms);
> > request.setAttribute(EMSConstants.FORM_VIEW, admin_form);
> >
> > String relativePath = File.separator + "temp_" + 
> > request.getSession().getId(); String pdfFilePath = File.separator + 
> > "temp" + relativePath + File.separator + "ReportinPDF.pdf"; String 
> > csvFilePath = File.separator + "temp" + relativePath + 
> File.separator 
> > + "ReportinCSV.dpt";
> >
> > 
> if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PD
> > F)) return (new ActionForward(pdfFilePath, true));
> >
> > return (new ActionForward(csvFilePath, true)); }
> >
> >
> > Any help would be appreciated. Thanks.

RE: Intermediate loading page


Hi Craig,

Thanks for the reply. I came across this solution, but does this not mean
that the user will only be able to generate one report at a time (since we
are storing the flag in the user's session)? If the user starts generating a
second report which is much smaller than the first then would this not
create a problem?

Thanks again for your input. Much appreciated.

-Riz.

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 16, 2004 3:37 PM
To: Struts Users Mailing List
Subject: Re: Intermediate loading page

Rizwan Merchant wrote:

>  
>
> I am working on a web application using the Struts framework. Using a 
> form on a jsp page, I generate a report which is displayed in pdf on a 
> new screen. The report is generated through an Action class method. I 
> would like to display a "Please wait" screen while the report is being 
> generated.
>
> The action class method calls functions that generate a pdf file and 
> then redirects control to that file. So I cannot use the flush() 
> method to send html to the browser while the report is being generated 
> (once a response is committed it cannot be written to again). Neither 
> can I use the 'div' tag method as my new page is not a jsp page (it is 
> a new browser window with pdf file displayed inside it).

One common strategy for this sort of thing is to refactor your action into
several, along the following lines:

* The Action that is currently creating the PDF should instead
  fire off a background thread to do the report preparation.  It
  will then forward to a "Please Wait" page (see below).

* The background thread should do whatever is needed to prepare
  the PDF file, and set a flag variable in the user's session when it's
done,
  followed by terminating the thread.

* The "Please Wait" page should say something like "Report generation
  in progress", and use a meta-refresh tag to automatically submit itself
  every few seconds, with the destination being a "Done Yet" action.

* The "Done Yet" action will consult the flag variable in the user's
session.
  If its not there, forward back to the "Please Wait" page again.  If it's
  done, forward to the URL to retrieve the PDF itself.

Craig


>
> My code is shown below
>
> //the jsp code calling the action
>  target="_blank">
>
>
> // The Action class
> public ActionForward getTransactionReports(ActionMapping mapping, 
> ActionForm form, HttpServletRequest request, HttpServletResponse 
> response) throws Exception {
>
> ICustomerAdministrationClient admin_impl = 
> getCustomerAdministrationService(request);
>
> //enforce user permission
> enforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 1);
>
> EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form; ReportsForm 
> reportsForm = admin_form.getReportsForm();
>
> //cant do this as it creates an IllegalStateException // PrintWriter 
> html = response.getWriter(); // // html.print("\nmy 
> test\n"); // html.print(" src=\"images/dpt_logo.jpg\">");
> // html.flush();
> // html.close();
>
>
> //if details type is summary then output format can only be PDF
> if(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))
> reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);
>
> //generate the reports using jasper reports 
> doJasperReports(reportsForm, request);
>
> CustomerForm customer_form = (CustomerForm)getSessionObject(request,
> "customerForm");
> Collection all_region_list_forms =
> (Collection)getSessionObject(request, "allRegionListForms");
>
> admin_form.setCustomerForm(customer_form);
> admin_form.setRegionListForms(all_region_list_forms);
> request.setAttribute(EMSConstants.FORM_VIEW, admin_form);
>
> String relativePath = File.separator + "temp_" + 
> request.getSession().getId(); String pdfFilePath = File.separator + 
> "temp" + relativePath + File.separator + "ReportinPDF.pdf"; String 
> csvFilePath = File.separator + "temp" + relativePath + File.separator 
> + "ReportinCSV.dpt";
>
> if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PD
> F)) return (new ActionForward(pdfFilePath, true));
>
> return (new ActionForward(csvFilePath, true)); }
>
>
> Any help would be appreciated. Thanks.
> 
>
> 
>
>   
>
> Rizwan Merchant - Software Developer
> 4105 Grandview Highway, Burnaby, BC, V5C 6B4, Canada
> Email:[EMAIL PROTECTED] 
> 
> Phone:   604-688-1959 x243   Fax: 604-687-4329
> Toll Free:1-888-687-6822   
> Website:www.digitalpaytech.com 
>
>
>  



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



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



RE: Intermediate loading page


Hi Craig,

Thanks for the reply. I came across this solution, but does this not mean
that the user will only be able to generate one report at a time (since we
are storing the flag in the user's session)? If the user starts generating a
second report which is much smaller than the first then would this not
create a problem?

Thanks again for your input. Much appreciated.

-Riz.

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 16, 2004 3:37 PM
To: Struts Users Mailing List
Subject: Re: Intermediate loading page

Rizwan Merchant wrote:

>  
>
> I am working on a web application using the Struts framework. Using a 
> form on a jsp page, I generate a report which is displayed in pdf on a 
> new screen. The report is generated through an Action class method. I 
> would like to display a "Please wait" screen while the report is being 
> generated.
>
> The action class method calls functions that generate a pdf file and 
> then redirects control to that file. So I cannot use the flush() 
> method to send html to the browser while the report is being generated 
> (once a response is committed it cannot be written to again). Neither 
> can I use the 'div' tag method as my new page is not a jsp page (it is 
> a new browser window with pdf file displayed inside it).

One common strategy for this sort of thing is to refactor your action into
several, along the following lines:

* The Action that is currently creating the PDF should instead
  fire off a background thread to do the report preparation.  It
  will then forward to a "Please Wait" page (see below).

* The background thread should do whatever is needed to prepare
  the PDF file, and set a flag variable in the user's session when it's
done,
  followed by terminating the thread.

* The "Please Wait" page should say something like "Report generation
  in progress", and use a meta-refresh tag to automatically submit itself
  every few seconds, with the destination being a "Done Yet" action.

* The "Done Yet" action will consult the flag variable in the user's
session.
  If its not there, forward back to the "Please Wait" page again.  If it's
  done, forward to the URL to retrieve the PDF itself.

Craig


>
> My code is shown below
>
> //the jsp code calling the action
>  target="_blank">
>
>
> // The Action class
> public ActionForward getTransactionReports(ActionMapping mapping, 
> ActionForm form, HttpServletRequest request, HttpServletResponse 
> response) throws Exception {
>
> ICustomerAdministrationClient admin_impl = 
> getCustomerAdministrationService(request);
>
> //enforce user permission
> enforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 1);
>
> EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form; ReportsForm 
> reportsForm = admin_form.getReportsForm();
>
> //cant do this as it creates an IllegalStateException // PrintWriter 
> html = response.getWriter(); // // html.print("\nmy 
> test\n"); // html.print(" src=\"images/dpt_logo.jpg\">");
> // html.flush();
> // html.close();
>
>
> //if details type is summary then output format can only be PDF
> if(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))
> reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);
>
> //generate the reports using jasper reports 
> doJasperReports(reportsForm, request);
>
> CustomerForm customer_form = (CustomerForm)getSessionObject(request,
> "customerForm");
> Collection all_region_list_forms =
> (Collection)getSessionObject(request, "allRegionListForms");
>
> admin_form.setCustomerForm(customer_form);
> admin_form.setRegionListForms(all_region_list_forms);
> request.setAttribute(EMSConstants.FORM_VIEW, admin_form);
>
> String relativePath = File.separator + "temp_" + 
> request.getSession().getId(); String pdfFilePath = File.separator + 
> "temp" + relativePath + File.separator + "ReportinPDF.pdf"; String 
> csvFilePath = File.separator + "temp" + relativePath + File.separator 
> + "ReportinCSV.dpt";
>
> if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PD
> F)) return (new ActionForward(pdfFilePath, true));
>
> return (new ActionForward(csvFilePath, true)); }
>
>
> Any help would be appreciated. Thanks.
> 
>
> 
>
>   
>
> Rizwan Merchant - Software Developer
> 4105 Grandview Highway, Burnaby, BC, V5C 6B4, Canada
> Email:[EMAIL PROTECTED] 
> 
> Phone:   604-688-1959 x243   Fax: 604-687-4329
> Toll Free:1-888-687-6822   
> Website:www.digitalpaytech.com 
>
>
>  



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



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



Re: Intermediate loading page

Rizwan Merchant wrote:
 

I am working on a web application using the Struts framework. Using a 
form on a jsp page, I generate a report which is displayed in pdf on a 
new screen. The report is generated through an Action class method. I 
would like to display a "Please wait" screen while the report is being 
generated.

The action class method calls functions that generate a pdf file and 
then redirects control to that file. So I cannot use the flush() 
method to send html to the browser while the report is being generated 
(once a response is committed it cannot be written to again). Neither 
can I use the 'div' tag method as my new page is not a jsp page (it is 
a new browser window with pdf file displayed inside it).
One common strategy for this sort of thing is to refactor your action 
into several, along the following lines:

* The Action that is currently creating the PDF should instead
 fire off a background thread to do the report preparation.  It
 will then forward to a "Please Wait" page (see below).
* The background thread should do whatever is needed to prepare
 the PDF file, and set a flag variable in the user's session when it's 
done,
 followed by terminating the thread.

* The "Please Wait" page should say something like "Report generation
 in progress", and use a meta-refresh tag to automatically submit itself
 every few seconds, with the destination being a "Done Yet" action.
* The "Done Yet" action will consult the flag variable in the user's 
session.
 If its not there, forward back to the "Please Wait" page again.  If it's
 done, forward to the URL to retrieve the PDF itself.

Craig

My code is shown below
//the jsp code calling the action


// The Action class
public ActionForward getTransactionReports(ActionMapping mapping, 
ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{

ICustomerAdministrationClient admin_impl = 
getCustomerAdministrationService(request);

//enforce user permission
enforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 1);
EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form;
ReportsForm reportsForm = admin_form.getReportsForm();
//cant do this as it creates an IllegalStateException
// PrintWriter html = response.getWriter();
//
// html.print("\nmy test\n");
// html.print("");
// html.flush();
// html.close();
//if details type is summary then output format can only be PDF
if(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))
reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);
//generate the reports using jasper reports
doJasperReports(reportsForm, request);
CustomerForm customer_form = (CustomerForm)getSessionObject(request, 
"customerForm");
Collection all_region_list_forms = 
(Collection)getSessionObject(request, "allRegionListForms");

admin_form.setCustomerForm(customer_form);
admin_form.setRegionListForms(all_region_list_forms);
request.setAttribute(EMSConstants.FORM_VIEW, admin_form);
String relativePath = File.separator + "temp_" + 
request.getSession().getId();
String pdfFilePath = File.separator + "temp" + relativePath + 
File.separator + "ReportinPDF.pdf";
String csvFilePath = File.separator + "temp" + relativePath + 
File.separator + "ReportinCSV.dpt";

if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PDF))
return (new ActionForward(pdfFilePath, true));
return (new ActionForward(csvFilePath, true));
}
Any help would be appreciated. Thanks.



Rizwan Merchant - Software Developer
4105 Grandview Highway, Burnaby, BC, V5C 6B4, Canada
Email:[EMAIL PROTECTED] 

Phone:   604-688-1959 x243   Fax: 604-687-4329
Toll Free:1-888-687-6822   
Website:www.digitalpaytech.com 

 

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


Re: Tiles problem when uploading war .... was [Re: Extending Request Processor]

I'd be tempted to ignore the 'no errors after restart' as a red herring 
as a first approach - I've seen these kinds of things from JBoss before, 
it does seem in some instances to use different code for startup and for 
hot deploy. In my experience the one that reported the errors was indeed 
correct, the one that doesn't is just being a little too lenient, either 
in interface requirements or XML parsing.
Run it in a debugger as previously suggested may well be the best next 
step. I haven't used tiles yet, but I suspect you there's something 
silly going on and you can take the exception at its word.

Dunno if that helps at all.
Brett Connor
Lucas Gonzalez Pearson wrote:
Hi,
I am still trying to find the root of this problem but I don´t seem to be
able to do it.
Has anyone experienced this problem before?
copying a struts .war file to jboss´ deploy directory and then getting this
error:
javax.servlet.ServletException: TilesPlugin : Specified RequestProcessor not
compatible with TilesRequestProcessor
   at
org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(TilesPlugin.ja
va:360)
( doing a restart throws no errors )...
Any ideas? pointers?
Thanks... =)
- Original Message - 
From: "Lucas Gonzalez Pearson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 08, 2004 6:19 PM
Subject: Re: Extending Request Processor

 

I have this in my struts-config.xml file..
   
   
value="/WEB-INF/tiles-defs.xml"/>
   
   
   

value="true"/>
 

   
it´s strange.. everything seems to be normal..
but another thing I found out was that the problem arises when I
   

hot-deploy
 

the .war file...
If I restart the jboss / tomcat , then the error is thrown, but the App
still works..
strange.. =/
- Original Message - 
From: "Venkat Maddipati" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, July 08, 2004 6:00 PM
Subject: RE: Extending Request Processor

Try to put include the following in your struts configuratin file
(struts-config.xml). Follow the  comments to understand the Tiles plugin :
I have also extended my RequesteProcessor class from TilesRequestProcessor
class.

 
 
 
 
   
   
   
 

Thanks,
Venkat


-Original Message-
From: Lucas Gonzalez Pearson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 1:37 PM
To: Struts Users Mailing List
Subject: Extending Request Processor
Hi
I´ve recently extended the requestProcessor with one of my own and found
this error:
   javax.servlet.ServletException: TilesPlugin : Specified
   

RequestProcessor
 

not compatible with TilesRequestProcessor
   at
   

org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(TilesPlugin.ja
 

va:360)
Everything seems to be fine
public class MyRequestProcessor
   extends TilesRequestProcessor {  }
and in struts-config.xml
   
I´ve searched quite a bit on the internet and only found that you have to
extend from TilesRequestProcessor just as I did
any ideas on why this is happening?

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


If you have received this e-mail in error, please delete it and notify the
sender as soon as possible. The contents of this e-mail may be
   

confidential
 

and the unauthorized use, copying, or dissemination of it and any
attachments to it, is prohibited.
Internet communications are not secure and Hyperion does not, therefore,
accept legal responsibility for the contents of this message nor for any
damage caused by viruses.  The views expressed here do not necessarily
represent those of Hyperion.
For more information about Hyperion, please visit our Web site at
www.hyperion.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


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


Intermediate loading page




 
I am working on a web application using the Struts 
framework. Using a form on a jsp page, I generate a report which is displayed in 
pdf on a new screen. The report is generated through an Action class method. I 
would like to display a "Please wait" screen while the report is being 
generated.The action class method calls functions that generate a pdf 
file and then redirects control to that file. So I cannot use the flush() method 
to send html to the browser while the report is being generated (once a response 
is committed it cannot be written to again). Neither can I use the 'div' tag 
method as my new page is not a jsp page (it is a new browser window with pdf 
file displayed inside it).My code is shown below//the jsp 
code calling the action// The Action classpublic ActionForward 
getTransactionReports(ActionMapping mapping, ActionForm form, HttpServletRequest 
request, HttpServletResponse response)throws 
Exception{ICustomerAdministrationClient admin_impl = 
getCustomerAdministrationService(request);//enforce user 
permissionenforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 
1);EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form;ReportsForm 
reportsForm = admin_form.getReportsForm();//cant do this as it creates 
an IllegalStateException// PrintWriter html = 
response.getWriter(); 
html.print("\nmy 
test\n");// 
html.print("// 
html.flush();// html.close();//if details type is summary then 
output format can only be 
PDFif(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);//generate 
the reports using jasper reportsdoJasperReports(reportsForm, 
request);CustomerForm customer_form = 
(CustomerForm)getSessionObject(request, "customerForm");Collection 
all_region_list_forms = (Collection)getSessionObject(request, 
"allRegionListForms");admin_form.setCustomerForm(customer_form);admin_form.setRegionListForms(all_region_list_forms);request.setAttribute(EMSConstants.FORM_VIEW, 
admin_form);String relativePath = File.separator + "temp_" + 
request.getSession().getId();String pdfFilePath = File.separator + "temp" + 
relativePath + File.separator + "ReportinPDF.pdf";String csvFilePath = 
File.separator + "temp" + relativePath + File.separator + 
"ReportinCSV.dpt";if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PDF))return 
(new ActionForward(pdfFilePath, true));return (new 
ActionForward(csvFilePath, true));}Any help would be 
appreciated. Thanks. 




  
  

  
  

  Rizwan Merchant - Software Developer4105 Grandview Highway, Burnaby, BC, V5C 6B4, 
  CanadaEmail:[EMAIL PROTECTED]Phone:   
  604-688-1959 x243   Fax: 604-687-4329Toll 
  Free:    
  1-888-687-6822   Website:www.digitalpaytech.com

 


Intermediate loading page




 
I am working on a web application using the Struts 
framework. Using a form on a jsp page, I generate a report which is displayed in 
pdf on a new screen. The report is generated through an Action class method. I 
would like to display a "Please wait" screen while the report is being 
generated.The action class method calls functions that generate a pdf 
file and then redirects control to that file. So I cannot use the flush() method 
to send html to the browser while the report is being generated (once a response 
is committed it cannot be written to again). Neither can I use the 'div' tag 
method as my new page is not a jsp page (it is a new browser window with pdf 
file displayed inside it).My code is shown below//the jsp 
code calling the action// The Action classpublic ActionForward 
getTransactionReports(ActionMapping mapping, ActionForm form, HttpServletRequest 
request, HttpServletResponse response)throws 
Exception{ICustomerAdministrationClient admin_impl = 
getCustomerAdministrationService(request);//enforce user 
permissionenforceFeaturePermissions(EMSConstants.FEATURE_REPORTS, request, 
1);EMSBaseAdminForm admin_form = (EMSBaseAdminForm)form;ReportsForm 
reportsForm = admin_form.getReportsForm();//cant do this as it creates 
an IllegalStateException// PrintWriter html = 
response.getWriter(); 
html.print("\nmy 
test\n");// 
html.print("// 
html.flush();// html.close();//if details type is summary then 
output format can only be 
PDFif(reportsForm.getDetailsType().equals(EMSConstants.REPORTS_SUMMARY))reportsForm.setOutputFormat(EMSConstants.REPORTS_FORMAT_PDF);//generate 
the reports using jasper reportsdoJasperReports(reportsForm, 
request);CustomerForm customer_form = 
(CustomerForm)getSessionObject(request, "customerForm");Collection 
all_region_list_forms = (Collection)getSessionObject(request, 
"allRegionListForms");admin_form.setCustomerForm(customer_form);admin_form.setRegionListForms(all_region_list_forms);request.setAttribute(EMSConstants.FORM_VIEW, 
admin_form);String relativePath = File.separator + "temp_" + 
request.getSession().getId();String pdfFilePath = File.separator + "temp" + 
relativePath + File.separator + "ReportinPDF.pdf";String csvFilePath = 
File.separator + "temp" + relativePath + File.separator + 
"ReportinCSV.dpt";if(reportsForm.getOutputFormat().equals(EMSConstants.REPORTS_FORMAT_PDF))return 
(new ActionForward(pdfFilePath, true));return (new 
ActionForward(csvFilePath, true));}Any help would be 
appreciated. Thanks. 




  
  

  
  

  Rizwan Merchant - Software Developer4105 Grandview Highway, Burnaby, BC, V5C 6B4, 
  CanadaEmail:[EMAIL PROTECTED]Phone:   
  604-688-1959 x243   Fax: 604-687-4329Toll 
  Free:    
  1-888-687-6822   Website:www.digitalpaytech.com

 


RE: How to read from web.xml?

Thanks Craig & Jason,

Yes, the string in  can be queried via

this.getServlet().getServletContext().getServletContextName()

from any Struts Action.

Thanks very much.
Ivan.

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 12, 2004 5:09 PM
To: Struts Users Mailing List
Subject: Re: How to read  from web.xml?

Ivan Vasquez wrote:

>Hi,
> 
>How can I read from web.xml, say, the application's display name? I've
>tried several things, but no luck. This isn't really Struts-specific,
>but I'm sure this is an easy one for many of you.
> 
>Thanks,
>Ivan.
>
>  
>
The web.xml file is available as a resource that can be accessed via the

ServletContext for your webapp.  For example, you can say something
like:

  ServletContext context = ...; // Get a reference to our servlet
context
  InputStream stream = context.getResourceAsStream("/WEB-INF/web.xml");

Now you've got an input stream to read the contents ... you'll probably 
want to use an XML parser to parse the contents -- google for JAXP to 
see the API that Java provides for this purpose.  Or, you might consider

using the Commons Digester package (included with Struts), which is what

Struts itself uses to parse this very resource, in order to figure out 
how the controller servlet is mapped.  Looking at the source code for 
ActionServlet should give you some useful clues.

Craig


-
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: Xtags and rtexprvalue



> -Original Message-
> From: Eric Dahnke [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 11:13 AM
> To: [EMAIL PROTECTED]
> Subject: Xtags and rtexprvalue
> 
> 
> 
> Hello,
> 
> We're using xtags and need the ability pull in different xml 
> documents based
> on locale. The tld says that the uri attribute accepts rtexprvalue. 
> 
> <% String isoLanguage = request.getLocale().getLanguage();%>
> 
>  uri="/siteCopySource/<%=isoLanguage%>/footerCopyright.xml"/>
> 
> The above jsp code always produces 
> /siteCopySource//footerCopyright.xml and
> not 
> /siteCopySource/en/footerCopyright.xml as I would hope.
> 
> 
> Anyone have any ideas? Workaround?

At a guess, the browser is not setting the language, since you're pulling it out of 
the request.  This is why struts uses application.properties as it's default message 
resource file rather then application-en.properties.  You are going to have to do the 
same, or do something like:
<% String isoLanguage = request.getLocale().getLanguage();%>
<% isoLanguage =  (isoLanguage.size() ==0 ? "en" : isoLanguage) %>

or just the siteCopySource/ directory to be your default place for english.

Or better yet 
set the language code in your action class that sets up the page, or a filter so you 
don't have scriptlets in your jsp pages, and don't have to worry about an empty 
language code. :)

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



RE: how to prepend an alias to URL?

Thanks for your feedback Craig, I promise I won't sue the forwardPattern, you're 
probably right about there not being any money in it ;).

Thanks for your reply -- it got me to the correct solution.

So here's how I fixed it for the archives:

Basically how our apache-BEA bridge worked before was that if Apache saw /BEA at the 
beginning of the URL, it stripped /BEA from the URL and sent the request to BEA to be 
serviced.  BEA saw the /myApp context and handled the app as per normal.  But then 
when it came time to generate a link, it simply used the context root, having no idea 
bout the /BEA thing...

SO -- we modified the apache-BEA link to NOT strip out the /BEA from the URL (by 
commenting out the PathTrim in the httpd.conf), and then adjusted the context-root of 
the webapp to be /BEA/myApp (using the  element in the weblogic.xml) and 
now everything is hunky-dory.

Thanks again for your comment, it pointed us in the right direction.

-Jess

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 12:27 PM
To: Struts Users Mailing List
Subject: Re: how to prepend an alias to URL?


Sant, Jessica wrote:

>I developed my struts app on BEA where I had a URL like this: 
>http://host.com:7001/myApp/index.do
>In our production environment, we're using an Apache front end, so the BEA stuff has 
>been aliased to something like this: http://host.com/BEA/myApp/index.do
>
>Going to that first page works fine, but when I click on a link the "/BEA" gets cut 
>out of the URL and it goes to: http://host.com/myApp/page2.do
>
>In all my pages I use a link like this: asdf
>
>Is suing the "forwardPattern" in my struts-config  the correct way to fix 
>this?? if so, how do I do it?
>  
>
I doubt the "forwardPattern" attribute has much money, even if you win 
your suit :-).

Actually, I would look first to how the Apache->BEA linkage is set up 
... what you really want to do is convince the servlet container that 
the context path for your application is "/BEA/myApp" instead of 
"/myApp" so that paths are calculated correctly.  Otherwise, the 
following requirement from the servlet specification:

  requestURI = contextPath + servletPath + pathInfo

will be violated, and this is an assumption that *lots* of servlet-based 
technologies rely on, not just Struts.

>Thanks so much
>   - Jess
>
>  
>
Craig

>   Jessica Sant
>   SGBU-Services and TCE
>   hewlett-packard
>
>
>-
>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]



Xtags and rtexprvalue


Hello,

We're using xtags and need the ability pull in different xml documents based
on locale. The tld says that the uri attribute accepts rtexprvalue. 

<% String isoLanguage = request.getLocale().getLanguage();%>



The above jsp code always produces /siteCopySource//footerCopyright.xml and
not 
/siteCopySource/en/footerCopyright.xml as I would hope.


Anyone have any ideas? Workaround?


Thx!


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



RE: About datasource

Sure Craig, I guess it's a good idea to look beyond the weekend..;) 
Thanks for the advice!
Geeta

> -Original Message-
> From: Craig McClanahan [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 12:16 PM
> To: Struts Users Mailing List
> Subject: Re: About datasource
> 
> 
> Geeta Ramani wrote:
> 
> >Hi:
> >
> >I think this is the sort of thing you may be looking for:
> >
> >Context ctx = new InitialContext();
> >org.apache.commons.dbcp.BasicDataSource ds =
> > 
> (org.apache.commons.dbcp.BasicDataSource)ctx.lookup("java:comp
> /env/jdbc/yourDB"));
> >
> >  
> >
> 
> That's definitely the sort of code to use when you want to 
> pull things 
> out of JNDI, but I would suggest one small change -- use the generic 
> interface (javax.sql.DataSource) instead of hard coding the 
> implementation class that the current version of Tomcat currently 
> happens to use (o.a.c.d.BasicDataSource).  This will protect you from 
> future changes that Tomcat might make, or if you ever needed to move 
> your app to a different server.
> 
> Doing this, the above code would become:
> 
> Context ctx = new InitialContext();
> DataSource ds = (DataSource) 
> ctx.lookup("java:comp/env/jdbc/yourDB");
> 
> For those using Tomcat, there's pretty extensive documentation on the 
> Tomcat web site about how to set up JNDI resources (including 
> the code 
> snippet above :-):
> 
> 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources
> -howto.html
> 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasourc
> e-examples-howto.html
> 
> >Regards,
> >Geeta
> >  
> >
> Craig
> 
> > 
> >
> >  
> >
> >>-Original Message-
> >>From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, July 16, 2004 5:18 AM
> >>To: Struts Users Mailing List
> >>Subject: Re: About datasource
> >>
> >>
> >>Hi, after some thinking, I have another problem, ^^
> >>If I am using an Action (which extent the Struts' Action 
> class), I can
> >>get the Datasource by calling getDataSource()
> >>But now I want to write my own data assess object which shouldn't
> >>extent Action, I don't know what way I can get the 
> datasource from the
> >>pool.
> >>
> >>any help??
> >>
> >>Regards
> >>
> >>
> -
> >>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: calling request.getInputStream() within Action

Hi Craig
 
Filter, hmm.
Thanks, I'll look into that :)
 
Rob

-Original Message- 
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Fri 16/07/2004 00:34 
To: Struts Users Mailing List 
Cc: 
Subject: Re: calling request.getInputStream() within Action



Robert Shields wrote:

>Hi Craig,
>
>Yes, I thought as much.
>Do you know if it's possible to exactly recreate the binary HTTP body from 
parsed parameters, or elsewhere for that matter?
> 
>
The only thing I could think of would be a Filter -- requires Servlet
2.3 or later -- that would be able to scrape a copy of the incoming
request, yet still provide getInputStream() and getReader() methods that
would let the actual servlet being invoked operate normally.

You'll also have to watch out for the complexity that a servlet can call
*either* getInputStream() *or* getReader() on any single call.  That
means, among other things, that you'll need to create a request wrapper
that not only does the copying for you, but also fakes the getReader()
method, since you'll have already called getInputStream() on the real
underlying request.

>
>I'm writing a web proxy using HttpClient - currently I've only tested a 
urlencoded form, which works fine with the following code. I wonder how it will fair 
when it encounters a mutipart form - I haven't tested yet.
>
>HttpClient client = new HttpClient();
>
>...
>
>if (request.getMethod().toLowerCase().equals("post"))
>
>{
>
>HttpMethod method = new PostMethod(url.toString());
>
>PostMethod postMethod = (PostMethod)method;
>
>// populate form parameters
>
>Enumeration paramEnum = request.getParameterNames();
>
>while (paramEnum.hasMoreElements()) {
>
>String key = ((String) paramEnum.nextElement());
>
>String[] values = request.getParameterValues(key);
>
>String value = "";
>
>for(int i=0; i
>value += values[i] + (i < values.length-1 ? "," : "");
>
>postMethod.addParameter(key, value);
>
>}
>
>}
>
> Sorry for the HTML email - outlook web access :)
>
> 
>
You'll probably need to check the content type as well ... the above
works for how browsers normally post data (content type
"application/x-www-form-urlencoded"), but multipart uploads use
something different.

On the other hand, if you never call getParameterXxx() type methods in
your servlet, you should have been able to copy the input stream as in
your original approach -- you might want to double check that you're not
doing that.

>Rob
> 
>

Craig

>   -Original Message-
>   From: Craig McClanahan [mailto:[EMAIL PROTECTED]
>   Sent: Thu 15/07/2004 17:50
>   To: Struts Users Mailing List
>   Cc:
>   Subject: Re: calling request.getInputStream() within Action
>  
>  
>
>   Robert Shields wrote:
>  
>   >Hi Bill
>   >
>   >Thanks for your response.
>   >I've tried with a servlet too, but even without calling
>   >request.getParameter the stream is still empty:
>   >
>   >
>   >
>   One way to paint yourself into this particular corner is if you're
>   trying this on a POST request.  As soon as you call a method like
>   request.getParameter(), the container has to read the content of the
>   input stream (since that is where the key/value pairs are), so trying 
to
>   read the stream after that is not going to work.
>  
>   Craig
>  
>  
>   -
>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>   For additional commands, e-mail: [EMAIL PROTECTED]
>  
>  
>   This e-mail has been scanned for all viruses by Star Internet. The
>   service is powered by MessageLabs. For more information on a proactive
>   anti-virus service working around the clock, around the globe, visit:
>   http://www.star.net.uk
>   _
>  
>
>
>Th

Re: how to prepend an alias to URL?

Sant, Jessica wrote:
I developed my struts app on BEA where I had a URL like this: 
http://host.com:7001/myApp/index.do
In our production environment, we're using an Apache front end, so the BEA stuff has 
been aliased to something like this: http://host.com/BEA/myApp/index.do
Going to that first page works fine, but when I click on a link the "/BEA" gets cut 
out of the URL and it goes to: http://host.com/myApp/page2.do
In all my pages I use a link like this: asdf
Is suing the "forwardPattern" in my struts-config  the correct way to fix this?? if so, how do I do it?
 

I doubt the "forwardPattern" attribute has much money, even if you win 
your suit :-).

Actually, I would look first to how the Apache->BEA linkage is set up 
... what you really want to do is convince the servlet container that 
the context path for your application is "/BEA/myApp" instead of 
"/myApp" so that paths are calculated correctly.  Otherwise, the 
following requirement from the servlet specification:

 requestURI = contextPath + servletPath + pathInfo
will be violated, and this is an assumption that *lots* of servlet-based 
technologies rely on, not just Struts.

Thanks so much
- Jess
 

Craig
  Jessica Sant
  SGBU-Services and TCE
  hewlett-packard
-
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: How to Disable "open" button on "File Download" dialogue box....please urgent

+1
Andrew Hill wrote:
Try here:
http://www.catb.org/~esr/faqs/smart-questions.html
ganesh gadi wrote:
Hi Friends,
i'm very happy to tell u my problems and get answers.
i need a solution how to disable "open" button on "File Download" 
dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"
httpServletResponse.setContentLength((int) f.length));
  httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f.getName()); 

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);
i'm using tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server
Thanks
Ganesh

   
__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
-
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: How to Disable "open" button on "File Download" dialogue box. ...please urgent

McCormack, Chris wrote:
Maybe a change of career or invest some time reading up the technologies that appear 
on your CV ? Just a thought
 

C'mon guys ... not everyone in the world is a native English speaker.
For those that aren't, you might have noticed that the word "urgent" 
triggers negative emotional reactions (to say nothing of spam filters 
:-).  You will generally get better results by omitting it.

Craig

-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2004 09:52
To: [EMAIL PROTECTED]
Subject: How to Disable "open" button on "File Download" dialogue
boxplease urgent

Hi Friends,
i'm very happy to tell u my problems and get answers.
i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"
httpServletResponse.setContentLength((int) f.length));
 
httpServletResponse.setContentType(mimeType);
  
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f
.getName());

os =httpServletResponse.getOutputStream();
   stream = new FileInputStream(f);
   bis = new BufferedInputStream(stream);
   is = new BufferedInputStream(bis);
   int count;
   byte buf[] = new byte[4096];
   while ((count = is.read(buf)) > -1)
   os.write(buf, 0, count);
i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh

		
__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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

For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.
Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.


-
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: About datasource

Geeta Ramani wrote:
Hi:
I think this is the sort of thing you may be looking for:
Context ctx = new InitialContext();
org.apache.commons.dbcp.BasicDataSource ds =

(org.apache.commons.dbcp.BasicDataSource)ctx.lookup("java:comp/env/jdbc/yourDB"));
 

That's definitely the sort of code to use when you want to pull things 
out of JNDI, but I would suggest one small change -- use the generic 
interface (javax.sql.DataSource) instead of hard coding the 
implementation class that the current version of Tomcat currently 
happens to use (o.a.c.d.BasicDataSource).  This will protect you from 
future changes that Tomcat might make, or if you ever needed to move 
your app to a different server.

Doing this, the above code would become:
   Context ctx = new InitialContext();
   DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/yourDB");
For those using Tomcat, there's pretty extensive documentation on the 
Tomcat web site about how to set up JNDI resources (including the code 
snippet above :-):

   
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
   
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Regards,
Geeta
 

Craig

 

-Original Message-
From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 5:18 AM
To: Struts Users Mailing List
Subject: Re: About datasource
Hi, after some thinking, I have another problem, ^^
If I am using an Action (which extent the Struts' Action class), I can
get the Datasource by calling getDataSource()
But now I want to write my own data assess object which shouldn't
extent Action, I don't know what way I can get the datasource from the
pool.
any help??
Regards
-
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: interface prototyping

I think Websphere Studio Application Developper (WSAD V5) does it... 
I did not try it...
-Message d'origine-
De : Jim Barrows [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 16 juillet 2004 17:58
À : Struts Users Mailing List
Objet : RE: interface prototyping



> -Original Message-
> From: Xavier Noria [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 8:56 AM
> To: Struts Users Mailing List
> Subject: interface prototyping
> 
> 
> What do you guys use to prototype interfaces? Is there some 
> visual way 
> to write dumb pages with forms that let you think about possible 
> website layouts and execution flows?

Straight html mostly.  Convert to jsp when it goes into development.  Seems to be 
easiest.

-
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: Tiles with definition

i fixed the trouble.
Actually, you have a lot of thing to do that i had missed.
 
Instantiate the right ActionXXXServlet and the right DefinitionFactory with parameters.
 
 
There is a wab.xml file in which it is explained if you download tutorial with src at 
Cedric DUMOULIN web site.
 
 
 
 
 
 
 


Fahd Ahmed <[EMAIL PROTECTED]> wrote:
I got this error when my xml syntax was not correct in my definitions-config
file. Check your xmls. I dont think its a struts installation problem.

-Fahd

-Original Message-
From: yakup aksu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 6:39 PM
To: [EMAIL PROTECTED]
Subject: Tiles with definition


Hi,

i m new to tiles and J2EE and i got trouble using Definitions in tiles.
I changed everything concerning component to tiles as described in the Tiles
tutorial.

Should one's override the /WEB-INF/tiles-defs.xm /WEB-INF/Mytiles-defs.xm ?

Anyway i tried both solution and nothing to do, i got all the time the same
exception.


---
javax.servlet.ServletException: Can't get definitions factory from context.
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
at org.apache.jsp.pageDefinition_jsp._jspService(pageDefinition_jsp.java:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

Is it a struts installation problem ?



Yakup AKSU

-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !


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



Yakup AKSU

-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

RE:[OT] interface prototyping

Microsoft Visio does a fine job for our organization.

It has a set of drag and drop GUI components to assist with prototyping.

Also it has tools for UML, flow charts, and site maps... all sorts of
goodies. 

Josh Holtzman

 

AMERICAN DATA COMPANY

Developing and Supporting your Online Applications

 

[EMAIL PROTECTED]

Voice: (310) 470-1257

Fax:(310) 362-8454

 

Sun Microsystems iForce Partner


-Original Message-
From: Xavier Noria [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 16, 2004 8:56 AM
To: Struts Users Mailing List
Subject: interface prototyping

What do you guys use to prototype interfaces? Is there some visual way 
to write dumb pages with forms that let you think about possible 
website layouts and execution flows?

-- fxn


-
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: interface prototyping



> -Original Message-
> From: Xavier Noria [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 8:56 AM
> To: Struts Users Mailing List
> Subject: interface prototyping
> 
> 
> What do you guys use to prototype interfaces? Is there some 
> visual way 
> to write dumb pages with forms that let you think about possible 
> website layouts and execution flows?

Straight html mostly.  Convert to jsp when it goes into development.  Seems to be 
easiest.

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



interface prototyping

What do you guys use to prototype interfaces? Is there some visual way 
to write dumb pages with forms that let you think about possible 
website layouts and execution flows?

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


RE: Tiles problem when uploading war .... was [Re: Extending Requ est Processor]

I'd grab the source for Struts and step through the problem in your favorite
debugger.

Paul

> -Original Message-
> From: Lucas Gonzalez Pearson [mailto:[EMAIL PROTECTED]
> Sent: 16 July 2004 16:29
> To: Struts Users Mailing List
> Subject: Tiles problem when uploading war  was [Re: Extending
> Request Processor]
> 
> 
> Hi,
> I am still trying to find the root of this problem but I 
> don´t seem to be
> able to do it.
> 
> Has anyone experienced this problem before?
> copying a struts .war file to jboss´ deploy directory and 
> then getting this
> error:
> 
> javax.servlet.ServletException: TilesPlugin : Specified 
> RequestProcessor not
> compatible with TilesRequestProcessor
> at
> org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(
> TilesPlugin.ja
> va:360)
> 
> ( doing a restart throws no errors )...
> 
> Any ideas? pointers?
> 
> Thanks... =)
> 
> - Original Message - 
> From: "Lucas Gonzalez Pearson" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 08, 2004 6:19 PM
> Subject: Re: Extending Request Processor
> 
> 
> > I have this in my struts-config.xml file..
> >
> > 
> >  > value="/WEB-INF/tiles-defs.xml"/>
> > 
> >  value="true"/>
> > 
> >
> >
> > it´s strange.. everything seems to be normal..
> >
> > but another thing I found out was that the problem arises when I
> hot-deploy
> > the .war file...
> >
> > If I restart the jboss / tomcat , then the error is thrown, 
> but the App
> > still works..
> >
> > strange.. =/
> >
> >
> > - Original Message - 
> > From: "Venkat Maddipati" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Thursday, July 08, 2004 6:00 PM
> > Subject: RE: Extending Request Processor
> >
> >
> > Try to put include the following in your struts configuratin file
> > (struts-config.xml). Follow the  comments to understand the 
> Tiles plugin :
> >
> > I have also extended my RequesteProcessor class from 
> TilesRequestProcessor
> > class.
> >
> >
> >
> >   
> >   
> >   
> >   
> >  >  value="/WEB-INF/tiles-defs.xml" />
> > 
> >  value="true" />
> >   
> >
> >
> >
> > Thanks,
> > Venkat
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Lucas Gonzalez Pearson 
> [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, July 08, 2004 1:37 PM
> > To: Struts Users Mailing List
> > Subject: Extending Request Processor
> >
> >
> > Hi
> > I´ve recently extended the requestProcessor with one of my 
> own and found
> > this error:
> >
> > javax.servlet.ServletException: TilesPlugin : Specified
> RequestProcessor
> > not compatible with TilesRequestProcessor
> > at
> >
> org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(
> TilesPlugin.ja
> > va:360)
> >
> > Everything seems to be fine
> >
> > public class MyRequestProcessor
> > extends TilesRequestProcessor {  }
> >
> > and in struts-config.xml
> >  > processorClass="com.convergia.laos.security.MyRequestProcessor"/>
> >
> > I´ve searched quite a bit on the internet and only found 
> that you have to
> > extend from TilesRequestProcessor just as I did
> >
> > any ideas on why this is happening?
> >
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > 
> **
> **
> >
> > If you have received this e-mail in error, please delete it 
> and notify the
> > sender as soon as possible. The contents of this e-mail may be
> confidential
> > and the unauthorized use, copying, or dissemination of it and any
> > attachments to it, is prohibited.
> >
> > Internet communications are not secure and Hyperion does 
> not, therefore,
> > accept legal responsibility for the contents of this 
> message nor for any
> > damage caused by viruses.  The views expressed here do not 
> necessarily
> > represent those of Hyperion.
> >
> > For more information about Hyperion, please visit our Web site at
> > www.hyperion.com
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of

Tiles problem when uploading war .... was [Re: Extending Request Processor]

Hi,
I am still trying to find the root of this problem but I don´t seem to be
able to do it.

Has anyone experienced this problem before?
copying a struts .war file to jboss´ deploy directory and then getting this
error:

javax.servlet.ServletException: TilesPlugin : Specified RequestProcessor not
compatible with TilesRequestProcessor
at
org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(TilesPlugin.ja
va:360)

( doing a restart throws no errors )...

Any ideas? pointers?

Thanks... =)

- Original Message - 
From: "Lucas Gonzalez Pearson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 08, 2004 6:19 PM
Subject: Re: Extending Request Processor


> I have this in my struts-config.xml file..
>
> 
>  value="/WEB-INF/tiles-defs.xml"/>
> 
> 
> 
>
>
> it´s strange.. everything seems to be normal..
>
> but another thing I found out was that the problem arises when I
hot-deploy
> the .war file...
>
> If I restart the jboss / tomcat , then the error is thrown, but the App
> still works..
>
> strange.. =/
>
>
> - Original Message - 
> From: "Venkat Maddipati" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, July 08, 2004 6:00 PM
> Subject: RE: Extending Request Processor
>
>
> Try to put include the following in your struts configuratin file
> (struts-config.xml). Follow the  comments to understand the Tiles plugin :
>
> I have also extended my RequesteProcessor class from TilesRequestProcessor
> class.
>
>
>
>   
>   
>   
>   
>   value="/WEB-INF/tiles-defs.xml" />
> 
> 
>   
>
>
>
> Thanks,
> Venkat
>
>
>
>
>
> -Original Message-
> From: Lucas Gonzalez Pearson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 1:37 PM
> To: Struts Users Mailing List
> Subject: Extending Request Processor
>
>
> Hi
> I´ve recently extended the requestProcessor with one of my own and found
> this error:
>
> javax.servlet.ServletException: TilesPlugin : Specified
RequestProcessor
> not compatible with TilesRequestProcessor
> at
>
org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(TilesPlugin.ja
> va:360)
>
> Everything seems to be fine
>
> public class MyRequestProcessor
> extends TilesRequestProcessor {  }
>
> and in struts-config.xml
>  processorClass="com.convergia.laos.security.MyRequestProcessor"/>
>
> I´ve searched quite a bit on the internet and only found that you have to
> extend from TilesRequestProcessor just as I did
>
> any ideas on why this is happening?
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> 
>
> If you have received this e-mail in error, please delete it and notify the
> sender as soon as possible. The contents of this e-mail may be
confidential
> and the unauthorized use, copying, or dissemination of it and any
> attachments to it, is prohibited.
>
> Internet communications are not secure and Hyperion does not, therefore,
> accept legal responsibility for the contents of this message nor for any
> damage caused by viruses.  The views expressed here do not necessarily
> represent those of Hyperion.
>
> For more information about Hyperion, please visit our Web site at
> www.hyperion.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



how to prepend an alias to URL?

I developed my struts app on BEA where I had a URL like this: 
http://host.com:7001/myApp/index.do
In our production environment, we're using an Apache front end, so the BEA stuff has 
been aliased to something like this: http://host.com/BEA/myApp/index.do

Going to that first page works fine, but when I click on a link the "/BEA" gets cut 
out of the URL and it goes to: http://host.com/myApp/page2.do

In all my pages I use a link like this: asdf

Is suing the "forwardPattern" in my struts-config  the correct way to fix 
this?? if so, how do I do it?

Thanks so much
- Jess

   Jessica Sant
   SGBU-Services and TCE
   hewlett-packard


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



RE: how to use controllerclasses with tiles?

Fahd,
I am not sure about class definition
class TestTileController extends TilesAction implements Controller .

I guess this has to be public, then only
org.apache.struts.tiles.ComponentDefinition 
can access com.usersmarts.sam.tilescontroller.TestTileController class.

Just check your class modifier and test it with public.

Reddy Pingili


> -Original Message-
> From: Fahd Ahmed [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 9:57 AM
> To:   Struts Users Mailing List
> Subject:  RE: how to use controllerclasses with tiles?
> 
> That doesnt work either.
> 
> The problem comes even if I take out the following lines from header.jsp
> 
> 
> 
> and
> 
>   
>  System.out.println("ident = " + request.getParameter("title"));
> 
> 
> After eliminating the abovel ines from my header, when I access any jsp
> which uses header.jsp, I get the following error.
> 
> [ServletException in:/layouts/threeColumnLayout.jsp] Error - Illegal
>  class access :Class org.apache.struts.tiles.ComponentDefinition can not
> access a
>  member of class com.usersmarts.sam.tilescontroller.TestTileController
> with
> modifiers ""
> 
> 
> -Fahd
> 
> 
> -Original Message-
> From: Pingili, Madhupal [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 6:29 PM
> To: 'Struts Users Mailing List'
> Subject: RE: how to use controllerclasses with tiles?
> 
> 
> Fahd,
> Have you tried changing scope="request" in following line
>   ?
> 
> I am looking at "Struts in Action" book co-authored by Ted Husted,
> " tag imports all of the Tiles context attributes
> into page context: " .
> 
> So, after this, you can access the attribute named "title" through page
> context.
> 
> 
> Reddy Pingili
> 
> > -Original Message-
> > From:   Fahd Ahmed [SMTP:[EMAIL PROTECTED]
> > Sent:   Friday, July 16, 2004 3:46 AM
> > To: Struts Users Mailing List
> > Subject:RE: how to use controllerclasses with tiles?
> >
> > ok i'll try to explain.
> >
> > below is the part of my definitions-config file where i declare the
> > controller class
> >
> >  > ="com.sam.tilescontroller.TestTileController" >
> > 
> > 
> > 
> > 
> >
> >
> > my controller class is as follows
> >
> > package com.sam.tilescontroller;
> >
> > import java.util.*;
> > import java.lang.*;
> >
> > import javax.servlet.ServletContext;
> >
> > import javax.servlet.http.HttpServletRequest;
> > import javax.servlet.http.HttpServletResponse;
> >
> > import org.apache.struts.tiles.Controller;
> > import org.apache.struts.tiles.ComponentContext;
> > import org.apache.struts.tiles.actions.TilesAction;
> >
> >
> > class TestTileController extends TilesAction implements Controller
> > {
> >
> > public void perform( ComponentContext context,
> > HttpServletRequest request,
> > HttpServletResponse response,
> > ServletContext servletContext)
> > {
> > try{
> > context.putAttribute("title", "hello from
> > controller");
> > }catch(Exception ex)
> > {
> > System.out.println("Exception in TilesController---"
> > + ex);
> > }
> > }
> > }
> >
> >
> > now just this code generates the error no matter i use the value stored
> in
> > context in my header.jsp or not. but for completion the header.jsp look
> > like
> >
> >  > xmlns:jsp="http://java.sun.com/JSP/Page";
> > xmlns:c="http://java.sun.com/jsp/jstl/core";
> > xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles";
> > xmlns:fn="http://java.sun.com/jsp/jstl/functions";
> > version="2.0" >
> >
> > 
> >
> > 
> > 
> > 
> > 
> >  > size="4">${title}
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > | ${item.value}
> > 
> > |
> > 
> > 
> > System.out.println("ident = " + request.getParameter("title"));
> > 
> > 
> > 
> > 
> > 
> >
> >
> > also the web.xml has the following entry
> >
> >
> >   Tiles Servlet
> >
> org.apache.struts.tiles.TilesServlet
> >   
> >  definitions-config
> >
> >
> /WEB-INF/safe-tiles.xml,/WEB-INF/situation-tiles.xml > al
> > ue>
> >   
> >   2
> >
> >
> > guess now you may be able to understand and pin point the problem.'
> >
> > Fahd
> >
> >
> >
> >
> > -Original Message-
> > From: Mark Mandel [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 16, 2004 10:38 AM
> > To: Struts Users Mailing List
> > Subject: Re: how to use controllerclasses with tiles?
> >
> >
> > Fahd,
> >
> > I've successfully implemented heaps of controller classes, but I'm
> > having trouble visualising what you have done.
> >
> > Any chance of a code example?
> >
> > Mark

RE: Help Require !!!!!!!!!!!

Buland,

you might have to rewrite your mail to get an answer. Subjects like "Help
Require !!!" usually ensure that no one ever bothers reading your post.
Please keep in mind that everybody on this list answers voluntarily in
his/her spare time. Please do not take offence and think of this mail as a
little advice on the unspoken rules of every mailing list. (and life in
general :)

Cheers, Jan


> -Original Message-
> From: Buland Altaf [mailto:[EMAIL PROTECTED] 
> Sent: Friday, July 16, 2004 1:26 PM
> To: [EMAIL PROTECTED]
> Subject: Help Require !!!
> 
> 
> Hi Theres,
> 
> I am stucking on some issues and those are:-
> 
> ___ Problem 1 __
> 
> >1. I am facing later mentioned problem of
> >master-detail from on session time out.I am using 
> DynaActionForms with 
> >array properties as form-bean property.
> > >
> 
> type="com.abamco.clientVerification.VerifyOrMakeBrokerPayments[]"/>
> 
> >and i have set session as its action scope. But 2.
> >when my application restarts and i Re-fresh the
> >
> >
> >>masteer-detail form it
> >>gives me the following error:
> >>
> >>- Error Start
> >>-
> >>
> >>HTTP Status 500 -
> >>
> >>type Exception report
> >>
> >>message
> >>
> >>description The server encountered an internal
> 
> error
> 
> >>() that prevented it from fulfilling this request.
> >>
> >>exception
> >>
> >>javax.servlet.ServletException: BeanUtils.populate
> >>
> >>
> >
> >
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1190)
> 
> 
> g.apache.struts.action.RequestProcessor.processPopulate(Reques
> tProcessor.j
> 
> >>ava:821)
> >>
> >>
> >
> >
> 
> g.apache.struts.action.RequestProcessor.process(RequestProcess
> or.java:254)
> 
> 
> g.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
> 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> >>root cause
> >>
> >>java.lang.ArrayIndexOutOfBoundsException
> >>java.lang.reflect.Array.get(Native Method)
> >>
> >>
> >
> >
> org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)
> 
> 
> g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(Pr
> opertyUtils.
> 
> >>java:474)
> >>
> >>
> >
> >
> 
> g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(Pr
> opertyUtils.
> 
> >>java:428)
> >>
> >>
> >
> >
> 
> g.apache.commons.beanutils.PropertyUtils.getNestedProperty(Pro
> pertyUtils.j
> 
> >>ava:770)
> >>
> >>
> >
> >
> 
> g.apache.commons.beanutils.PropertyUtils.getProperty(PropertyU
> tils.java:80
> 
> >>1)
> >>
> >>
> >
> >
> 
> g.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
> 
> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
> 
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1188)
> 
> 
> g.apache.struts.action.RequestProcessor.processPopulate(Reques
> tProcessor.j
> 
> >>ava:821)
> >>
> >>
> >
> >
> 
> g.apache.struts.action.RequestProcessor.process(RequestProcess
> or.java:254)
> 
> 
> g.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
> 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> note The full stack trace of the root cause is
> available in the Tomcat logs.
> 
> Apache Tomcat/5.0.16
> - Error End -
> 
> I have my own created reset button in which
> i nullify all teh feilds. But, tis method is now a
> callback method. I do't override the
> reset(ActionMapping,HttServletRequest) method. All the
> form properties exactly matching with their
> corresponding dynaactionfrom properties and this
> screen is working properly. It only behave abnormally
> when my web app context restarts or tomcat restarts as
> in that case session will lost.
> 
> __ Problem 2 _
> 
> 2. Also, One more problem.I have tried to fix it but
> as a new commer I have now stucked. Actually, I have a
> bean which i want to use in jsp with iterate tag. and
> i have like this:-
> 
>  property="client">  name="individualAccountRegForm" property="client"> 
>  
>   indexed="true" property="clientId"/>
>  property="primaryClient" idName="client" 
> value="primaryClient" indexed="true"/> 
> 
> 
> 
> 
> I mean to say that if i have indexed properties and i
> want to check some equal operator on it then there is
> no indexed attribute in logic:equal or any other
> comparison tag. even then it picks the indexed
> property value properly. How this happens.Is thie any
> auto build flexibility in those tags top check the
> commign property that either iot is a normal or
> indexed property.
> 
> 
> __ Problem 3
> 
> I have the radio buttons, but they are not behaving
> pro

RE: Tiles with definition

Yes, i did.
 
Which jar shall i add to my app/lib
 
i got theses jars: 
 
- commons*.
- jakarta-oro
-servlet
-struts
 
Did i miss any jar ?
 
(Additionnaly i added jboss-j2ee but it doesn't change anything


"Pingili, Madhupal" <[EMAIL PROTECTED]> wrote:

Have you updated struts-config.xml with the plugin like this:


value="/WEB-INF/tiles-defs.xml"/>



Just curious,

Reddy Pingili


> -Original Message-
> From: yakup aksu [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 9:39 AM
> To: [EMAIL PROTECTED]
> Subject: Tiles with definition
> 
> Hi,
> 
> i m new to tiles and J2EE and i got trouble using Definitions in tiles.
> I changed everything concerning component to tiles as described in the
> Tiles tutorial.
> 
> Should one's override the /WEB-INF/tiles-defs.xm /WEB-INF/Mytiles-defs.xm
> ?
> 
> Anyway i tried both solution and nothing to do, i got all the time the
> same exception.
> 
> --
> -
> javax.servlet.ServletException: Can't get definitions factory from
> context.
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
> mpl.java:533)
> at
> org.apache.jsp.pageDefinition_jsp._jspService(pageDefinition_jsp.java:59)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> 
> Is it a struts installation problem ?
> 
> 
> 
> Yakup AKSU
> 
> -
> Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
> Créez votre Yahoo! Mail
> 
> Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

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



Yakup AKSU

-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

RE: how to use controllerclasses with tiles?

That doesnt work either.

The problem comes even if I take out the following lines from header.jsp



and


 System.out.println("ident = " + request.getParameter("title"));


After eliminating the abovel ines from my header, when I access any jsp
which uses header.jsp, I get the following error.

[ServletException in:/layouts/threeColumnLayout.jsp] Error - Illegal
 class access :Class org.apache.struts.tiles.ComponentDefinition can not
access a
 member of class com.usersmarts.sam.tilescontroller.TestTileController with
modifiers ""


-Fahd


-Original Message-
From: Pingili, Madhupal [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 6:29 PM
To: 'Struts Users Mailing List'
Subject: RE: how to use controllerclasses with tiles?


Fahd,
Have you tried changing scope="request" in following line
  ?

I am looking at "Struts in Action" book co-authored by Ted Husted,
" tag imports all of the Tiles context attributes
into page context: " .

So, after this, you can access the attribute named "title" through page
context.


Reddy Pingili

> -Original Message-
> From: Fahd Ahmed [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 3:46 AM
> To:   Struts Users Mailing List
> Subject:  RE: how to use controllerclasses with tiles?
>
> ok i'll try to explain.
>
> below is the part of my definitions-config file where i declare the
> controller class
>
>  ="com.sam.tilescontroller.TestTileController" >
> 
> 
> 
> 
>
>
> my controller class is as follows
>
> package com.sam.tilescontroller;
>
> import java.util.*;
> import java.lang.*;
>
> import javax.servlet.ServletContext;
>
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
> import org.apache.struts.tiles.Controller;
> import org.apache.struts.tiles.ComponentContext;
> import org.apache.struts.tiles.actions.TilesAction;
>
>
> class TestTileController extends TilesAction implements Controller
> {
>
>   public void perform( ComponentContext context,
>   HttpServletRequest request,
>   HttpServletResponse response,
>   ServletContext servletContext)
>   {
>   try{
>   context.putAttribute("title", "hello from
> controller");
>   }catch(Exception ex)
>   {
>   System.out.println("Exception in TilesController---"
> + ex);
>   }
>   }
> }
>
>
> now just this code generates the error no matter i use the value stored in
> context in my header.jsp or not. but for completion the header.jsp look
> like
>
>  xmlns:jsp="http://java.sun.com/JSP/Page";
> xmlns:c="http://java.sun.com/jsp/jstl/core";
> xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles";
> xmlns:fn="http://java.sun.com/jsp/jstl/functions";
> version="2.0" >
>
> 
>
> 
> 
> 
> 
>  size="4">${title}
>
> 
> 
> 
> 
> 
> 
> | ${item.value}
> 
> |
> 
> 
> System.out.println("ident = " + request.getParameter("title"));
> 
> 
> 
> 
> 
>
>
> also the web.xml has the following entry
>
>
>   Tiles Servlet
>   org.apache.struts.tiles.TilesServlet
>   
>  definitions-config
>
> /WEB-INF/safe-tiles.xml,/WEB-INF/situation-tiles.xml al
> ue>
>   
>   2
>
>
> guess now you may be able to understand and pin point the problem.'
>
> Fahd
>
>
>
>
> -Original Message-
> From: Mark Mandel [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 10:38 AM
> To: Struts Users Mailing List
> Subject: Re: how to use controllerclasses with tiles?
>
>
> Fahd,
>
> I've successfully implemented heaps of controller classes, but I'm
> having trouble visualising what you have done.
>
> Any chance of a code example?
>
> Mark
>
> On Fri, 16 Jul 2004 10:35:13 +0500, Fahd Ahmed <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to use a controllerClass with Tiles. I am mentioning the
> > controllerClass in one of my definition tags. The controller does
> nothing
> > but put a varible in ComponentContext. On the JSP I just use the
> > importAttribute tag to get that value. But when i access the page, I
> keep
> on
> > getting the following error.
> >
> > [ServletException in:/layouts/threeColumnLayout.jsp] Error - Illegal
> class
> > access :Class org.apache.struts.tiles.ComponentDefinition can not access
> a
> > member of class com.usersmarts.sam.tilescontroller.TestTileController
> with
> > modifiers ""
> >
> > threeColumnlayout is my layout JSP and TestTileController is the
> controller
> > class I am associating with the definition tag.
> >
> > Anyone who can think of a reason???
> >
> > Regards

RE: Tiles with definition

I got this error when my xml syntax was not correct in my definitions-config
file. Check your xmls. I dont think its a struts installation problem.

-Fahd

-Original Message-
From: yakup aksu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 6:39 PM
To: [EMAIL PROTECTED]
Subject: Tiles with definition


Hi,

i m new to tiles and J2EE and i got trouble using Definitions in tiles.
I changed everything concerning component to tiles as described in the Tiles
tutorial.

Should one's override the /WEB-INF/tiles-defs.xm /WEB-INF/Mytiles-defs.xm ?

Anyway i tried both solution and nothing to do, i got all the time the same
exception.


---
javax.servlet.ServletException: Can't get definitions factory from context.
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
at org.apache.jsp.pageDefinition_jsp._jspService(pageDefinition_jsp.java:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

Is it a struts installation problem ?



Yakup AKSU

-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !


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



RE: Tiles with definition


Have you updated struts-config.xml with the plugin like this:


  

Just curious,

Reddy Pingili


> -Original Message-
> From: yakup aksu [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 9:39 AM
> To:   [EMAIL PROTECTED]
> Subject:  Tiles with definition
> 
> Hi,
> 
> i m new to tiles and J2EE and i got trouble using Definitions in tiles.
> I changed everything concerning component to tiles as described in the
> Tiles tutorial.
> 
> Should one's override the /WEB-INF/tiles-defs.xm /WEB-INF/Mytiles-defs.xm
> ?
> 
> Anyway i tried both solution and nothing to do, i got all the time the
> same exception.
> 
> --
> -
> javax.servlet.ServletException: Can't get definitions factory from
> context.
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
> mpl.java:533)
> at
> org.apache.jsp.pageDefinition_jsp._jspService(pageDefinition_jsp.java:59)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> 
> Is it a struts installation problem ?
>  
> 
> 
> Yakup AKSU
>   
> -
> Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
> Créez votre Yahoo! Mail
> 
> Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

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



Tiles with definition

Hi,

i m new to tiles and J2EE and i got trouble using Definitions in tiles.
I changed everything concerning component to tiles as described in the Tiles tutorial.

Should one's override the /WEB-INF/tiles-defs.xm /WEB-INF/Mytiles-defs.xm ?

Anyway i tried both solution and nothing to do, i got all the time the same exception.

---
javax.servlet.ServletException: Can't get definitions factory from context.
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.pageDefinition_jsp._jspService(pageDefinition_jsp.java:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

Is it a struts installation problem ?
 


Yakup AKSU

-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

RE: how to use controllerclasses with tiles?

Fahd,
Have you tried changing scope="request" in following line 
  ?

I am looking at "Struts in Action" book co-authored by Ted Husted,
" tag imports all of the Tiles context attributes
into page context: " .

So, after this, you can access the attribute named "title" through page
context.


Reddy Pingili

> -Original Message-
> From: Fahd Ahmed [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 3:46 AM
> To:   Struts Users Mailing List
> Subject:  RE: how to use controllerclasses with tiles?
> 
> ok i'll try to explain.
> 
> below is the part of my definitions-config file where i declare the
> controller class
> 
>  ="com.sam.tilescontroller.TestTileController" >
> 
> 
> 
> 
> 
> 
> my controller class is as follows
> 
> package com.sam.tilescontroller;
> 
> import java.util.*;
> import java.lang.*;
> 
> import javax.servlet.ServletContext;
> 
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> 
> import org.apache.struts.tiles.Controller;
> import org.apache.struts.tiles.ComponentContext;
> import org.apache.struts.tiles.actions.TilesAction;
> 
> 
> class TestTileController extends TilesAction implements Controller
> {
> 
>   public void perform( ComponentContext context,
>   HttpServletRequest request,
>   HttpServletResponse response,
>   ServletContext servletContext)
>   {
>   try{
>   context.putAttribute("title", "hello from
> controller");
>   }catch(Exception ex)
>   {
>   System.out.println("Exception in TilesController---"
> + ex);
>   }
>   }
> }
> 
> 
> now just this code generates the error no matter i use the value stored in
> context in my header.jsp or not. but for completion the header.jsp look
> like
> 
>  xmlns:jsp="http://java.sun.com/JSP/Page";
> xmlns:c="http://java.sun.com/jsp/jstl/core";
> xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles";
> xmlns:fn="http://java.sun.com/jsp/jstl/functions";
> version="2.0" >
> 
> 
> 
> 
> 
> 
> 
>  size="4">${title}
>
> 
> 
> 
> 
> 
> 
> | ${item.value}
> 
> |
> 
> 
> System.out.println("ident = " + request.getParameter("title"));
> 
> 
> 
> 
> 
> 
> 
> also the web.xml has the following entry
> 
>
>   Tiles Servlet
>   org.apache.struts.tiles.TilesServlet
>   
>  definitions-config
> 
> /WEB-INF/safe-tiles.xml,/WEB-INF/situation-tiles.xml al
> ue>
>   
>   2
>
> 
> guess now you may be able to understand and pin point the problem.'
> 
> Fahd
> 
> 
> 
> 
> -Original Message-
> From: Mark Mandel [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 10:38 AM
> To: Struts Users Mailing List
> Subject: Re: how to use controllerclasses with tiles?
> 
> 
> Fahd,
> 
> I've successfully implemented heaps of controller classes, but I'm
> having trouble visualising what you have done.
> 
> Any chance of a code example?
> 
> Mark
> 
> On Fri, 16 Jul 2004 10:35:13 +0500, Fahd Ahmed <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to use a controllerClass with Tiles. I am mentioning the
> > controllerClass in one of my definition tags. The controller does
> nothing
> > but put a varible in ComponentContext. On the JSP I just use the
> > importAttribute tag to get that value. But when i access the page, I
> keep
> on
> > getting the following error.
> >
> > [ServletException in:/layouts/threeColumnLayout.jsp] Error - Illegal
> class
> > access :Class org.apache.struts.tiles.ComponentDefinition can not access
> a
> > member of class com.usersmarts.sam.tilescontroller.TestTileController
> with
> > modifiers ""
> >
> > threeColumnlayout is my layout JSP and TestTileController is the
> controller
> > class I am associating with the definition tag.
> >
> > Anyone who can think of a reason???
> >
> > Regards
> > Fahd
> 
> 
> --
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com
> ICQ: 3094740
> 
> -
> 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: Best practice request - dynamic link to redraw page

At 03:52 AM 7/16/2004, you wrote:
On every page of the basket the contents of the basket are shown in a
panel at the bottom of the page, and against each product is a 'delete'
hyperlink.  When the user clicks on this link the product should be
removed and the page refreshed to show the modified info.

Do you know that you can have different forwards for the same action?  E.g. 
"success", "failure", "delete", etc.? 


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


RE: How to Disable "open" button on "File Download" dialogue box....please urgent

Ganesh:

Try something like this:
response.setHeader("Content-Disposition", "inline;filename=myfilename.xyz");

I believe if the extension ("xyz") is "unknown" then a "file save as" dialog will 
always occur.

Also, and I mean this in the kindliest way, maybe you should be a bit more careful 
when you write to this list. Words like "Now i require that feature." or "pls let me 
know the solution asap." irritate people because this list is *entirely* made up of 
volunteers who have "regular" jobs and other things they have to do. Again, no 
harshness intended, just thought you may like to know this for the future..

Regards, and good luck..
Geeta

> -Original Message-
> From: ganesh gadi [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 4:52 AM
> To: [EMAIL PROTECTED]
> Subject: How to Disable "open" button on "File Download" dialogue
> boxplease urgent
> 
> 
> Hi Friends,
> 
> i'm very happy to tell u my problems and get answers.
> 
> i need a solution how to disable "open" button on 
> "File Download" dialog box.i want control on it.
> Pls don't say no solution.Bcox i saw that type of
> dialogue box...Now i require that feature.
> pls let me know the solution asap.
> 
> I used the following code to appear "File Download
> box"
> 
> httpServletResponse.setContentLength((int) f.length));
>   
> httpServletResponse.setContentType(mimeType);
>
> httpServletResponse.setHeader("Content-Disposition","attachmen
> t;filename="+f.getName());
> 
> os =httpServletResponse.getOutputStream();
> stream = new FileInputStream(f);
> bis = new BufferedInputStream(stream);
> is = new BufferedInputStream(bis);
> int count;
> byte buf[] = new byte[4096];
> while ((count = is.read(buf)) > -1)
> os.write(buf, 0, count);
> 
> 
> i'm using 
> tomcat 5.0.19
> Struts 1.1
> IE 6.0
> Windows 2000server
> 
> Thanks
> Ganesh
> 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail 
> 
> -
> 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: simple Question

Hi Alvin: 

This question has appeared a few times, so you may benefit from searching the 
archives. Short answer(s): either use tokens (like you suggested) or use a redirect 
instead of a forward.

Regards,
Geeta

> -Original Message-
> From: Alvin Antony [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 8:15 AM
> To: [EMAIL PROTECTED]
> Subject: simple Question
> 
> 
> hi friends,
>   how can i prevent the user from refreshing the page 
> and repeating the save process a second time?. Is the 
> Transaction token is good for checking this? 
> 
> thanks a lot,
> Alvin
> 
> 
> Alvin Antony
> Software Engineer
> 
> Ludwig-Maximilians-Universitaet München
> Zentrale Universitaetsverwaltung
> Referat IIIA 3 (Anwendungs Entwicklung)
> Theresienstr. 37 / 2. Stock  Zi. 249
> 80333 Muenchen
> 
> phone  +49 (089) 2180 - 4005
> 
> mail  [EMAIL PROTECTED] 
> web http://informationstechnik.verwaltung.uni-muenchen.de 
> 
> >>> [EMAIL PROTECTED] 16.07.04 13.14 >>>
> Dear,
> 
> First u need to set the hyperlink of the action(in
> which u have implemented delete method logic) on the
> primary key basis through which u will delete the
> record and create an action forard in struts config
> file(action of the class in which u have implementated
> the logic to diaplay records in the view) and forward
> to that action from delete method.
> 
>  Struits-config.xml 
>  type="viewAction.do?parameter=methodName">
> -
> 
> --- View 
>  Delete 
> (or use struts link tag)
> -
> 
> from delete action u need to forward to viewAction and
> all display logic will be there.
> 
> Plz let me know in case of any inconvenience/problem.
> 
> regards,
> Buland
> 
> --- Jon Barber <[EMAIL PROTECTED]> wrote:
> > Dear All,
> > 
> > Trawled through the archive with no luck, but then I
> > couldn't work out
> > the best search terms for this question, so...
> > 
> > I'm writing a shopping basket app with the usual
> > requirements, and using
> > tiles which has made things a lot less painful.
> > However, I have this one
> > problem that I can't work out a nice way to solve.
> > 
> > On every page of the basket the contents of the
> > basket are shown in a
> > panel at the bottom of the page, and against each
> > product is a 'delete'
> > hyperlink.  When the user clicks on this link the
> > product should be
> > removed and the page refreshed to show the modified
> > info.
> > 
> > My question is - how to code the logic to do the
> > deletion of the product
> > in such a way that the refreshing of the page is
> > handled in a nice way ?
> > I have the usual way of using an Action to populate
> > the contexts to
> > render the page, and then an Action to process the
> > users response. When
> > a product is removed I will have to delete the
> > product & then redirect
> > the user back to the Action to populate the page all
> > over again.
> > 
> > As far as I can see I have 2 options :
> > 
> > 1. Have one Action that performs the product removal
> > and that accepts a
> > URL as a parameter that then redirects the user
> > using that URL. I will
> > have to place the necessary URL in the context so
> > that when the page is
> > rendered the redirect URL is set correctly for
> > wherever the user is.
> > Painful & not very nice - every populate Action will
> > have to put the
> > correct URL for itself into the context.
> > 
> > 2. Have a seperate Action for every single delete
> > page so that each
> > instance knows where to send the user back to. Not
> > much different from 1
> > & leads to a lot of Actions.
> > 
> > Any ideas ? 
> > 
> > Am I missing the obvious ? For example, for 1 can I
> > simply use the
> > present request URL as the URL to redirect the user
> > to to redraw the
> > page ?
> > 
> > Jon.
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> =
> 
> Buland Altaf Malik,
> Software Engineer, 
> Softech System's(pvt)Ltd. 
> 10/25 asad jan road lahore,cantt - 54810 Pakistan
> Tel: 92-42-6665812 , 92-42-6660802
> 
> Mob: 0333-4344113
> Fax: 92-42-6665792
> 
> http://www.softech.com.pk
> [EMAIL PROTECTED]
> 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mai

RE: simple Question

I use a two pronged approach:
1) After a save do a redirecting forward. This means that refresh will not
resubmit the save process.
2) Use tokens so that if somehow the user manages to resubmit the save
process you can intercept this.

Paul

> -Original Message-
> From: Alvin Antony [mailto:[EMAIL PROTECTED]
> Sent: 16 July 2004 13:15
> To: [EMAIL PROTECTED]
> Subject: simple Question
> 
> 
> hi friends,
>   how can i prevent the user from refreshing the page 
> and repeating the save process a second time?. Is the 
> Transaction token is good for checking this? 
> 
> thanks a lot,
> Alvin
> 
> 
> Alvin Antony
> Software Engineer
> 
> Ludwig-Maximilians-Universitaet München
> Zentrale Universitaetsverwaltung
> Referat IIIA 3 (Anwendungs Entwicklung)
> Theresienstr. 37 / 2. Stock  Zi. 249
> 80333 Muenchen
> 
> phone  +49 (089) 2180 - 4005
> 
> mail  [EMAIL PROTECTED] 
> web http://informationstechnik.verwaltung.uni-muenchen.de 
> 
> >>> [EMAIL PROTECTED] 16.07.04 13.14 >>>
> Dear,
> 
> First u need to set the hyperlink of the action(in
> which u have implemented delete method logic) on the
> primary key basis through which u will delete the
> record and create an action forard in struts config
> file(action of the class in which u have implementated
> the logic to diaplay records in the view) and forward
> to that action from delete method.
> 
>  Struits-config.xml 
>  type="viewAction.do?parameter=methodName">
> -
> 
> --- View 
>  Delete 
> (or use struts link tag)
> -
> 
> from delete action u need to forward to viewAction and
> all display logic will be there.
> 
> Plz let me know in case of any inconvenience/problem.
> 
> regards,
> Buland
> 
> --- Jon Barber <[EMAIL PROTECTED]> wrote:
> > Dear All,
> > 
> > Trawled through the archive with no luck, but then I
> > couldn't work out
> > the best search terms for this question, so...
> > 
> > I'm writing a shopping basket app with the usual
> > requirements, and using
> > tiles which has made things a lot less painful.
> > However, I have this one
> > problem that I can't work out a nice way to solve.
> > 
> > On every page of the basket the contents of the
> > basket are shown in a
> > panel at the bottom of the page, and against each
> > product is a 'delete'
> > hyperlink.  When the user clicks on this link the
> > product should be
> > removed and the page refreshed to show the modified
> > info.
> > 
> > My question is - how to code the logic to do the
> > deletion of the product
> > in such a way that the refreshing of the page is
> > handled in a nice way ?
> > I have the usual way of using an Action to populate
> > the contexts to
> > render the page, and then an Action to process the
> > users response. When
> > a product is removed I will have to delete the
> > product & then redirect
> > the user back to the Action to populate the page all
> > over again.
> > 
> > As far as I can see I have 2 options :
> > 
> > 1. Have one Action that performs the product removal
> > and that accepts a
> > URL as a parameter that then redirects the user
> > using that URL. I will
> > have to place the necessary URL in the context so
> > that when the page is
> > rendered the redirect URL is set correctly for
> > wherever the user is.
> > Painful & not very nice - every populate Action will
> > have to put the
> > correct URL for itself into the context.
> > 
> > 2. Have a seperate Action for every single delete
> > page so that each
> > instance knows where to send the user back to. Not
> > much different from 1
> > & leads to a lot of Actions.
> > 
> > Any ideas ? 
> > 
> > Am I missing the obvious ? For example, for 1 can I
> > simply use the
> > present request URL as the URL to redirect the user
> > to to redraw the
> > page ?
> > 
> > Jon.
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> =
> 
> Buland Altaf Malik,
> Software Engineer, 
> Softech System's(pvt)Ltd. 
> 10/25 asad jan road lahore,cantt - 54810 Pakistan
> Tel: 92-42-6665812 , 92-42-6660802
> 
> Mob: 0333-4344113
> Fax: 92-42-6665792
> 
> http://www.softech.com.pk
> [EMAIL PROTECTED]
> 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional

RE: About datasource

Hi:

I think this is the sort of thing you may be looking for:

Context ctx = new InitialContext();
org.apache.commons.dbcp.BasicDataSource ds =

(org.apache.commons.dbcp.BasicDataSource)ctx.lookup("java:comp/env/jdbc/yourDB"));

Regards,
Geeta


> -Original Message-
> From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 16, 2004 5:18 AM
> To: Struts Users Mailing List
> Subject: Re: About datasource
> 
> 
> Hi, after some thinking, I have another problem, ^^
> If I am using an Action (which extent the Struts' Action class), I can
> get the Datasource by calling getDataSource()
> But now I want to write my own data assess object which shouldn't
> extent Action, I don't know what way I can get the datasource from the
> pool.
> 
> any help??
> 
> Regards
> 
> -
> 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]



simple Question

hi friends,
  how can i prevent the user from refreshing the page and repeating the save 
process a second time?. Is the Transaction token is good for checking this? 

thanks a lot,
Alvin


Alvin Antony
Software Engineer

Ludwig-Maximilians-Universitaet München
Zentrale Universitaetsverwaltung
Referat IIIA 3 (Anwendungs Entwicklung)
Theresienstr. 37 / 2. Stock  Zi. 249
80333 Muenchen

phone  +49 (089) 2180 - 4005

mail  [EMAIL PROTECTED] 
web http://informationstechnik.verwaltung.uni-muenchen.de 

>>> [EMAIL PROTECTED] 16.07.04 13.14 >>>
Dear,

First u need to set the hyperlink of the action(in
which u have implemented delete method logic) on the
primary key basis through which u will delete the
record and create an action forard in struts config
file(action of the class in which u have implementated
the logic to diaplay records in the view) and forward
to that action from delete method.

 Struits-config.xml 

-

--- View 
 Delete 
(or use struts link tag)
-

from delete action u need to forward to viewAction and
all display logic will be there.

Plz let me know in case of any inconvenience/problem.

regards,
Buland

--- Jon Barber <[EMAIL PROTECTED]> wrote:
> Dear All,
> 
> Trawled through the archive with no luck, but then I
> couldn't work out
> the best search terms for this question, so...
> 
> I'm writing a shopping basket app with the usual
> requirements, and using
> tiles which has made things a lot less painful.
> However, I have this one
> problem that I can't work out a nice way to solve.
> 
> On every page of the basket the contents of the
> basket are shown in a
> panel at the bottom of the page, and against each
> product is a 'delete'
> hyperlink.  When the user clicks on this link the
> product should be
> removed and the page refreshed to show the modified
> info.
> 
> My question is - how to code the logic to do the
> deletion of the product
> in such a way that the refreshing of the page is
> handled in a nice way ?
> I have the usual way of using an Action to populate
> the contexts to
> render the page, and then an Action to process the
> users response. When
> a product is removed I will have to delete the
> product & then redirect
> the user back to the Action to populate the page all
> over again.
> 
> As far as I can see I have 2 options :
> 
> 1. Have one Action that performs the product removal
> and that accepts a
> URL as a parameter that then redirects the user
> using that URL. I will
> have to place the necessary URL in the context so
> that when the page is
> rendered the redirect URL is set correctly for
> wherever the user is.
> Painful & not very nice - every populate Action will
> have to put the
> correct URL for itself into the context.
> 
> 2. Have a seperate Action for every single delete
> page so that each
> instance knows where to send the user back to. Not
> much different from 1
> & leads to a lot of Actions.
> 
> Any ideas ? 
> 
> Am I missing the obvious ? For example, for 1 can I
> simply use the
> present request URL as the URL to redirect the user
> to to redraw the
> page ?
> 
> Jon.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


=

Buland Altaf Malik,
Software Engineer, 
Softech System's(pvt)Ltd. 
10/25 asad jan road lahore,cantt - 54810 Pakistan
Tel: 92-42-6665812 , 92-42-6660802

Mob: 0333-4344113
Fax: 92-42-6665792

http://www.softech.com.pk
[EMAIL PROTECTED]





__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

-
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: How to Disable "open" button on "File Download" dialogue box....please urgent

Try here:
http://www.catb.org/~esr/faqs/smart-questions.html
ganesh gadi wrote:
Hi Friends,
i'm very happy to tell u my problems and get answers.
i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"
httpServletResponse.setContentLength((int) f.length));
  
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f.getName());

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);
i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh

		
__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

-
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: Best practice request - dynamic link to redraw page


This is not a potential hazard because
typically in all shopping cart applications cart items are stored in HttpSession
and no other user can change the sesion of some user ( this security is
provided by Java Servlet API)

Regards,
Puneet Agarwal
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





"McCormack, Chris"
<[EMAIL PROTECTED]> 
07/16/2004 04:51 PM




Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
RE: Best practice request
- dynamic link to redraw page








If you use this method, I would advise that you cross
check the itemid to be removed, with the user attempting to remove the
item session identifier. 
There is potential otherwise for a script kiddie to write a simple script
that counts from 0-n and submit's each iteration to the remove action,
in theory this would remove every item from every users basket if it run
quick enough.
 
Either that or encrypt the itemkey that is written to the page.
 
Chris McCormack

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 16 July 2004 12:12
To: Struts Users Mailing List
Subject: Re: Best practice request - dynamic link to redraw page



Jon, 
The way it is managed is, while you paint the "delete" links
in your HTML, you add a query string like this 

?itemid=xyz 

and then in your action class method obtain the value of this variable
itemid ( obviously through form-bean) 
and this is how single statement can do the work 

Hope this answeres your query. 

Regards, 
Puneet Agarwal
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com 



"Jon Barber" <[EMAIL PROTECTED]> 


07/16/2004 04:22 PM 



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
"Struts Users Mailing List" <[EMAIL PROTECTED]> 

cc

Subject
Best practice request - dynamic link to redraw page

                





Dear All,

Trawled through the archive with no luck, but then I couldn't work out
the best search terms for this question, so...

I'm writing a shopping basket app with the usual requirements, and using
tiles which has made things a lot less painful. However, I have this one
problem that I can't work out a nice way to solve.

On every page of the basket the contents of the basket are shown in a
panel at the bottom of the page, and against each product is a 'delete'
hyperlink.  When the user clicks on this link the product should be
removed and the page refreshed to show the modified info.

My question is - how to code the logic to do the deletion of the product
in such a way that the refreshing of the page is handled in a nice way
?
I have the usual way of using an Action to populate the contexts to
render the page, and then an Action to process the users response. When
a product is removed I will have to delete the product & then redirect
the user back to the Action to populate the page all over again.

As far as I can see I have 2 options :

1. Have one Action that performs the product removal and that accepts a
URL as a parameter that then redirects the user using that URL. I will
have to place the necessary URL in the context so that when the page is
rendered the redirect URL is set correctly for wherever the user is.
Painful & not very nice - every populate Action will have to put the
correct URL for itself into the context.

2. Have a seperate Action for every single delete page so that each
instance knows where to send the user back to. Not much different from
1
& leads to a lot of Actions.

Any ideas ? 

Am I missing the obvious ? For example, for 1 can I simply use the
present request URL as the URL to redirect the user to to redraw the
page ?

Jon.

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


ForwardSourceID:NT20A6     



***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



ForwardSourceID:NT20C2
   
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this m

Help Require !!!!!!!!!!!

Hi Theres,

I am stucking on some issues and those are:-

___ Problem 1 __

>1. I am facing later mentioned problem of
>master-detail from on session time out.I am using
>DynaActionForms with array properties as form-bean
>property.
>

type="com.abamco.clientVerification.VerifyOrMakeBrokerPayments[]"/>

>and i have set session as its action scope. But 2.
>when my application restarts and i Re-fresh the
>
>
>>masteer-detail form it
>>gives me the following error:
>>
>>- Error Start
>>-
>>
>>HTTP Status 500 - 
>>
>>type Exception report
>>
>>message 
>>
>>description The server encountered an internal

error

>>() that prevented it from fulfilling this request.
>>
>>exception 
>>
>>javax.servlet.ServletException: BeanUtils.populate
>>
>>
>
>
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1190)


g.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j

>>ava:821)
>>
>>
>
>

g.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)


g.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)

javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

>>root cause 
>>
>>java.lang.ArrayIndexOutOfBoundsException
>>  java.lang.reflect.Array.get(Native Method)
>>
>>
>
>
org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)


g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.

>>java:474)
>>
>>
>
>

g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.

>>java:428)
>>
>>
>
>

g.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j

>>ava:770)
>>
>>
>
>

g.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80

>>1)
>>
>>
>
>

g.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)

org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)

org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1188)


g.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j

>>ava:821)
>>
>>
>
>

g.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)


g.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)

javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is
available in the Tomcat logs.

Apache Tomcat/5.0.16
- Error End -

I have my own created reset button in which
i nullify all teh feilds. But, tis method is now a
callback method. I do't override the
reset(ActionMapping,HttServletRequest) method. All the
form properties exactly matching with their
corresponding dynaactionfrom properties and this
screen is working properly. It only behave abnormally
when my web app context restarts or tomcat restarts as
in that case session will lost.

__ Problem 2 _

2. Also, One more problem.I have tried to fix it but
as a new commer I have now stucked. Actually, I have a
bean which i want to use in jsp with iterate tag. and
i have like this:-






 




I mean to say that if i have indexed properties and i
want to check some equal operator on it then there is
no indexed attribute in logic:equal or any other
comparison tag. even then it picks the indexed
property value properly. How this happens.Is thie any
auto build flexibility in those tags top check the
commign property that either iot is a normal or
indexed property.


__ Problem 3

I have the radio buttons, but they are not behaving
properly.

I want to use radio buttons with indexed
property.Actually one of my indexed property will
behave like radio button and if i have more than one
rows then i will have more than one radio buttons.In
that case how can i set radio button to enable only
one at a time.I tryied it, but all the button will
enable at a time(menas previous button will remain
enable when we press any other radio button to get
enable it should disable the previous enable button)

regards,



=

Buland Altaf Malik,
Software Engineer, 
Softech System's(pvt)Ltd. 
10/25 asad jan road lahore,cantt - 54810 Pakistan
Tel: 92-42-6665812 , 92-42-6660802

Mob: 0333-4344113
Fax: 92-42-6665792

http://www.softech.com.pk
[EMAIL PROTECTED]





__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



RE: Best practice request - dynamic link to redraw page

If you use this method, I would advise that you cross check the itemid to be removed, 
with the user attempting to remove the item session identifier. 
There is potential otherwise for a script kiddie to write a simple script that counts 
from 0-n and submit's each iteration to the remove action, in theory this would remove 
every item from every users basket if it run quick enough.
 
Either that or encrypt the itemkey that is written to the page.
 
Chris McCormack

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 16 July 2004 12:12
To: Struts Users Mailing List
Subject: Re: Best practice request - dynamic link to redraw page



Jon, 
The way it is managed is, while you paint the "delete" links in your HTML, you add a 
query string like this 

?itemid=xyz 

and then in your action class method obtain the value of this variable itemid ( 
obviously through form-bean) 
and this is how single statement can do the work 

Hope this answeres your query. 

Regards, 
Puneet Agarwal
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com 



"Jon Barber" <[EMAIL PROTECTED]> 


07/16/2004 04:22 PM 



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
"Struts Users Mailing List" <[EMAIL PROTECTED]> 

cc

Subject
Best practice request - dynamic link to redraw page






Dear All,

Trawled through the archive with no luck, but then I couldn't work out
the best search terms for this question, so...

I'm writing a shopping basket app with the usual requirements, and using
tiles which has made things a lot less painful. However, I have this one
problem that I can't work out a nice way to solve.

On every page of the basket the contents of the basket are shown in a
panel at the bottom of the page, and against each product is a 'delete'
hyperlink.  When the user clicks on this link the product should be
removed and the page refreshed to show the modified info.

My question is - how to code the logic to do the deletion of the product
in such a way that the refreshing of the page is handled in a nice way ?
I have the usual way of using an Action to populate the contexts to
render the page, and then an Action to process the users response. When
a product is removed I will have to delete the product & then redirect
the user back to the Action to populate the page all over again.

As far as I can see I have 2 options :

1. Have one Action that performs the product removal and that accepts a
URL as a parameter that then redirects the user using that URL. I will
have to place the necessary URL in the context so that when the page is
rendered the redirect URL is set correctly for wherever the user is.
Painful & not very nice - every populate Action will have to put the
correct URL for itself into the context.

2. Have a seperate Action for every single delete page so that each
instance knows where to send the user back to. Not much different from 1
& leads to a lot of Actions.

Any ideas ? 

Am I missing the obvious ? For example, for 1 can I simply use the
present request URL as the URL to redirect the user to to redraw the
page ?

Jon.

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


ForwardSourceID:NT20A6 



***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.




Re: Best practice request - dynamic link to redraw page

Dear,

First u need to set the hyperlink of the action(in
which u have implemented delete method logic) on the
primary key basis through which u will delete the
record and create an action forard in struts config
file(action of the class in which u have implementated
the logic to diaplay records in the view) and forward
to that action from delete method.

 Struits-config.xml 

-

--- View 
 Delete 
(or use struts link tag)
-

from delete action u need to forward to viewAction and
all display logic will be there.

Plz let me know in case of any inconvenience/problem.

regards,
Buland

--- Jon Barber <[EMAIL PROTECTED]> wrote:
> Dear All,
> 
> Trawled through the archive with no luck, but then I
> couldn't work out
> the best search terms for this question, so...
> 
> I'm writing a shopping basket app with the usual
> requirements, and using
> tiles which has made things a lot less painful.
> However, I have this one
> problem that I can't work out a nice way to solve.
> 
> On every page of the basket the contents of the
> basket are shown in a
> panel at the bottom of the page, and against each
> product is a 'delete'
> hyperlink.  When the user clicks on this link the
> product should be
> removed and the page refreshed to show the modified
> info.
> 
> My question is - how to code the logic to do the
> deletion of the product
> in such a way that the refreshing of the page is
> handled in a nice way ?
> I have the usual way of using an Action to populate
> the contexts to
> render the page, and then an Action to process the
> users response. When
> a product is removed I will have to delete the
> product & then redirect
> the user back to the Action to populate the page all
> over again.
> 
> As far as I can see I have 2 options :
> 
> 1. Have one Action that performs the product removal
> and that accepts a
> URL as a parameter that then redirects the user
> using that URL. I will
> have to place the necessary URL in the context so
> that when the page is
> rendered the redirect URL is set correctly for
> wherever the user is.
> Painful & not very nice - every populate Action will
> have to put the
> correct URL for itself into the context.
> 
> 2. Have a seperate Action for every single delete
> page so that each
> instance knows where to send the user back to. Not
> much different from 1
> & leads to a lot of Actions.
> 
> Any ideas ? 
> 
> Am I missing the obvious ? For example, for 1 can I
> simply use the
> present request URL as the URL to redirect the user
> to to redraw the
> page ?
> 
> Jon.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


=

Buland Altaf Malik,
Software Engineer, 
Softech System's(pvt)Ltd. 
10/25 asad jan road lahore,cantt - 54810 Pakistan
Tel: 92-42-6665812 , 92-42-6660802

Mob: 0333-4344113
Fax: 92-42-6665792

http://www.softech.com.pk
[EMAIL PROTECTED]





__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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



Re: Best practice request - dynamic link to redraw page


Jon,
The way it is managed is, while you
paint the "delete" links in your HTML, you add a query string
like this 

?itemid=xyz

and then in your action class method obtain the value of this variable
itemid ( obviously through form-bean) 
and this is how single statement can
do the work

Hope this answeres your query.

Regards,
Puneet Agarwal
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





"Jon Barber"
<[EMAIL PROTECTED]> 
07/16/2004 04:22 PM




Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
Best practice request - dynamic
link to redraw page








Dear All,

Trawled through the archive with no luck, but then I couldn't work out
the best search terms for this question, so...

I'm writing a shopping basket app with the usual requirements, and using
tiles which has made things a lot less painful. However, I have this one
problem that I can't work out a nice way to solve.

On every page of the basket the contents of the basket are shown in a
panel at the bottom of the page, and against each product is a 'delete'
hyperlink.  When the user clicks on this link the product should be
removed and the page refreshed to show the modified info.

My question is - how to code the logic to do the deletion of the product
in such a way that the refreshing of the page is handled in a nice way
?
I have the usual way of using an Action to populate the contexts to
render the page, and then an Action to process the users response. When
a product is removed I will have to delete the product & then redirect
the user back to the Action to populate the page all over again.

As far as I can see I have 2 options :

1. Have one Action that performs the product removal and that accepts a
URL as a parameter that then redirects the user using that URL. I will
have to place the necessary URL in the context so that when the page is
rendered the redirect URL is set correctly for wherever the user is.
Painful & not very nice - every populate Action will have to put the
correct URL for itself into the context.

2. Have a seperate Action for every single delete page so that each
instance knows where to send the user back to. Not much different from
1
& leads to a lot of Actions.

Any ideas ? 

Am I missing the obvious ? For example, for 1 can I simply use the
present request URL as the URL to redirect the user to to redraw the
page ?

Jon.

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


ForwardSourceID:NT20A6
   
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the
addressee. Unauthorized use, disclosure or copying is strictly prohibited and may 
constitute unlawful act and can possibly attract legal action, civil and/or criminal. 
The contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services
on any subject matter.]
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other
information contained in this message that do not relate to the official business of 
Tata Consultancy Services shall be understood as neither given nor endorsed by Tata 
Consultancy Services or any affiliate of Tata Consultancy Services. If you have 
received this message in error,
you should destroy this message and may please notify the sender by e-mail. Thank you.



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

Best practice request - dynamic link to redraw page

Dear All,

Trawled through the archive with no luck, but then I couldn't work out
the best search terms for this question, so...

I'm writing a shopping basket app with the usual requirements, and using
tiles which has made things a lot less painful. However, I have this one
problem that I can't work out a nice way to solve.

On every page of the basket the contents of the basket are shown in a
panel at the bottom of the page, and against each product is a 'delete'
hyperlink.  When the user clicks on this link the product should be
removed and the page refreshed to show the modified info.

My question is - how to code the logic to do the deletion of the product
in such a way that the refreshing of the page is handled in a nice way ?
I have the usual way of using an Action to populate the contexts to
render the page, and then an Action to process the users response. When
a product is removed I will have to delete the product & then redirect
the user back to the Action to populate the page all over again.

As far as I can see I have 2 options :

1. Have one Action that performs the product removal and that accepts a
URL as a parameter that then redirects the user using that URL. I will
have to place the necessary URL in the context so that when the page is
rendered the redirect URL is set correctly for wherever the user is.
Painful & not very nice - every populate Action will have to put the
correct URL for itself into the context.

2. Have a seperate Action for every single delete page so that each
instance knows where to send the user back to. Not much different from 1
& leads to a lot of Actions.

Any ideas ? 

Am I missing the obvious ? For example, for 1 can I simply use the
present request URL as the URL to redirect the user to to redraw the
page ?

Jon.

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



Re: Memory Problem

This is more for the lists benefit than yours 
I have found the (CPL licensed) eclipse profiling tool to be absolutely 
excellent.

http://eclipsecolorer.sourceforge.net/index_profiler.html
Also as found using google.
http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Performance_and_Testing/
--b
Shailender Jain wrote:
Hai,
I have developed my application using Struts 1.1 and Tomcat server.
I am facing a frequent problem of "OutOfMemory" Error.
What i can do to resolve this?
Is there any way by which i can find out which part of the code is
giving this problem.
Regards,
Shailender Jain

-
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: How to Disable "open" button on "File Download" dialogue box. ...please urgent

Or a system design? So that these last-minute issues aren't all urgent?

-Original Message-
From: McCormack, Chris [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2004 11:19
To: Struts Users Mailing List
Subject: RE: How to Disable "open" button on "File Download" dialogue box.
...please urgent


Maybe a change of career or invest some time reading up the technologies
that appear on your CV ? Just a thought

-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2004 09:52
To: [EMAIL PROTECTED]
Subject: How to Disable "open" button on "File Download" dialogue
boxplease urgent


Hi Friends,

i'm very happy to tell u my problems and get answers.

i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"

httpServletResponse.setContentLength((int) f.length));
  
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f
.getName());

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);


i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh





__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.




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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its subsidiaries is 100 Old
Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is
262152.



-
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: How to Disable "open" button on "File Download" dialogue box. ...please urgent

Maybe a change of career or invest some time reading up the technologies that appear 
on your CV ? Just a thought

-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2004 09:52
To: [EMAIL PROTECTED]
Subject: How to Disable "open" button on "File Download" dialogue
boxplease urgent


Hi Friends,

i'm very happy to tell u my problems and get answers.

i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"

httpServletResponse.setContentLength((int) f.length));
  
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f
.getName());

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);


i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh





__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.




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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



RE: Memory Problem

Hi.

This is a very common problem, I think. And I?m quite sure Struts is not the
problem.
Probably, the best option is to use a profiler. We use JProbe and it was
very useful for us when our application had the same problems.

Regards

> -Mensaje original-
> De: Shailender Jain [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 16 de julio de 2004 10:42
> Para: [EMAIL PROTECTED]
> Asunto: Memory Problem
>
>
> Hai,
>
> I have developed my application using Struts 1.1 and Tomcat server.
>
> I am facing a frequent problem of "OutOfMemory" Error.
> What i can do to resolve this?
> Is there any way by which i can find out which part of the code is
> giving this problem.
>
> Regards,
> Shailender Jain
>
>
>
>
> -
> 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: About datasource

Hello,
How about retrieving it from JNDI?
How about a plugIn (DAOFactory) that retrieves the DataSource via
JNDI and then initializes each DAO with the DataSource?

Regars
marco

-Original Message-
From: Koon Yue Lam [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2004 10:18
To: Struts Users Mailing List
Subject: Re: About datasource

Hi, after some thinking, I have another problem, ^^
If I am using an Action (which extent the Struts' Action class), I can
get the Datasource by calling getDataSource()
But now I want to write my own data assess object which shouldn't
extent Action, I don't know what way I can get the datasource from the
pool.

any help??

Regards

-
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: Memory Problem

use the environment variable

JAVA_OPTS = -Xms 256m -Xmx 256m

ANT_OPTS = -Xms 256m -Xmx 256m

256 is the size of the memory


regards
Shiva


-Original Message-
From: Shailender Jain [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 2:12 PM
To: [EMAIL PROTECTED]
Subject: Memory Problem


Hai,

I have developed my application using Struts 1.1 and Tomcat server.

I am facing a frequent problem of "OutOfMemory" Error.
What i can do to resolve this?
Is there any way by which i can find out which part of the code is
giving this problem.

Regards,
Shailender Jain




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


Re: About datasource

Hi, after some thinking, I have another problem, ^^
If I am using an Action (which extent the Struts' Action class), I can
get the Datasource by calling getDataSource()
But now I want to write my own data assess object which shouldn't
extent Action, I don't know what way I can get the datasource from the
pool.

any help??

Regards

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



Re: Memory Problem

Hi tehte,
go and see teh log files.there is a log folder under
tomcat root directory.I think that might help u to
find teh problem.

regards,


--- Shailender Jain <[EMAIL PROTECTED]>
wrote:
> Hai,
> 
> I have developed my application using Struts 1.1 and
> Tomcat server.
> 
> I am facing a frequent problem of "OutOfMemory"
> Error.
> What i can do to resolve this?
> Is there any way by which i can find out which part
> of the code is
> giving this problem.
> 
> Regards,
> Shailender Jain
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


=

Buland Altaf Malik,
Software Engineer, 
Softech System's(pvt)Ltd. 
10/25 asad jan road lahore,cantt - 54810 Pakistan
Tel: 92-42-6665812 , 92-42-6660802

Mob: 0333-4344113
Fax: 92-42-6665792

http://www.softech.com.pk
[EMAIL PROTECTED]






__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



RE: How to Disable "open" button on "File Download" dialogue box. ...please urgent

Ganesh, why do you always ask your question 3 times? And your questions are
always urgent?

-Original Message-
From: ganesh gadi [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2004 09:52
To: [EMAIL PROTECTED]
Subject: How to Disable "open" button on "File Download" dialogue
boxplease urgent


Hi Friends,

i'm very happy to tell u my problems and get answers.

i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"

httpServletResponse.setContentLength((int) f.length));
  
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f
.getName());

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);


i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh





__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.




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



Re: how to get control over "File Download" Dialogue Box ...Very urgent please

Hi,
ganesh gadi wrote:
Hi Friends,
i'm very happy to tell u my problems and get answers.
I dont think you will get answers by sending the same email with three 
different subjects within four minutes. 

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


How to Disable "open" button on "File Download" dialogue box....please urgent

Hi Friends,

i'm very happy to tell u my problems and get answers.

i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"

httpServletResponse.setContentLength((int) f.length));
  
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f.getName());

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);


i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh





__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



how to get control over "File Download" Dialogue Box ...Very urgent please

Hi Friends,

i'm very happy to tell u my problems and get answers.

i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"

httpServletResponse.setContentLength((int) f.length));
  
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+f.getName());

os =httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);


i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

Thanks
Ganesh



__
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

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



Memory Problem

Hai,

I have developed my application using Struts 1.1 and Tomcat server.

I am facing a frequent problem of "OutOfMemory" Error.
What i can do to resolve this?
Is there any way by which i can find out which part of the code is
giving this problem.

Regards,
Shailender Jain




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



Re: Control over "File Download" dialog box..

you could use a java applet *g*
ganesh gadi wrote:
Hi Friends,
i'm very happy to tell u my problems and get answers.
i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"
httpServletResponse.setContentLength(
(int) f.length());
   
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="
+f.getName());

os =
httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);
i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server

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

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


Control over "File Download" dialog box..

Hi Friends,

i'm very happy to tell u my problems and get answers.

i need a solution how to disable "open" button on 
"File Download" dialog box.i want control on it.
Pls don't say no solution.Bcox i saw that type of
dialogue box...Now i require that feature.
pls let me know the solution asap.

I used the following code to appear "File Download
box"

httpServletResponse.setContentLength(
(int) f.length());
   
httpServletResponse.setContentType(mimeType);
   
httpServletResponse.setHeader("Content-Disposition","attachment;filename="
+f.getName());

os =
httpServletResponse.getOutputStream();
stream = new FileInputStream(f);
bis = new BufferedInputStream(stream);
is = new BufferedInputStream(bis);
int count;
byte buf[] = new byte[4096];
while ((count = is.read(buf)) > -1)
os.write(buf, 0, count);


i'm using 
tomcat 5.0.19
Struts 1.1
IE 6.0
Windows 2000server


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

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



RE: how to use controllerclasses with tiles?

ok i'll try to explain.

below is the part of my definitions-config file where i declare the
controller class








my controller class is as follows

package com.sam.tilescontroller;

import java.util.*;
import java.lang.*;

import javax.servlet.ServletContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.tiles.Controller;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.actions.TilesAction;


class TestTileController extends TilesAction implements Controller
{

public void perform( ComponentContext context,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
{
try{
context.putAttribute("title", "hello from controller");
}catch(Exception ex)
{
System.out.println("Exception in TilesController---" + ex);
}
}
}


now just this code generates the error no matter i use the value stored in
context in my header.jsp or not. but for completion the header.jsp look like

http://java.sun.com/JSP/Page";
xmlns:c="http://java.sun.com/jsp/jstl/core";
xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles";
xmlns:fn="http://java.sun.com/jsp/jstl/functions";
version="2.0" >







${title}
 






| ${item.value}

|


System.out.println("ident = " + request.getParameter("title"));







also the web.xml has the following entry

   
  Tiles Servlet
  org.apache.struts.tiles.TilesServlet
  
 definitions-config

/WEB-INF/safe-tiles.xml,/WEB-INF/situation-tiles.xml
  
  2
   

guess now you may be able to understand and pin point the problem.'

Fahd




-Original Message-
From: Mark Mandel [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 10:38 AM
To: Struts Users Mailing List
Subject: Re: how to use controllerclasses with tiles?


Fahd,

I've successfully implemented heaps of controller classes, but I'm
having trouble visualising what you have done.

Any chance of a code example?

Mark

On Fri, 16 Jul 2004 10:35:13 +0500, Fahd Ahmed <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to use a controllerClass with Tiles. I am mentioning the
> controllerClass in one of my definition tags. The controller does nothing
> but put a varible in ComponentContext. On the JSP I just use the
> importAttribute tag to get that value. But when i access the page, I keep
on
> getting the following error.
>
> [ServletException in:/layouts/threeColumnLayout.jsp] Error - Illegal class
> access :Class org.apache.struts.tiles.ComponentDefinition can not access a
> member of class com.usersmarts.sam.tilescontroller.TestTileController with
> modifiers ""
>
> threeColumnlayout is my layout JSP and TestTileController is the
controller
> class I am associating with the definition tag.
>
> Anyone who can think of a reason???
>
> Regards
> Fahd


--
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740

-
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: [OT] Best practice for background service

Thanks to all for their answers,

I think I will look into doing this with java.util.Timer & TimerTask for now
and keep Spring and Quartz in mind to be looked at later. I now that it
usually takes quite a bit of time to get to terms with a new framework (for
me that is, of course) and I just can't spare the time right now.

Cheers & thanks again.

Jan

-Original Message-
From: Daniel Perry [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 3:48 PM
To: Struts Users Mailing List
Subject: RE: [OT] Best practice for background service


Quartz is very easy to use.  No need for thread programming.

But "Job" classes are created as and when they are needed (so no
initialisation and shared object).

Create a struts plug-in which initialises quartz, and sets up the jobs (very
little code needed).

Daniel.

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> Sent: 15 July 2004 14:29
> To: [EMAIL PROTECTED]
> Subject: Re: [OT] Best practice for background service
>
>
> Jan,
> Bryan's recommendation of Spring and Quartz sounds good though I have 
> not had a chance to work with these yet. If you want to "roll your 
> own" I suggest you look at the java.util.Timer and java.util.TimerTask 
> objects -- they work well for these type of services. See 
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimerTask.html.
>
> Jan Behrens wrote:
>
> > Hi list,
> >
> > I am coding an app where I rely on a background service to
> check regularly
> > for new mail. I want to instantiate my service component (the
> one checking
> > for mail) when the context is loaded and have it running in a 
> > background thread. I have done only very limited coding with threads 
> > so far :(
> >
> > What I plan to do is to create a controller servlet that is loaded 
> > on startup and that creates instances of all my services. All
> services extend
> > Thread and are started by invoking the run() method when the 
> > controller servlet starts. Would that work? How would I then set the
> intervall on which
> > my mail service checks for new mail? Could this be done using 
> > sleep(interval)?
> >
> > I wonder whether anyone has tips on this for a newbie or if
> there is such a
> > thing as a best practice on this.
> >
> > TIA, Jan
>
>
> -
> 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: regular expression

On Jul 16, 2004, at 7:21, [EMAIL PROTECTED] wrote:
  I want to validate an attribute, the rule is that the input 
should
not start with 'Test',
 how to write the regular expression for this validation. Please help 
me
guys.
If you validate by code you can negate that it does start that way:
// pseudocode
if (!(attr matches ^Test\b)) { ... }
As you surely know, the \b asserts that the word finishes there, so we 
don't match "Testosterone".

In a config file one cannot put that ! operator. In that case use a 
negative look-ahead assertion:

# in config file
regexp = ^(?!Test\b)
// in Java, unconditionally test for a match
if (attr matches regexp) { ... }
The (?!...) syntax is Perl's. I don't remember if Java libraries use 
the same one though is likely, you could double-check it ("negative 
look-ahead assertion" is the keyword to search for).

There's a more convoluted way to do that if one does not have 
assertions:

 # untested, but you get the idea
 regexp = "^([^T]|T([^e]|e([^s]|s([^t]|t\B
But as you see assertions are more concise and readable for that.
-- fxn
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]