Hi,

Many times we come across a lot of out.println( ... ) statements in our servlets:

public class MyServlet extends ....
{
        ....
        ....

        doPost( ... )
        {
                .....
                .....
                out.println("<html>");
                out.println("<title>");
                out.println("ding dong bells");
                out.println("</title>");
                out.println("<body>");
                out.println("</body>");
                out.println("</html>");
                ......
        }
}

I do know that if your code has more html .. its better to write a .jsp file instead of a servlet.java file
There are some cases where this is unavoidable and I was wondering if there was a way to do something like below in a .java file:


public class MyServlet extends ....
{
        ....
        ....

        doPost( ... )
        {
                .....
                .....

<Some kind of tag that signals to the compiler that whatever follows is to be "out.println(... )" >

<html>
<title>
ding dong bells
</title>
<body>
</body>
</html>

</end of the signalling tag>
......
}
}



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to