compilation errors

Ads
 

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

Ads









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
errors
that what the errors in above code
Advertisements
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
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
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
types of errors in php
types of errors in php  What are the different types of errors in php
Java compilation error - Java Beginners
Java compilation error  Method overridden problems in compile time error
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
compilation error - Java Beginners
compilation error  class s { public static void main(String ar[]) { int j=0834; System.out.println(j); } } when we are compiling
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
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  i have downloaded java software(version 6 update 12) from www.java.com. whenever i try to compile the program using javac command, error message is displayed javac is not recognized as an internal
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
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
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
STRUTS2.0 Validation Errors
the previous field errors persist in the page. For eg:if i am not entering both
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
Need urgent help with C++ errors!
Need urgent help with C++ errors!  hi, i'm new to C++ programming. this is my code... i'm using Turbo C++. It's showing so many errors!.. I...() { cout<<"Can somebody fix this?"; } the errors are listed as follows
Does the object type known during compilation in Java?.
Does the object type known during compilation in Java?.  class A { } class B extends class A { } class checkType { public static void main(String[] args) { A ObjA = new B();/// Here ObjA is of type A--> this fact

Ads