• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to compile class for JSP

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"confused soul", please check your private messages for an important administrative matter. Thanks.
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic