sheril she

Greenhorn
+ Follow
since Oct 08, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sheril she

we should be using entry.getKey() instead of getName().
One more small problem.
The order of lines in the property file is getting changed completely.Is there a way to maintain this order?
Regards
18 years ago
Thanx a lot Jim!This code has worked.
And Thanx to Michael and Eddie too!
Regards
18 years ago
Hi Eddie,
Thanx for the effort.But the PrintStream does not take the constructor with this format(op1, true, "EUC-JP")
Encoding is supported only in the OutputStreamWriter and InputStreamReader classes.
i tried that too.but the store/save method does not accept these objects.
we r using jdk1.3.1,tomcat 4.1.12,servlet 2.3 and encoding is not a problem.
from the jsp,servlet pages it is writing euc characters perfectly to the
database but only writing to property file is not working.
The entire file is converted to unicode characters.
we r maintaining this file for translation to japanese.
do i need to use the PropertyResourceBundle?I have no idea about it.
This is very urgent.Pls help.
18 years ago
Is it possible to write other characters ie EUC-JP (for japanese)characters to the property file.
this is the code that i have written.in the jsp page & servlet which calls this code i have set the request.setCharacterEncoding("EUC-JP").but it is still saving as unicode characters in the file
FileInputStream fp1 = new FileInputStream(PROPERTYFILE);
prs.load(fp1);
for(int i=0;i<labels.length;i++)
{
prs.setProperty(labels,values);
}
FileOutputStream op1 = new FileOutputStream(PROPERTYFILE);
prs.save(op1,"");
fp1.close();

Can anyone pls help
18 years ago
instead of assigning the values of the tokens inside the loop use an array and use nextToken() only once within the loop.Use the array values to assign to a,b,...
for eg
int i=0;
StringTokenizer st=new StringTokenizer(line,"|");
while (st.hasMoreTokens())
{
ar[i]=st.nextToken();
i++;
}
18 years ago
could u pls explain when exactly the servlet constructor is called and when the init method is called.since in a servlet's lifecycle there is only the init ,service and destroy.and it is said that the init method is called when the servlet is loaded.so what is the difference between creating instances and loading the servlet?where are these instances stored?
18 years ago
just check out if this works

String charset = response.getCharacterEncoding();
18 years ago
hi,
i get this error frequently while executing the pages in IE.The files are located in a linux server with jdk1.3 and tomcat 3.2.2 as the webserver.could anyone help?
thanx in advance
Internal Servlet Error:
javax.servlet.ServletException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.OutOfMemoryError
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:110)
at java.util.zip.ZipFile.(ZipFile.java:125)
at sun.tools.java.ClassPath.init(ClassPath.java:97)
at sun.tools.java.ClassPath.(ClassPath.java:41)
at sun.tools.javac.BatchEnvironment.classPaths(BatchEnvironment.java:212)
at sun.tools.javac.BatchEnvironment.create(BatchEnvironment.java:147)
at sun.tools.javac.Main.compile(Main.java:456)
at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:158)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
18 years ago
Thank u Ilja Preuss ,
i asked this just to know if we can determine the amount of memory required for our application to run
18 years ago
Is there any method to determine number of object instances of a particular class currently in memory and to find an object's size.
thanx in advance
18 years ago
is it possible to prevent a class from being subclassed without using final keyword
18 years ago