Mazhar Ismail

Greenhorn
+ Follow
since Sep 10, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mazhar Ismail



Form the above html file i have to read the tags and grab the term "Sales" within <td> tag using java. I know there are some HTML parsers for java suing which we can read the HTML file. I wanted to know what are the parsers available and which is the best to use.

--
Mazhar
Hi All,

I want to parse HTML files using java and access nodes using java. Can anyone of you suggest which is the best and easy to learn HTML parser for java I can use.

Thanks,
Mazhar
Hi All,

I am kind of stuck with a requirement in Java and I do not have any clue how to it. I do not have any idea how to do it. So my aim is to grab the text "Sales" (enclosed between the td tag) using java from the below mentioned HTML file. I am new to java. It will of great help if anyone gives me a code for my requirement so that I get an idea how to do it.

I am really really sorry for asking the code but trust me I have read lot of material/forum available online and also referred books but could not find any help. This is urgent as I have to implement this in my project.

PLEASE HELP ME!!!

If I get the solution I will post it on the forum as I always do so that If anyone else comes across this problem it would be easy for the person to solve it.

16 years ago
tried overriding.i guess i am doing it wrong.any example how to do it.

Thanks,
Mazhar
16 years ago
Hi,

I have a requirement of parsing an HTML page and pulling out a text from a specific HTML tag. This is the first time I am working on this. I am able to read the Tags and their Id's and also the complete text on the page but have no idea how to read the text enclosed in a specific tag. I have written my code below. I want to grab the text within <td id="dept1">Sales</td> only i.e., "Sales" in this case. Please help me.





--
Mazhar

[ October 09, 2008: Message edited by: Mazhar Ismail ]

[ October 09, 2008: Message edited by: Mazhar Ismail ]

[ October 09, 2008: Message edited by: Mazhar Ismail ]
[ October 09, 2008: Message edited by: Mazhar Ismail ]
16 years ago
got the solution we can pass the parameters from jsp using the cewolf:param tag

ex: <cewolf:param name="year" value="<%=(Serializable)inputYear%>"/>

and now can read in the produceDataset method of the java file.

ex:
String year = null;
if(params.containsKey("year")) {
year = (String)params.get("year");
}


hope makes sense
16 years ago
JSP
I am using cewolf to generate charts using JSP.

Can anyone tell me how to pass a value (from a html form field) to cewolf dataproducer java file.

Thanks
Mazhar
16 years ago
JSP
Hi,

I am using cewolf for generating charts. I have a requirement where I have to pass a value from JSP (from html form text field) to the DataProducer java file. I have googled for a example but couldn't find any.

Can anyone tell me how to do it.

Thanks,
MAzhar
Thanks for the advice. Got the solution. Posting the solution for people who may come across similar issue.

All we have to do is to go to windows firewall settings and add tomcat exe file under execpetions

Steps:
1. Click on start button and then on control panel.
2. Double Click the windows firewall icon from the list.
3. Click on the Exceptions tab.
4. Click on Add Program and select tomcat exe file from the bin directory (tomcat6.exe in case of Tomcat6.0). If the file is not found on the list open it using the browse button.

Now you can access the tomcat webserver from any computer in the network
16 years ago
Hi

I am running tomcat 6.0 on windows machine on 8080 port. I can access the server using http://localhost:8080 but when I am not able to access it when I use my computers ip-address in place of localhost (http://ipaddress:8080).

I have gone through some of the forums online where they are asking to remove the firewall.

Can anyone tell me how do we do this or is there any other way by which I can start browsing the webserver with the ipaddress.

Thanks,
Mazhar
16 years ago
Hi,

I have installed cewolf on Tomcat6.0 and the examples are running fine. I have written a example dataproducer java file mentioned below.

package de.laures.cewolf.example;

import java.io.*;
import java.util.*;

//import org.apache.common.*;
import org.jfree.data.category.*;

import de.laures.cewolf.*;

public class SimpleDataProvider implements DatasetProducer, Serializable{
public String getProducerId(){
return "de.laures.cewolf.example.simpledata";
}
public boolean hasExpired(Map arg0, Date arg1){
return false;
}
public Object produceDataSet(Map arg0) throws DatasetProduceException{
DefaultCategoryDataset dataset=new DefaultCategoryDataset();
for (int i=1;i<=10;i++){
dataset.addValue(i*1,"first series",new Integer(i));
}
return dataset;
}
}

I am getting 2 compilation errors when i am trying to compile this file. I think it is not able to find the DatasetProducer interface and DatasetProduceException class.

I work on windows. My cewolfexamples are in "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\cewolfexample-1.0\WEB-INF". The WEB-INF has all the required directories and files cause I am able to run the example application. I have written this java file in "c:\java" directory and trying to compile it from there. Please tell me if I have to specify any classpath if so what should be the classpath and how do I set it.

--
Mazhar