Help coderanch get a
new server
by contributing to the fundraiser

Varatharuban B

Greenhorn
+ Follow
since Feb 04, 2008
Merit badge: grant badges
For More
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 Varatharuban B

Yes. This is based on JApplet.
But I have to generate or call that mouseClicked() event without any mouse events.
Can I generate the same method using programming, with out event ?

Thanks
14 years ago
Hi

Is there any way to trigger any MouseLister callback methods (mouseClieked(), mousePressed(), etc ...) without MouseListener ?

OR
Can I call mouseClicked(MouseEvent e) method manually ? If YES, how can I pass the MouseEvent ?

Can any one please help me ?

Thanks in advance

Regards
Varatharuban
14 years ago
Hi

Is there any way to calculate the internet speed in core java ?

Please reply.

Thanks in advance.

Varatharuban B.
14 years ago
Hi
I face one problem in Head First SCWCD's Custom Tag Development (chapter 10) chapter.
When I try to compile a SimpleTagHandler file using following command I got some error.

E:\maruthi_wcd\ch10_tg_hnd>javac -classpath "c:\Program Files\apache-tomcat-6.0.16\lib\servlet-api.jar" -d classes src\com\foo\SimpleTagTest.java

Error
------
src\com\foo\SimpleTagTest.java:4: package javax.servlet.jsp does not exist
import javax.servlet.jsp.JspException;
^
src\com\foo\SimpleTagTest.java:5: package javax.servlet.jsp.tagext does not exist
import javax.servlet.jsp.tagext.SimpleTagSupport;
^
src\com\foo\SimpleTagTest.java:8: cannot find symbol
symbol: class SimpleTagSupport
public class SimpleTagTest extends SimpleTagSupport {
^
src\com\foo\SimpleTagTest.java:12: cannot find symbol
symbol : class JspException
location: class com.foo.SimpleTagTest
public void doTag() throws JspException, IOException {
^
src\com\foo\SimpleTagTest.java:16: cannot find symbol
symbol : method getJspContext()
location: class com.foo.SimpleTagTest
getJspContext().setAttribute("movie", movies[i]);
^
src\com\foo\SimpleTagTest.java:17: cannot find symbol
symbol : method getJspBody()
location: class com.foo.SimpleTagTest
getJspBody().invoke(null);
^
6 errors


---------------------------------------- This is the TagHandler class ------------------------
package com.foo;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;

public class SimpleTagTest extends SimpleTagSupport {

public SimpleTagTest(){}

public void doTag() throws JspException, IOException {
String[] movies = {"Sivaji", "Anniyan", "Kandasamy", "Johi"};

for(int i=0; i < movies.length; i++){
getJspContext().setAttribute("movie", movies[i]);
getJspBody().invoke(null);
}
}
}

Thanks in advance

Varatharuban



I study Head First JSP & Servlet.In chapter 3 (Mini MVC tutorials) I have a problem.In the second example (beer_v2),when I compile the servlet file there are some errors gives by the compiler.

First program working properly.

I build directory structure properly.

Can you give any solutions.
---------------------------------------------------------

E:\Java\SCWCD\Chapter_3\beer_v3>javac -d classes src\com\example\web\BeerSelect.
java
src\com\example\web\BeerSelect.java:3: package com.example.model does not exist
import com.example.model.*;
^
src\com\example\web\BeerSelect.java:22: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
src\com\example\web\BeerSelect.java:22: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
3 errors

E:\Java\SCWCD\Chapter_3\beer_v3>

-----------------------------------------------------------------------
Thanks in advance.

Regards,
Varatharuban.
16 years ago