Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Jayanth Mathavan

Greenhorn
+ Follow
since Nov 10, 2005
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 Jayanth Mathavan

Hi,

I have a Sun exam voucher which is valid till July 2009 for Rs.6500. Since I am not going to take up the exam, I am planning to sell it.
If anyone is interested in buying it from me you can contact me at jayanthsm@yahoo.com
I am from Bangalore.

Cheers
Jayanth Mathavan
11 years ago
Hi,
I am planning to take up the SCWCD exam within the next two months and I have started with the preparation. I would like to know the difference in the question pattern in SCWCD 1.4 and SCWCD 1.5
Do we need to write code snippets for SCWCD 1.5 version? Will there be only objective type questions for SCWCD 1.5 version or other types of question formats also included like the code snippets,programming logic, etc? Should I take up the SCWCD 1.4 or SCWCD 1.5 version?
Please clarify.

Thanks
Jayanth Mathavan
[ October 30, 2008: Message edited by: Jayanth Mathavan ]
Hi,

No, I didn't use var for declaring a variable in Java. I can even use as shown below,

Packages.MyClass.add_method(5,10);

This is not a web application. This Javascript is used in one of the modules in a tool called Kettle. So I don't think it will be possible to use DWR.

Thanks,
Jayanth.
Hi,
I want to call a method of a standalone Java code from within a Javascript. Below is the way we can call a static method in a Java code.

var x = Packages.MyClass.add_method(5,10);

add_method() is a static method in MyClass..

Suppose I want to call a non-static method belonging to the class, how to do it? Can someone please help me out? am not using applets.

Thanks,
Jayanth Mathavan.
Hi all,
I have a very basic doubt with regards to setting the class path for a java program.The Java program and class file is located in below mentioned directory.
D:\Workspace\FileHandling\com\aol\ch

The above java program has the package declaration,
package com.aol.ch;

From another directory(D:\test\) I set path as mentioned below,
>>set PATH=C:\Sun\SDK\jdk\bin;.;%PATH%
>>set CLASSPATH=%CLASSPATH%;D:\Workspace\FileHandling\com\aol\ch

and i run the java class file from the directory(D:\test\),I run using the below mentioned command.

>>java FilesEdit

and I get the below errors,

Exception in thread "main" java.lang.NoClassDefFoundError: FeedsEdit (wrong name
: com/aol/ch/FeedsEdit)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

I don't know what mistake am making but everything looks fine. Can someone please help me out?

Thanks,
Jayanth Mathavan
12 years ago
Hi all,
Can anyone please tell me how to perform file handling operations like read,write to *.xml file using Javascript? Please help.

Thanks,
Jayanth Mathavan
Hi,
Am a bit confused about the functionality of a declarative tag and a scriptlet tag.
example of a declarative is <%! int x=10; %>
and Scriplet is <% public void method1(int x, int y){ int a = x+y; } %>

Can we use java codes inside a declarative tag? If so, then whats the difference between a declarative tag and a scriptlet tag?

Thanks and Regards,
Jayanth Mathavan.
[ August 16, 2007: Message edited by: Jayanth Mathavan ]
13 years ago
JSP
Hi,
I have a very basic question with Comparator. Please see the code below:

In the above code, I guess the compare() method in class AgeComparator is called for sorting the data. I would like to know from which part of the code, the compare() method is called.Basically how the flow of the above program is happening? Please help.

Thanks and Regards,
Jayanth Mathavan


Edit by mw: Added Code Tags.
[ August 14, 2007: Message edited by: marc weber ]
13 years ago
Hi all,
I want to convert the tags in a HTML file to Struts form.To convert all the tags manually is taking lots of time since the HTML files are huge. So is there any tools available with which we can do the conversion? When I searched the net for any such tool, I found Struts Console(Page Convertor). But that tool is working for only small HTML files but if I give some lengthly HTML files, it just keeps on running... am not sure if it has hanged or I have to change any other settings or the HTML file which I gave as input is not correct(like not closing the tags properly).
Please help.

Thanks,
Jayanth Mathavan

[ September 28, 2006: Message edited by: Jayanth ]
[ September 28, 2006: Message edited by: Jayanth ]
13 years ago
Hi,
Yes the web.xml file is located in WEB-INF folder only. and the classes folder is also located in the WEB-INF folder. am getting the following error.

HTTP Status 404 - /Pelican/Serv

--------------------------------------------------------------------------------

type Status report

message /Pelican/Serv

description The requested resource (/Pelican/Serv) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.28



Please find the below the code for web.xml and Ch1Servlet.java

+++++++++++++++++++Ch1Servlet.java++++++++++++++++++++++++++++++
/*import javax.servlet.*;*/
package one;
import javax.servlet.http.*;
import java.io.*;

public class Ch1Servlet extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException
{
PrintWriter out = response.getWriter();
java.util.Date today = new java.util.Date();
out.println("<html>" + "<body>" +
"<h1 align=center>HF\'s Chapter1 Servlet </h1>" +
"<br>" + today + "</body>" + "</html>" );
}
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++web.xml++++++++++++++++++++++++++++++
<web-app>
<servlet>
<servlet-name>Chapter1 Servlet</servlet-name>
<servlet-class>one.Ch1Servlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Chapter1 Servlet</servlet-name>
<url-pattern>/Serv</url-pattern>
</servlet-mapping>
</web-app>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Hi everyone...
I bought Head First Servlets & JSP book only yesterday. I was just working out the first quick demo in the first chapter of the book. I followed all the steps given in the book for creating the first simple servlet, but am getting an error message in the internet explorer when trying to view the page.Below is the directory structure... and am using eclipse paltform. Please help.
Pelican(project name)
|
|__ src
| |_one
| |_Ch1Servlet.java(file)
|
|
|__ WEB-INF
|_classes
| |_one
| |_Ch1Servlet.class(file)
|
|_web.xml(file)

The Ch1Servlet.java and web.xml are as it was in the book. and this is what i gave in IE for displaying the page. http://localhost:8080/Pelican/Serv

Thanks & Regards,
Jayanth.
Hi all,
I have completed SCJP 1.4 in December 2005. I wish to know for how long is this certification valid. Is there any period after which this certification is expried and we have to go for upgrades or higher version certifications?

Regards,
Jayanth.
Hi all,
I'm planning to go for SCMAD. I wish to have some advice on how to go about preparing for the exam. I would like to know which book to follow for the exam and is that book available in India. Please do let know about mock exams and resources on the internet.

Thanks and Regards,
Jayanth.
Hi all,
I have completed SCJP 1.4 with 88% last december. I had wanted to work in Java technology in my company but i was fored to work in mainframes due to "business requirements" of the company. So am planning to shift to another company where i can get a java project. For that am planning to do SCMAD. Is it really worth doing this certification for getting me a job in a new company here in India?? I have selected to do this certification because i have little interest in mobile applications.Please help me....
Thanks and Regards,
Jayanth.
Hi...

== operator will give false when the two comparing operands are of different objects. so == will return true when the operands refer to the same object.

in the first sinppet " String ".trim() will create a new string object and when that is compared to the second operand "String" it will return false.

in the second snippet "String".trim() operation will not create a new string object since the "String" object is already trimmed so the old object is retained. and when that is compared with "String" it returns true. the same thing applies to snippet three also.

hope i have cleared your doubt.

Bye,
Jayanth.