compilation errors

compilation errors

package jsptube.tutorials.servletexample;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class WelcomeServlet extends HttpServlet 
{

    @Override
    public void init(ServletConfig config) throws ServletException 
    {
        super.init(config);
    }


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException 
    {

        String name = request.getParameter("name");
        String welcomeMessage = "Welcome "+name;

        response.setContentType("text/html");

        PrintWriter out = response.getWriter();

        out.println("<html>");
        out.println("<head>");
        out.println("<title> A very simple servlet example</title>");
        out.println("</head>");
        out.println("<body>");
        out.println("<h1>"+welcomeMessage+"</h1>");
        out.println("<a href="/servletExamples/pages/form.html">"+"Click here to go back to input page"+"</a>");
        out.println("</body>");
        out.println("</html>");
        out.close();

    }


public void destroy() {

}
} 




giving errors:

1)  WelcomeServlet.java:37: ')' expected

out.println("<a href="/servletExamples/pages/form.html">"+"Click here to go back to input page"+"</a>");                                        ^

2) WelcomeServlet.java:37: not a statement  

out.println("<a href="/servletExamples/pages/form.html">"+"Click here to go back to input page"+"</a>");
     ^

3)WelcomeServlet.java:37:';' expected    

out.println("<a href="/servletExamples/pages/form.html">"+"Click here to go back to input page"+"</a>");
            ^    


please tell me the reason. fast                           
View Answers









