Trelston Moraes

Greenhorn
+ Follow
since Feb 27, 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 Trelston Moraes

Hi,

I don't know if this will interest you guys but i seem to have found a solution to the css problem in firefox 3. There is something weird that goes on in firefox 3.Consider the following code

[div style='position:absolute;height:300px']
[div style='width:300px;'] Hi [/div]
[/div]

In IE6,IE7 and Firefox 2 the default width for the outer div would be 100%.
However, in Firefox 3 there is no default width for a div that has its position set as 'absolute'. So you have to explicity specify the width or else it will take the width of the inner Div.

There is also something else. If you are trying to parse an xml using javascript in Firefox. I suggest you use "new XPathEvaluator()" to read the xml doc adn to read each noe you can use document.importNode(oNode,true).

Thanks hope this is of some help. I think this thread can be safely closed.
I hereby/thereby(confused!!!) declare this thread closed. HaHa
Hi
i have just found a way to parse the xml in FireFox 3 using xPath, it is just that firefox 3 is far more strict when it comes to syntax and you are not allowed any leeway, a little bit of discipline solves the problem. That leaves me with the css problem and finding support on the net for firefox 3 is difficult. If any of you can find or know of any link that can help me please let me know.
IE8 is still in beta so firefox3 is high priority right now

Thanks for your help
Hi
Yes we are adding proper doctype to all our pages but somehow things have gone all wrong
Hi,

The website that i have created was built to support IE6,IE7 and Firefox 2. Now with the arrival of IE8 and Firefox 3. I need to support even these browsers - business need. Now with these 2 browsers the rendering has gone for a toss not to mention that i think the way parsing xml by these browsers using xpath has also changed. What bugs me even more is the lack of support for these browsers on the net. So if anyone has any idea about the difference between these two browsers and their previous versions especially when it comes to CSS, javascript and xml parsing please help
Thanks
Thanks for the help. I have found that a lot of the data that is coming can actually be processed on the client side. They are mostly html tags and that was what was making the data heavy. So now i return an xml file with only the important data which is only 20kb in size and then i parse that xml file on the client where i add these tags. So things are noe happening faster
15 years ago
Hi,
I am facing some issue with the performance of a certain page on my website.Now, onclick of a link i send an ajax request to the server to get some data. Now the data is 88kb in size which obviously is very big and on a slow bandwidth is takes sometime to load. So, is there a way in which i can compress the data and then decompress it on the client using javascript(I Kno this is a java website but im really in need).

Thanks in advance
15 years ago

Originally posted by Jeanne Boyarsky:
Trelston,
Welcome to JavaRanch!

Can you connect to mysql from the command line with that username/password? This will help narrow down where the problem lies.



Thanks Jeanne
I have used the following piece of code to connect to a MySql database.The error message that i get is "Access denied for user 'ROOT'@'TRELSTON' (using password: YES)". Please check the code and see if it is perfect or i have made a mistake somewhere or this error is because i have no access to the database. My PM thinks i have made a mistake.
Please help.


<%

String dbUrl ="jdbc:mysql://dest:3306/ai?user=ROOT&password=root";
String dbClass = "com.mysql.jdbc.Driver";
//String query = "Select * FROM users";
Connection con = null;
try {

Class.forName(dbClass).newInstance();
//con = DriverManager.getConnection("jdbc:mysql://destscience:3306/Sakai","ROOT","sa");
con = DriverManager.getConnection(dbUrl);
//Statement stmt = con.createStatement();
out.print("Connection Created");
con.close();
}
catch(Exception e)
{
out.print(e.getMessage());
}

Originally posted by Ulf Dittmer:
Welcome to JavaRanch.

JSPs are not meant for streaming files. They'll generally insert white space characters that are hard (or may be impossible) to get rid of. What you're seeing is probably an artifact of that. Use a servlet instead.



Thanks Ulf
16 years ago
JSP
I have written the following piece of code in my jsp file. It sends an xml file for download using outputstream

<%

String strPath = application.getRealPath("web/resources/config.xml");
File oFile = new File(strPath);
String strFileName = oFile.getName();
response.setContentType(getResponseType(strFileName));


byte[] bByteArray = new byte[(int)oFile.length()];
FileInputStream oFileInputStream = new FileInputStream(oFile);
oFileInputStream.read(bByteArray);

ServletOutputStream oOutputStream = response.getOutputStream();
oOutputStream.write(bByteArray);
oOutputStream.flush();
%>
When the file is downloaded then when i open notepad i get the following unwanted characters '28d' at the start of the file and at the end of the file we get 0.The snapshot taken from fiddler is as follows. I need it without those characters because then i have an embedded object that reads it.



28d
<?xml version="1.0" encoding="utf-8"?>
<Binary>
<binaries>
<binary />
<binary />
<binary /><binary />
<binary />

<binary />
<binary />
<binary />
</binaries></BinaryManifest>
0
16 years ago
JSP