thanks for responding Hans, I couldn't hope for a better person to get
help from! after a couple of posts that had no responses, I was feeling
a little depressed... ; )

I did scrutinize my code further, and it seems that the problem comes
using the bean from within an include action (why is it that a bean
isn't made available inside an include even though it's set on the page
that calls the latter?)... when I try calling the bean from non-include
page it works fine. is this possible? I'm going to try with an include
directive instead, and see what happens.

I had checked out chap 11, and it seemed at the time that it was
overkill for what I wanted. given the time is has taken me to roll out
my own solution, it doesn't seem like that anymore. I will use it in the
future.

not to abuse of your good will, but may I add my earlier posts'
questions here? (I haven't found a solution for them yet)

- if I have a FileInputStream called from within a bean, where does it
look for the file? I tried having the target file put in several
different directories (in the same one as the bean class, /WEB-
INF/classes/, /WEB-INF/lib/, /WEB-INF/, the root weapp directory...) and
it just doesn't find it. i triple checked the file name and even tried
different files

- I have to restart tomcat (vs 4) everytime I do an update to a custom
action, for the changes to take effect. is this normal? I figured this
couldn't be, since it would make tomcat completely unviable for real
production purposes... but then again that has been said of it, so is
this one of the causes for this view?

thank you very much for your book, btw. it's been an incredible help in
my quest to learn j2ee. it makes it seem a lot less scary now... but i
do know I have a loooong way to go.

-Oliver



On Friday, November 16, 2001, at 12:51 PM, Hans Bergsten wrote:

> Chapter 8 and addtochart.jsp looks like a reference to the JSP book
> I wrote (JavaServer Pages, O'Reilly) so let's see if I can help
> you.
>
> First, you can avoid the expression in setProperty like this:
>
>   <jsp:setProperty name="text" property="language" />
>
> Since the property and the parameter has the same name, this
> works the same way as in your example (assuming the parameter
> has a value other than an empty string).
>
> Second, if you in fact are basing this on the examples in my
> book, I suggest that you look at Chapter 11 instead. There I
> describe a bean and a set of custom actions that handles i18n
> with the features you seem to want.
>
> Finally, since you create your bean in the session scope,
> a setProperty within the body of a useBean action element
> is only executed the first time, when the bean is created.
> But if you place it outside of the useBean body, it's executed
> every time the page is accessed. You said you tried this, so
> maybe there's some other problem.
>
> For instance, the page you see could be a version cached by
> the browser. Try to change the caching setting for your browser
> to see if it works better. Also see Chapter 12 for ideas about
> how to control caching from the JSP page.
>
> You may also want to scrutinize your bean code to make sure
> that it really handles a new language value as it should.
> Adding a few println() calls here and there to see which method
> is actually called may help.
>
> Hope this helps,
> Hans

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to