wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Unable to compile class for JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to compile class for JSP" Watch "Unable to compile class for JSP" New topic
Author

Unable to compile class for JSP

nimesh subramanian
Greenhorn

Joined: Oct 02, 2010
Posts: 5
I have written a dynamic web project which is basically a web service client. It works perfectly in eclipse...

Now the problem is after i export it ...file->export->file system.

i place the file structure in the webapps folder.. in tomcat 6..

i get the following error..i have no clue on how to solve it....can any one help me ???

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

An error occurred at line: 6 in the generated java file
Only a type can be imported. wtp.CurrencyConverter.CurrencyWebServicePortTypeProxy resolves to a package

An error occurred at line: 43 in the jsp file: /WebContent/currencyconverter.jsp
CurrencyWebServicePortTypeProxy cannot be resolved to a type
40: out.println("<br><br> The equivalent "+request.getParameter("currency")+" value is ");
41: if(currency.equals("Rs"))
42: {
43: CurrencyWebServicePortTypeProxy proxy= new CurrencyWebServicePortTypeProxy();
44: float rs = proxy.dollarsToRs(Float.parseFloat(request.getParameter("dollar")));
45: out.println(rs);
46: }


An error occurred at line: 43 in the jsp file: /WebContent/currencyconverter.jsp
CurrencyWebServicePortTypeProxy cannot be resolved to a type
40: out.println("<br><br> The equivalent "+request.getParameter("currency")+" value is ");
41: if(currency.equals("Rs"))
42: {
43: CurrencyWebServicePortTypeProxy proxy= new CurrencyWebServicePortTypeProxy();
44: float rs = proxy.dollarsToRs(Float.parseFloat(request.getParameter("dollar")));
45: out.println(rs);
46: }


An error occurred at line: 49 in the jsp file: /WebContent/currencyconverter.jsp
CurrencyWebServicePortTypeProxy cannot be resolved to a type
46: }
47: else
48: {
49: CurrencyWebServicePortTypeProxy proxy= new CurrencyWebServicePortTypeProxy();
50: float e = proxy.dollarsToEuro(Float.parseFloat(request.getParameter("dollar")));
51: out.println(e);
52: }


An error occurred at line: 49 in the jsp file: /WebContent/currencyconverter.jsp
CurrencyWebServicePortTypeProxy cannot be resolved to a type
46: }
47: else
48: {
49: CurrencyWebServicePortTypeProxy proxy= new CurrencyWebServicePortTypeProxy();
50: float e = proxy.dollarsToEuro(Float.parseFloat(request.getParameter("dollar")));
51: out.println(e);
52: }


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

"confused soul", please check your private messages for an important administrative matter. Thanks.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: Unable to compile class for JSP
 
Similar Threads
Charts In JSP
Problem loading the class
image and form data upload problem
Charts In JSP
how to map sapjco.jar file to a jsp program