aspose file tools*
The moose likes JSP and the fly likes Getting error on calling method belongs to java class. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting error on calling method belongs to java class." Watch "Getting error on calling method belongs to java class." New topic
Author

Getting error on calling method belongs to java class.

Kasparov Patel
Ranch Hand

Joined: Jan 23, 2012
Posts: 40
Hello,

I am creating jsp page to get user input, calling another jsp to set bean properties and also calling java class to calculate days. But I am getting error on that method calling line. My code are as follow:

1. home.jsp


2. Bean.jsp


3. MyBean.java


4. java class


I would really appreciate, if anyone could help me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

First of all, what makes you think you are getting an error?
Kasparov Patel
Ranch Hand

Joined: Jan 23, 2012
Posts: 40
Getting error while calling Bean.jsp at line where I am creating instance of java class and calling method.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61209
    
  66

Keeping the error a secret isn't going to get you much help, is it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kasparov Patel
Ranch Hand

Joined: Jan 23, 2012
Posts: 40
Getting following error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 32 in the jsp file: /Bean.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
29: </p>
30: <p>
31: <% NextBday bday = new NextBday();%>
32: My Next Birth Day is after <%=bday.service(request.getParameter("dob"))%> days.
33: </p>
34: </body>
35: </html>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:644)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
 
jQuery in Action, 2nd edition
 
subject: Getting error on calling method belongs to java class.