Results 1 to 2 of 2
  1. #1
    BayPhilip is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default Strange font problem after writing my first servlet

    Hello

    First of all I want to apologize if I am posting thread in wrong place, but I have no idea where else I can post it.

    So my problem is with java fonts. Suddenly fonts of all my java application have been changed after I have tested my first servlet. I see really ugly font in all java web-based web sited and all java based desktop applications.

    Do you have any idea where I can restore default font setting for java from?

    Thank you.

    My servlet source code (Nothing special and I am almost sure that isn't caused my it)

    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;

    /**
    * My test servlet
    * @author Liz Warner
    */

    public class program extends HttpServlet {

    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException
    {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

    out.println("<html>");
    out.println("<head>");
    out.println("<title>Hola</title>");
    out.println("</head>");
    out.println("<body bgcolor=\"white\">");
    out.println("<h1> Hi </h1>");
    out.println("</body>");
    out.println("</html>");
    }
    }
    Last edited by BayPhilip; 03-03-2011 at 04:36 PM.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    I don't see or understand how running this servlet can cause system fonts to change. from the web browser's perspective this will be just a HTML document.
    Java Code:
    <html>
    <head>
    <title>Hola</title>
    </head>
    <body bgcolor="white">
    <h1>H1</h1>
    </body>
    </html>
    In that if you put that in a file.html on your desktop and load it in the browser, it would look the same as from your server.
    unless somehow there is something else that is introducing a .css file from your server.

    I would check the browse settings, maybe something got adjusted.

    Or review what other applications or software you installed recently.

    It might be possible that installing Java VM would install fonts, but these would only come up to be used within Java applications, e.g. Swing applications.

Similar Threads

  1. Strange font problem
    By BayPhilip in forum Jobs Discussion
    Replies: 0
    Last Post: 03-01-2011, 10:11 PM
  2. Replies: 0
    Last Post: 08-18-2010, 10:31 AM
  3. strange problem
    By dinosoep in forum New To Java
    Replies: 6
    Last Post: 05-01-2010, 10:28 AM
  4. Strange Problem
    By Aseem in forum JDBC
    Replies: 5
    Last Post: 02-12-2010, 07:46 AM
  5. Replies: 5
    Last Post: 04-25-2009, 08:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •