avax.servlet.ServletException: BeanUtils.populate

2007-03-29 Thread Nitin Ahuja

I am working on  Strut based Application. I am facing the error  while
submitting a form.
I have attached error message , JSP and strut config file.
Please let me know the possible reasons of the error.

Thanks



Error Message:-

[28/Mar/2007:09:27:54] failure (18159): for host 129.146.11.110 trying
to POST
/DSTWeb2/updateRequest.do;jsessionid=8665EE56C9DC0D375A8E64CDADB074FA,
service-j2ee reports: StandardWrapperValve[action]: WEB2792:
Servlet.service() for servlet action threw exception
javax.servlet.ServletException: BeanUtils.populate
   at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
   at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
   at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
   at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
   at
org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
   at
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
   at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
- Root Cause -
java.lang.IllegalArgumentException: argument type mismatch
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
   at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
   at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
   at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
   at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
   at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
   at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
   at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
   at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
   at
org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
   at
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
   at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)

*

Struts Config :-

   
   
   
   
   

*

JSP :-

<%@ taglib uri="struts/bean" prefix="bean" %>
<%@ taglib uri="struts/html" prefix="html" %>
<%@ taglib uri="struts/logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>




   
   
    
   
   
   
   
   
   
   
   

   
   
   
   
   
   





   
   
   
    
   
   
    
   
   
   
   

   
   


   

   
   
   
   

   
     
   
   

   
   

   
   

Re: ResourceBundle in Javascript?

2007-03-14 Thread Nitin Ahuja

Hi Dave,

What is DWR ?

I found a simple wayout, but there is dependency i.e I have to assign
the the value of message resource key to an html object in jsp. Here
is what i did..

in jsp





and in java script

function display(button)
{
   alert(button.value);
}


this will display the value of key "form.select"

thanks,
-Nitin

On 3/14/07, Dave Newton <[EMAIL PROTECTED]> wrote:

--- Nitin Ahuja <[EMAIL PROTECTED]> wrote:
> Does anyone know how can I acces Message
> ResourceBundle key/values in Javascript?

?!

You'd have to pass in something that [had] rendered a
JavaScript representation of the bundle.

I haven't given it any thought, but you *might* be
able to use DWR to do this in a relatively transparent
way.

d.





Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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





--
...
"Yesterday I dared to struggle, today I dare to win."
--- Bernadette Devlin

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



ResourceBundle in Javascript?

2007-03-14 Thread Nitin Ahuja

Hi,

Does anyone know how can I acces Message ResourceBundle key/values in
Javascript?



Thanks,
-Nitin

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



Re: DispachAction - does not contain specified method

2007-03-14 Thread Nitin Ahuja

Thanks Mark ! , it worked.

On 3/13/07, Mark Shifman <[EMAIL PROTECTED]> wrote:

You should look at the source
http://svn.apache.org/viewvc/struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/DispatchAction.java?view=markup
and the javadoc
> Method which is dispatched to when there is no value for specified
> request parameter included in the request. Subclasses of
> DispatchAction should override this method if they wish to provide
> default behavior different than throwing a ServletException.

overriding unspecified should do the trick
> *protected* ActionForward unspecified(ActionMapping mapping, ActionForm 
form,
> HttpServletRequest request, HttpServletResponse response)
> *throws* Exception {
> String message =
> messages.getMessage(*"dispatch.parameter"*, mapping.getPath(),
> mapping.getParameter());
>
> log.error(message);
>
> *throw* *new* ServletException(message);
> }
mas
Nitin Ahuja wrote:
> Hi,
>
> I am using "DispatchAction" as my base action class.
>
> when submit url "http://.../myAction.do?action=view"; and there is no
> "view" method defined in my action class, then it throws following
> exception.
>
> Is there any way to call a default method  when the method "view" does
> not exists ?
> Or how can I redirect or forward the request to a default page ?
>
> javax.servlet.ServletException: Action[/myAction] does not contain
> specified method (check logs)
> at
> 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
>
> at
> 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
>
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
>
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> 
org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
>
> at
> 
org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
>
> at
> 
org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
>
> at
> 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
>
> at
> 
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
>
> at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
>
>
> Thanks,
> -Nitin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


--
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 [EMAIL PROTECTED]


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





--
...
"Yesterday I dared to struggle, today I dare to win."
--- Bernadette Devlin

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



DispachAction - does not contain specified method

2007-03-13 Thread Nitin Ahuja

Hi,

I am using "DispatchAction" as my base action class.

when submit url "http://.../myAction.do?action=view"; and there is no
"view" method defined in my action class, then it throws following
exception.

Is there any way to call a default method  when the method "view" does
not exists ?
Or how can I redirect or forward the request to a default page ?

javax.servlet.ServletException: Action[/myAction] does not contain
specified method (check logs)
at 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at 
org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at 
org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at 
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)


Thanks,
-Nitin

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