(I tried sending this on Thursday, but I haven't seen it yet, even after I
started to see real flow again in the list.)

I have a working "<html:link>" element, which links to a JSP page.  It doesn't
need any request parameters or action, it just links directly to it.

I'm trying to figure out the cleanest way to make this be a button element,
instead of a link, but do the same thing.

I used to have this:

    <html:link page="/main/main.jsp">Home</html:link>

I'm experimenting with something like this:

    <html:form action="/main/main.do">
     <html:submit value="Home"/>
    </html:form>

and a "struts-config.xml" entry like this:

  <action path="/main/main" forward="/main/main.jsp" />

This fails, however, with:

     javax.servlet.ServletException: Cannot retrieve definition for form bean null

I tried making it an ordinary <html:button>, but I got various errors.  First,
it said I needed a "property" attribute, then when I put in a dummy "property"
value, I got an exception "Cannot retrieve definition for form bean null".

Then, I tried changing my form from "<html:form>" to just "<form>", and that at
least displayed my page.  Now, if I were to use this, I guess I'd have to write
a javascript event handler to make it follow the link.  This doesn't sound too
good, because (unless I'm mistaken), Struts does the correct massaging of local
URLs for rewriting and other purposes, and putting the raw link in the
javascript event handler would bypass that.

-- 
===================================================================
David M. Karr          ; Best Consulting
[EMAIL PROTECTED]   ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


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

Reply via email to