Unable to compile class for JSP

Joined
Oct 3, 2010
Messages
1
Reaction score
0
I have written a dynamic web project in eclipse..it is actually 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.0.29..
java 1.6 is installed there

the same java is installed in my system as well....

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top