Re: What is the best way to display pictures from a database using Struts

2001-11-24 Thread Ted Husted

Struts doesn't actually display anything. This task is delegated to the
JSPs, or other view rendering system. So the first question is how to
get the images displayed by a JSP. I'm don't actually know how that
would work, since HTML expects the images to be in a separate file. You
may need to look at using PDF or an applet.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


[EMAIL PROTECTED] wrote:
> 
> Hi
> 
> I need to retrieve pictures from a database and use struts to display
> them.   I am not sure about the best way to do this.  Can someone please
> tell me how they do it and what they beleive the best approach is.
> 
> Cheers
> 
> Antony
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat 4.0 and Apache

2001-11-24 Thread Todd J Morgan

Hey all, I realize that this is off subject, but I wonder if anyone here(I'm
sure there is) has installed Tomcat 4.0 to run as a jsp container for
Apache.  If so, can you tell me how to configure it.  I cant find the
documentation.  I tried setting up the way I did tomcat 3.x, but Apache
threw an error saying it couldn't find the working file. Here is the include
im using in the Apache config file:

Include "C:/Program Files/Apache Tomcat 4.0/conf/mod_jk.conf-auto"

Please Help

Todd.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




What's the "correct" way to get remote data in struts?

2001-11-24 Thread T. Wheeler

I am fairly new to struts and want to learn how to do things the "right"
way.  Unfortunately, I haven't found a definitive, practical answer from
looking at the example webapps, so I am hoping a more experienced user could
give me some advice, which I promise to pass on to others :-)

I am getting up to speed on struts by programming a small application that
has only one JSP page.  Whenever you visit this page (/index.jsp), it will
fetch some headlines from across the Web using a SOAP call.  The code to do
the SOAP is neatly packaged in a jarfile, and for simplicity, let's say it
works like this:

Headlines h = new Headlines("http://www.foo.com/headlines";, 10);

where the parameters are the site to get the headlines from and the number
(int) of how many headlines to fetch.

When someone goes to the /index.jsp page for the first time, I want to
populate the page with headlines using the default values above.  On that
same page, I want them to have the ability to choose a site from a select
box and type a number of headlines to fetch in a text box.  This page will 
just submit back to itself.

I know that I need a form bean to handle getting the form values to the
class to fetch the headlines, but my questions are:

1.  How do I populate it the *first* time a user visits the page (before any
form is filled out).  Do I just make the form bean's default value for
URL="http://www.foo.com/headlines"; and the default value for numHeadlines=10
?

2.  I simplified the work behind the SOAP call to explain my point, but do I
put the actual code (about 20 lines) for making the call into the
ActionClass?  Or do I put it into the FormBean somehow?  Or somewhere else? 
Should the code that catches and handles exceptions go there too?

3.  How do I make the Headlines object available to the JSP page?  As a bean
put into session scope?

4.  Should the URL that I advertise to users be /index.jsp or should it
match the action, like /showArticles.do ?  I know it's a best practice to
use /do/ rather than *.do, but I want to keep it simple for the moment.

5.  What might the struts-config.xml look like for this type of action?

Thanks *very* much for any help you can give.  After I finish this example
app, I plan to make it (and the source) available for others to look at for
guidance.

Tom

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: !! Problem whith struts anchor !!

2001-11-24 Thread Ted Husted

Struts doesn't control whether a page is reloaded. That's up to the
browser. Are these relative or absolute URLs? Are you preventing pages
from being cached?

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Thierry Lempereur wrote:
> 
> Hello,
> 
> I'm running Struts 1.0 under Weblogic 6.0 on a Windows platform.
> I've got a problem with internal HTML links in a JSP.
> 
> My JSP expects an ActionForm in the "request" scope. When it is first loaded
> by the Action class everything works fine.
> However, the JSP also has HTML links that refer to anchors in the same page.
> When I click on these links, the page is re-loaded and I get an "error 500"
> page because my ActionForm is no longer in the request.
> 
> I haven't been able to prevent the JSP from re-loading. Is this specific to
> Struts?
> I want to keep my JSP in the request scope.
> 
> Do you have any solution please ?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




!! Problem whith struts anchor !!

2001-11-24 Thread Thierry Lempereur

Hello,

I'm running Struts 1.0 under Weblogic 6.0 on a Windows platform.
I've got a problem with internal HTML links in a JSP.

My JSP expects an ActionForm in the "request" scope. When it is first loaded
by the Action class everything works fine.
However, the JSP also has HTML links that refer to anchors in the same page.
When I click on these links, the page is re-loaded and I get an "error 500"
page because my ActionForm is no longer in the request.

I haven't been able to prevent the JSP from re-loading. Is this specific to
Struts?
I want to keep my JSP in the request scope.

Do you have any solution please ?