You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by M�ris Orbid�ns <M....@datapro.lv> on 2001/11/20 17:13:12 UTC

JSP page without form bean ?

Can I have a JSP form without a  form bean?
I dont need the bean, there are no input fields on form.


I defined action like this:

<action   path="/main"
              type="addressbook.MainAction"
              input="/main.jsp"
              >       
    </action>

But it threw an exception:
	javax.servlet.ServletException: Cannot retrieve definition for
form bean null 


Maris



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSP page without form bean ?

Posted by Yee Keat <yk...@netwxs.com.my>.
Actually you can, I am doing something similiar with it, just like a web mail 
program, you don't actually need forms in the first page where you see the 
mails, there are practically no input form types in it (the checkbox to 
delete is an exceptional case).

For this scenario, your struts-config.xml is correct, but your jsp is not. I 
think you used the <html:form> tags in your jsp. If you use it, struts is 
going to look for the form bean in struts-config.xml, if you don't use 
html:form, then it won't look for the form.

My solution is to use a vanilla <form> instead of <html:form>, then I can 
still have my checkbox and delete button working.

Hope this helps!
On Wednesday 21 November 2001 12:13 am, you wrote:
> Can I have a JSP form without a  form bean?
> I dont need the bean, there are no input fields on form.
>
>
> I defined action like this:
>
> <action   path="/main"
>               type="addressbook.MainAction"
>               input="/main.jsp"
>
>     </action>
>
> But it threw an exception:
> 	javax.servlet.ServletException: Cannot retrieve definition for
> form bean null
>
>
> Maris

-- 
Cheers,

Yee Keat

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSP page without form bean ?

Posted by Joey Gibson <jg...@bravepoint.com>.
What exactly are you trying to do? I have several actions that have no forms that work fine. I do GETs to them, do some processing, and then forward to a jsp. 
----
Sent via jApache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSP page without form bean ?

Posted by "emmanuel.boudrant" <b7...@yahoo.fr>.
So why make an action ?
Attribut name in action element cannot be null, you must put the name of a form-bean.
- Create a blank ActionForm.
- Or remove the action
 
Emmanuel
  Màris Orbidàns <M....@datapro.lv> a écrit : 
Can I have a JSP form without a form bean?
I dont need the bean, there are no input fields on form.


I defined action like this:

type="addressbook.MainAction"
input="/main.jsp"
> 


But it threw an exception:
javax.servlet.ServletException: Cannot retrieve definition for
form bean null 


Maris



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



---------------------------------
Yahoo! Courrier -- Une adresse @yahoo.fr gratuite et en français !