Related Tutorials/Questions & Answers:
compilation errors
compilation errors  package jsptube.tutorials.servletexample; import java.io.IOException; import java.io.PrintWriter; import...() { } } giving errors: 1) WelcomeServlet.java:37: ')' expected
compilation errors - Swing AWT
compilation errors  how to create a window with five textFields, five labels and three buttons
Advertisements
errors
that what the errors in above code
check for errors
check for errors  How can I check for errors
What is the errors?
What is the errors?  ) while ( c <= 5 ) { product *= c; ++c;   if ( gender == 1 ) cout << "Woman" << endl; else; cout << "Man" << endl;   Post the whole code
errors
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot exist ( though i imported it) & cant recognise SUCCESS etc symbol.i think i
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot exist ( though i imported it) & cant recognise SUCCESS etc symbol.i think i
types of errors in php
types of errors in php  What are the different types of errors in php
compilation fail
compilation fail  package jsptube.tutorials.servletexample; import javax.servlet.GenericServlet; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import java.io.IOException; import
java Compilation
java program compilation time following error is occur in my system Note
java Compilation
java program compilation time following error is occur in my system Note
java Compilation
java program compilation time following error is occur in my system Note
compilation error
compilation error  Hi my program below is not compiling,when I try to compile it i'm getting the error message "tool completed with exit code 1".The loop has to be at the end of the program can you help me. Blockquoteimport
ModuleNotFoundError: No module named 'errors'
ModuleNotFoundError: No module named 'errors'  Hi, My Python... 'errors' How to remove the ModuleNotFoundError: No module named 'errors'... to install padas library. You can install errors python with following command
Compiler errors in java
Compiler errors in java  Hi, I used GenerateRDF java file. Am getting errors when i run this code. I used command prompt only. getting errors as no package exist. i followed your instructions properly. Please help me out
srvlet compilation error - JSP-Servlet
srvlet compilation error  while compiling a servlet, httpservlet class not found errors & many such class not are generated.   Hi Friend, It seems that compiler haven't found the servlet-api.jar file.So put
Servlet compilation problem - Java Beginners
Servlet compilation problem  hi, m a beginner to servlet world... i m facing problem in servlet compilation problem.. i have set the classpath.... i m compiling my program frm c:\javac HelloWorld.java but m getting 6 errors
selectoptions errors in java script
selectoptions errors in java script  hi, in my web page when I select the color of the image it displays that particular color but when i again opt the select option it displays errors message. How do I rectify this problem
Servlets errors in same page.
Servlets errors in same page.  How do I display errors list in the same page where a form field exists using servlets...........i.e. without using JSP? Please explain with a simple username password program
The errors tag
In this section, you will learn about the errors tag of the Spring form tag library
java compilation error - Java Beginners
java compilation error  Hello, I'm having problems with trying to correct 2 compiler errors. The code I'm having trouble with is listed below. It's flagging two errors for this one code. The first error says identifier
java compilation error - JSP-Servlet
java compilation error  sir ,i have jdk1.6.0_01 and textpad installed .I have also set classpath and path.But stil on compiling my servlet programs in textpad i get compile time errors like javax.servlet.* ,javax.servlet.http.
jsp errors - JSP-Servlet
jsp errors  Hi I got errors when running a jsp file I am giving the file. this is from rose india. I set the class path for 3 jar files i.e.... Now i am getting less errors compared to previous. But I am getting 2 errors
java compilation error - Applet
java compilation error  I am getting compilation error in the following code.: public void paint(Graphics g) { switch(screen) { case 0: g.drawString(line1,2,10); break; case 1
java compilation error - Hibernate
java compilation error  hi i am getting org.hibernate.exception.GenericJDBCException: Cannot open connection exception when runnig the code why this exception is coming
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?  WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP
groovy compilation error - Framework
groovy compilation error  while i am running the grails application , i got the error message like: [groovyc...] [groovyc] 1 error Compilation error: Compilation Failed how we can resolve
Java Program Errors
Java Program Errors  These are the 2 errors which I am getting when executing the java source code extracted from executable jar file The project was not built since its build path is incomplete. Cannot find the class file
Webshpere compilation error
Webshpere compilation error   I want clear result . Thank you WSWS3166E: Error: No client transport named 'http' found. faultActor: null faultDetail: [10/5/10 13:19:40:937 EDT] 00000043 SystemOut O WSWS3166E: Error
jdbc compilation error - JDBC
jdbc compilation error  java.lang.Exception: Problem in call_select when i am executing the program i am getting the above error. how can i resolve it?  Hi friend, plz specify in detail and send me code
Correct errors - Java Beginners
Correct errors  Identify and correct the errors in the following program: public java Method { public static method1(int n, m) { n += m; xMethod(3. 4); } public static int xMethod(int n) { if (n > 0) return 1
Java compilation error - Java Beginners
Java compilation error  Method overridden problems in compile time error
ModuleNotFoundError: No module named 'masonite-errors'
ModuleNotFoundError: No module named 'masonite-errors'  Hi, My... named 'masonite-errors' How to remove the ModuleNotFoundError: No module named 'masonite-errors' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pretty-errors'
ModuleNotFoundError: No module named 'pretty-errors'  Hi, My... 'pretty-errors' How to remove the ModuleNotFoundError: No module named 'pretty-errors' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-errors'
ModuleNotFoundError: No module named 'django-errors'  Hi, My... 'django-errors' How to remove the ModuleNotFoundError: No module named 'django-errors' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'edeposit.amqp_errors'
ModuleNotFoundError: No module named 'edeposit.amqp_errors'  Hi...: No module named 'edeposit.amqp_errors' How to remove the ModuleNotFoundError: No module named 'edeposit.amqp_errors' error? Thanks   Hi
ModuleNotFoundError: No module named 'haiku-errors'
ModuleNotFoundError: No module named 'haiku-errors'  Hi, My Python... 'haiku-errors' How to remove the ModuleNotFoundError: No module named 'haiku-errors' error? Thanks   Hi, In your python
STRUTS2.0 Validation Errors
the previous field errors persist in the page. For eg:if i am not entering both
java servlet compilation error - Servlet Interview Questions
java servlet compilation error  hello sir plz help me, i compile the servlet program but i got the arrors that errors are package javax.servlet.http doesnot exist, alla packese i got the same problam..  Hi Friend
java compilation error,Struts2 - Struts
java compilation error,Struts2  hi, From last 3 days i m trying for image uploading through struts2 by taking the reference of file upload sample code from roseindia.net site,But i m unable to insert it into database,its
java compilation error - Applet
java compilation error  hi friends the following is the awt front design program error, give me the replay E:\ramesh>javac product.java Note: product.java uses or overrides a deprecated API. Note
Java Compilation error - SQL
Java Compilation error  ava.lang.NullPointerException at beanUtils.SaleHeaderUtility.getFullRemainPatientList(SaleHeaderUtility.java:754) at forms.ProcessDialog.updatePatientBalances(ProcessDialog.java:119
compilation error - Java Beginners
compilation error  Dear sir, When i compile some pgms i am getting below error.what may be the reason? "uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details."  Hi Friend
java compilation error - Ant
java compilation error  hi, i have a application in which i m reading from an xml file and then storing its values in database.but when i started using ant its main program is not running as it is unable to detect the jar file
command prompt is compilation is not working
command prompt is compilation is not working   Dear java users can anyone help me to run the program in command line prompt i tried by selecting the environment variable and class path and path in my system my program
java compilation error - Hibernate
java compilation error  hi, i have made an registration page whosevalues should be inserted into database. i have used hibernate and eclipse it is working fine. but when i make a war file and deploy it using ant and then run
java compilation - Java Beginners
); System.out.println("College/University " + college); } } For compilation : c:\>
Java errors when attempting the following.
Java errors when attempting the following.  Give the java errors in attempting the following : 1) performing division operation on string value. 2) redefining base class final method in derived class. 3) defining a method
date_get_last_errors
date_get_last_errors date_get_last_errors alias DateTime::getLastErrors function returns the warnings and errors while parsing a date/time string... about warnings and errors. Example: <?php $date = date_create('asdfasdf

Ads