| 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: 56163
|
|
|
"confused soul", please check your private messages for an important administrative matter. Thanks.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Unable to compile class for JSP
|
|
|