nocache in the web.xml

2002-02-20 Thread John Ng

Hi, I encountered a rather interesting problem over
the past few days.  When I have nocache set in the
web.xml, I am not able to generate PDF from the
servlet in the IE browser.  I believe that this is due
to the specifics of IE.

As soon as I take the nocache out from the web.xml,
the streaming of PDF to the IE works fine.  

Now, the question is can I somehow disable the nocache
features for a specific page?  (ie the page that is
used to generate the dynamic PDF)

Thanks,
John 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




Re: FOP and strus (IE problem)

2002-02-17 Thread John Ng

Hi, The following is a piece of the code that I write
in the perform method of an ActionForm to generate the
PDF.  However, it works fine in netscape, but NOT IE. 
Can someone help me with this?

Thanks!
John 

  
  File xsltfile=new File(c:/uwreportdet.xsl);
  File xmlfile=new File(c:/uwreport.xml);
  
  StringWriter writer = new StringWriter();
  //XSLTransform.transform(s,
xsltfile.getCanonicalPath(), 
  //writer);
 
XSLTransform.transform(xmlfile.getCanonicalPath(),
xsltfile.getCanonicalPath(), 
 writer);
  writer.flush();
  writer.close();
  
  System.out.println(fo file: [ +
writer.toString() + ]);

  response.setContentType(application/pdf);
  StringReader reader = new
StringReader(writer.toString());
  

  Driver driver = new Driver(new
InputSource(reader), out);
  driver.run();

  byte[] content = out.toByteArray();
  response.setContentLength(content.length);
  response.getOutputStream().write(content);
  response.getOutputStream().flush();

--- Ted Husted [EMAIL PROTECTED] wrote:
 Or the Commons-Digester :o)
 
 Ajay Chitre wrote:
  
  One approach would be to convert java objects to
 xml using Castor and then
  pass the XML to FOP.
  
  HTH.
  
  -- Original Message --
  
  Hi, I am looking into FOP in generating PDF in
  struts...  the examples so far that I have seen
 are
  only taking static XML files and XLS files.  Can
  someone tell me how to use FOP to generate pdf
 with
  dynamic XML string (generated by some java
 objects) on
  the fly?
  
  I would apprecaite if you could even provide me
 with
  some sample code.
  
  Thanks
  John
  
  
 
 __
  Do You Yahoo!?
  Yahoo! Sports - Coverage of the 2002 Olympic
 Games
  http://sports.yahoo.com
  
  --
  To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
  
  
  Ajay Chitre
  
  Diligent Team, Inc.
  (Where Diligent People Work as a Team)
  
  http://www.DiligentTeam.com
  
  --
  To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 -- Ted Husted, Husted dot Com
 -- For priority Struts support, 
 - visit http://husted.com/about/services
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




FOP and strus

2002-02-16 Thread John Ng

Hi, I am looking into FOP in generating PDF in
struts...  the examples so far that I have seen are
only taking static XML files and XLS files.  Can
someone tell me how to use FOP to generate pdf with
dynamic XML string (generated by some java objects) on
the fly?

I would apprecaite if you could even provide me with
some sample code.

Thanks
John


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




Itext - PDF from struts

2002-02-15 Thread John Ng

Hi, I would like to use Itext to generate the PDF
files.  Should the conversion be in the ActionForm? 
If so, how can we redirect the page to the PDF
document after the action has been invoked?

Thanks
John 


__
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com

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




Re: Itext - PDF from struts

2002-02-15 Thread John Ng

John,

What do we return as the ActionForward in the
perform method if we were to put the pdf stream in the
response object?

Thanks
John 


--- John M. Corro [EMAIL PROTECTED]
wrote:
 Unless performance is of major concern, I'd
 recommend fop over iText...I
 personally don't really care for iText.  I'd
 recommend only collecting any
 necessary info in the ActionForm...I wouldn't do any
 business processing in
 there.  Rather take that info you collected in the
 ActionForm and reference
 it in the ActionClass.  You can do conversion
 directly in the ActionClass,
 but I'd recommend do it in some other class and
 passing the resulting byte
 stream back to the ActionClass and then streaming it
 from there back to the
 browser via the response object.
 
 - Original Message -
 From: John Ng [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Friday, February 15, 2002 2:01 PM
 Subject: Itext - PDF from struts
 
 
  Hi, I would like to use Itext to generate the PDF
  files.  Should the conversion be in the
 ActionForm?
  If so, how can we redirect the page to the PDF
  document after the action has been invoked?
 
  Thanks
  John
 
 
  __
  Do You Yahoo!?
  Got something to say? Say it better with Yahoo!
 Video Mail
  http://mail.yahoo.com
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com

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




Action forward with URL parameters

2002-01-22 Thread John Ng

I would like to use the action's perform method to
forward to a perl page.  However, I also would like to
pass in some argument on the URL.

For example :  http://abc.com?name=JKstate=NY

I definied http://abc.com in the struts-config.xml. 
However, how can I make the ActionForward object to
contain those name and state info and append it to the
URL after the forward.

Thanks in advance for any suggestions.

JN.

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




nested indexes

2002-01-17 Thread John Ng

Hi,

I am just wondering if anyone has successfully tried
the nested indexes loop; something like 

customers[i].addresses[j].street

Obviously, I have a form beanw which has a
getCustomers function returns a list containing
addresses objects.  Each address object has a
getStreet and setStreet function.  It seems to me that
it works well for the get part, but the set part
doesn't quite work.  

Anyone had experience with that?

Thanks
John




__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




Re: Is Javascript onLoad function supported?

2001-12-27 Thread John Ng

Yes. onLoad is supported.  I tried with body onLoad.


--- Lawrence, Jane K [EMAIL PROTECTED] wrote:
 I am attempting use the JavaScript onLoad function
 when loading a form.
 What I want to do is set the focus to a certain
 button depending on a
 parameter.  On Ted Husted's site, I found that a
 number of javascript
 functions are supported by the html tags (including
 onFocus), but when
 looking at the API documentation, I can't find that
 onLoad is supported.
 Has anyone tried this?
 
 Jane K. Lawrence
 EC Systems Consultant
 Ball Corporation
 303-460-5225
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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




1 ActionHandler and 2 ActionForms

2001-12-19 Thread John Ng

Is there any way to link/specify 2 actionforms to one
action handler on struts-config.xml?

Thanks!

John




__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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




embed html tags in the javabeans.

2001-12-18 Thread John Ng

Hi, I have a javabean with one method returning a
string containing HTML tags.  However, it seems that
the when I use bean:write to write out the string,
those html tags got printed on the screen instead of
got interpreted by the brower.  

What should I do if I want a get method in a bean to
return a string containg HTML tags which later gets
interpreted by the browser?

Thanks
John


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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




struts - weblogic service pack 10

2001-12-06 Thread John Ng

Hi, we would like to upgrade our weblogic server from
sp8 to sp10.  We are using wlssp8-struts.jar in our
sp8 environmet to get our struts stuff working. 
However, it does not work for sp10.  Is there any
struts service packs that we need to install for sp10
to work with struts?

Thanks
John

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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




Re: struts - weblogic service pack 10

2001-12-06 Thread John Ng

Have anyone tried to get the struts running under sp
10? 

Thanks
John

--- John Ng [EMAIL PROTECTED] wrote:
 Hi, we would like to upgrade our weblogic server
 from
 sp8 to sp10.  We are using wlssp8-struts.jar in our
 sp8 environmet to get our struts stuff working. 
 However, it does not work for sp10.  Is there any
 struts service packs that we need to install for
 sp10
 to work with struts?
 
 Thanks
 John
 
 __
 Do You Yahoo!?
 Send your FREE holiday greetings online!
 http://greetings.yahoo.com
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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




Populating form in the action

2001-12-05 Thread John Ng

Hi, I have some questions about how to populate the
form in the action.

For instance, I create a ActionForm in the perform
method of the Action class, and then forward the
control to a jsp page.  How does the JSP page know
that the form that it gets is the form that just get
populated in the Action before?  (Provided the form is
the request scope).

Thanks
John


__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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




Re: RE: Populating form in the action

2001-12-05 Thread John Ng

The form passed in is a null because that Action is
called the first time I type in the URL (.do), not
after a form has been submited.

In other words, I would like to pre-populate the
form before displaying it.

Thanks
John



--- Joey Gibson [EMAIL PROTECTED] wrote:
  
  For instance, I create a ActionForm in the perform
  method of the Action class, and then forward the
  control to a jsp page.  How does the JSP page know
  that the form that it gets is the form that just
 get
  populated in the Action before?  
 
 Don't create an instance of the form, use the one
 that is passed in to your perform(...) method. You
 will need to cast it, of course.
 
 Joey
 
 --
 Sent via jApache.org
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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




html:link - submit

2001-12-03 Thread John Ng

Is there a way to invoke the form submit action when
one clicks on a link by html:link?

Basically, I would like the submit the form by
clicking the link instead of clicking a button.

Thanks!

John




__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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




Re: Want to use html:link forward but do not want jsession included in new link

2001-12-02 Thread John Ng

Hi Ted,

I have a similar question.  For example, when writing
a shopping cart application, in the URL:
http://locathost/shoppingcart/displayCart.do;, I have
a html:form name=/shoppingcart/deleteItem.do
method=post for item deletion.  Once the form
submitted the URL would then become
http://locathost/shoppingcard/deleteItem.do; 
However, as what tony asked, how can I make the URL so
that it becomes something like
http://localhost/shoppingcart/displayCart.do again
after the form submission?  How can we re-write the
URL?

Thanks
John





--- Ted Husted [EMAIL PROTECTED] wrote:
 URL rewriting is built-into the tags, and would have
 to be turned off in
 the container. Though, I'm not sure that all
 containers support
 disabling URL rewriting as an option. 
 
 [EMAIL PROTECTED] wrote:
  
  Hi
  
  I have a log off action on my page
  
  html:link forward=logoff
  
  this gets rewritten by struts as
  
 

http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
  
  so that on my logon screen, I have the link
  
 

http://localhost:8180/testapp/logoff.do;jsession=97BEFADEA3987234AC3F55
  
  which looks ugly,  I want it to have the link
  
  http://localhost:8180/testapp/index.jsp
  
  without any jsession ID and the page index.jsp
 shown instead of
  logoff.do.
  
  How can I do this?
  
  Cheers
  
  Tony
  
  --
  To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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




Re: taglibs and jsp:include

2001-11-30 Thread John Ng

Try to use template.  Struts template can do exactly
what you want to.  
--- Martin Samm [EMAIL PROTECTED] wrote:
 this is not directly Struts but seemed the best
 qualified forum (it is for a 
 struts based app however). 
 I'm using a custom tag to decide which jsp to
 include (based on some request 
 variables) - the tag then uses a JSP writer to
 create the jsp:include - 
 trouble is the 'jsp:include tag is just written
 out and not 'interpretted', 
 i.e. the page isn't included. How do i get the
 container to interpret the 
 include?
 -- 
 Martin Samm
 [EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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