On Sun, Apr 22, 2001 at 12:40:54PM -0700, Anne Dirkse wrote:
> Christoph --
> You do need the trailing = after <%
> Here's why:
> What you are trying to send from your HTML form is something like this:
>
> <form enctype="multipart/form-data" action="/servlets/servlet/Upload"
> method="post">
> <input type="file" name="FileData" value="" size="52" maxlength="255">
> <input type="submit" value="Abschicken">
> </form>
>
> The <%= %> is a jsp Expression, which means that the value of whatever
> is in it will be converted to a String and then printed out. Since this
> is done before the HTML is processed, what you get is something like in
> the above example.
Thinking about it the question came up in me: Shouldn't tomcat
process the HTML and the jsp expression? With my configuration
(apache+ tomcat), could it be that the apache server handles the
HTML and cannot cope with the jsp? And, if the latter is the case,
how can I overcome the situation?
> As you have it below, with <% %>, you are not ever actually including
> the value of your encoded URL into your form.
> It's just a scriptlet, which will actually encode your URL, but to no
> avail, since it has no explicit String conversion or printout
> capabilities and thus won't be a part of your form.
>
> all the <%= response.encodeURL("/path/to/Servlet") %> is doing is
> rewriting your URL to include session data if cookies are not enabled.
> For a first shot at it, you might want to consider just building a set
> of tags like I included above and making sure that works (make sure you
> have cookies enabled, though!) After you have that working, it might be
> a lot easier to get your session encoding working, conceptually.
>
> What the leftover method="post"> signals to me is that somewhere you are
> closing the form tag before this part of it, i.e., that the browser
> encounters a > before it encounters method="post"> and thus assumes that
> the form tag has been completed and that method="post"> is regular text
> to be printed to the browser window.
>
> Hope that helps,
> Anne
>
--
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]