Results 1 to 2 of 2
- 03-03-2011, 04:29 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 2
- Rep Power
- 0
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.
- 03-03-2011, 10:36 PM #2
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.
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.Java Code:<html> <head> <title>Hola</title> </head> <body bgcolor="white"> <h1>H1</h1> </body> </html>
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
-
Strange font problem
By BayPhilip in forum Jobs DiscussionReplies: 0Last Post: 03-01-2011, 10:11 PM -
Set Font Color, Font Style & Font Family While Replacing Text
By sherazam in forum Java SoftwareReplies: 0Last Post: 08-18-2010, 10:31 AM -
strange problem
By dinosoep in forum New To JavaReplies: 6Last Post: 05-01-2010, 10:28 AM -
Strange Problem
By Aseem in forum JDBCReplies: 5Last Post: 02-12-2010, 07:46 AM -
How to change font/ font color etc in a graphic object using JCombobox?
By JavaInLove in forum AWT / SwingReplies: 5Last Post: 04-25-2009, 08:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks