Help! Urgent!!!  tree in web page

I am new in Swing. I need to implement a tree in web page. The tree should appear in the left of a frame and the corresponding content should be displayed in the right of the frame.
Could anyone give me an example? I need this help very urgently. Thank you very much in advance.
my email addr:
[email protected]

this is mtmcode.js
i try to send u another part of the code
// Morten's JavaScript Tree Menu
// version 2.3.0, dated 2001-04-30
// http://www.treemenu.com/
// Copyright (c) 2001, Morten Wang & contributors
// All rights reserved.
// This software is released under the BSD License which should accompany
// it in the file "COPYING". If you do not have this file you can access
// the license through the WWW at http://www.treemenu.com/license.txt
* Define the MenuItem object. *
function MTMenuItem(text, url, target, tooltip, icon)
this.text = text;
this.url = url ? url : "";
this.target = target ? target : "";
this.tooltip = tooltip;
this.icon = icon ? icon : "";
this.number = MTMNumber++;
this.submenu = null;
this.expanded = false;
this.MTMakeSubmenu = MTMakeSubmenu;
function MTMakeSubmenu(menu, isExpanded, collapseIcon, expandIcon)
this.submenu = menu;
this.expanded = isExpanded;
this.collapseIcon = collapseIcon ? collapseIcon : "menu_folder_closed.gif";
this.expandIcon = expandIcon ? expandIcon : "menu_folder_open.gif";
* Define the Menu object. *
function MTMenu()
this.items = new Array();
this.MTMAddItem = MTMAddItem;
function MTMAddItem(item)
this.items[this.items.length] = item;
* Define the icon list, addIcon function and MTMIcon item. *
function IconList()
this.items = new Array();
this.addIcon = addIcon;
function addIcon(item)
this.items[this.items.length] = item;
function MTMIcon(iconfile, match, type)
this.file = iconfile;
this.match = match;
this.type = type;
* The MTMBrowser object. A custom "user agent" that'll define the browser *
* seen from the menu's point of view. *
function MTMBrowser()
this.cookieEnabled = false;
this.preHREF = "";
this.MTMable = false;
this.cssEnabled = true;
this.browserType = "other";
if(navigator.appName == "Netscape" && navigator.userAgent.indexOf("WebTV") == -1)
if(parseInt(navigator.appVersion) == 3 && (navigator.userAgent.indexOf("Opera") == -1))
this.MTMable = true;
this.browserType = "NN3";
this.cssEnabled = false;
          else if(parseInt(navigator.appVersion) >= 4)
this.MTMable = true;
this.browserType = parseInt(navigator.appVersion) == 4 ? "NN4" : "NN5";
          else if(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4)
this.MTMable = true;
this.browserType = "IE4";
          else if(navigator.appName == "Opera" && parseInt(navigator.appVersion) >= 5)
this.MTMable = true;
this.browserType = "O5";
if(this.browserType != "NN4")
this.preHREF = location.href.substring(0, location.href.lastIndexOf("/") +1);
* Global variables. Not to be altered unless you know what you're doing. *
* User-configurable options are at the end of this document. *
var MTMLoaded = false;
var MTMLevel;
var MTMBar = new Array();
var MTMIndices = new Array();
var MTMUA = new MTMBrowser();
var MTMClickedItem = false;
var MTMExpansion = false;
var MTMNumber = 1;
var MTMTrackedItem = false;
var MTMTrack = false;
var MTMFrameNames;
var MTMFirstRun = true;
var MTMCurrentTime = 0; // for checking timeout.
var MTMUpdating = false;
var MTMWinSize, MTMyval, MTMxval;
var MTMOutputString = "";
var MTMCookieString = "";
var MTMCookieCharNum = 0; // cookieString.charAt()-number
* Code that picks up frame names of frames in the parent frameset. *
function MTMgetFrames()
if(MTMUA.MTMable)
MTMFrameNames = new Array();
for(i = 0; i < parent.frames.length; i++)
MTMFrameNames[i] = parent.frames.name;
* Functions to draw the menu. *
function MTMSubAction(SubItem)
SubItem.expanded = (SubItem.expanded) ? false : true;
if(SubItem.expanded)
MTMExpansion = true;
MTMClickedItem = SubItem.number;
if(MTMTrackedItem && MTMTrackedItem != SubItem.number)
MTMTrackedItem = false;
if(MTMEmulateWE || SubItem.url == "" || !SubItem.expanded)
setTimeout("MTMDisplayMenu()", 10);
return false;
          else
return true;
function MTMStartMenu()
MTMLoaded = true;
if(MTMFirstRun)
MTMCurrentTime++;
if(MTMCurrentTime == MTMTimeOut)
                    { // call MTMDisplayMenu
setTimeout("MTMDisplayMenu()",10);
                    else
setTimeout("MTMStartMenu()",100);
function MTMDisplayMenu()
if(MTMUA.MTMable && !MTMUpdating)
MTMUpdating = true;
if(MTMFirstRun)
MTMgetFrames();
if(MTMUseCookies)
                              MTMFetchCookie();
if(MTMTrack)
                    MTMTrackedItem = MTMTrackExpand(menu);
if(MTMExpansion && MTMSubsAutoClose)
                    MTMCloseSubs(menu);
MTMLevel = 0;
MTMDoc = parent.frames[MTMenuFrame].document
MTMDoc.open("text/html", "replace");
MTMOutputString = '<html><head>\n';
if(MTMLinkedSS)
MTMOutputString += '<link rel="stylesheet" type="text/css" href="' + MTMUA.preHREF + MTMSSHREF + '">\n';
                    else if(MTMUA.cssEnabled)
MTMOutputString += '<style type="text/css">\nbody {\n\tcolor:' + MTMTextColor + ';\n}\n';
MTMOutputString += '#root {\n\tcolor:' + MTMRootColor + ';\n\tbackground:transparent;\n\tfont-family:' + MTMRootFont + ';\n\tfont-size:' + MTMRootCSSize + ';\n}\n';
MTMOutputString += 'a {\n\tfont-family:' + MTMenuFont + ';\n\tfont-size:' + MTMenuCSSize + ';\n\ttext-decoration:none;\n\tcolor:' + MTMLinkColor + ';\n\tbackground:transparent;\n}\n';
MTMOutputString += MTMakeA('pseudo', 'hover', MTMAhoverColor);
MTMOutputString += MTMakeA('class', 'tracked', MTMTrackColor);
MTMOutputString += MTMakeA('class', 'subexpanded', MTMSubExpandColor);
MTMOutputString += MTMakeA('class', 'subclosed', MTMSubClosedColor) + MTMExtraCSS + '\n<\/style>\n';
MTMOutputString += '<\/head>\n<body ';
if(MTMBackground != "")
MTMOutputString += 'background="' + MTMUA.preHREF + MTMenuImageDirectory + MTMBackground + '" ';
MTMOutputString += 'bgcolor="' + MTMBGColor + '" text="' + MTMTextColor + '" link="' + MTMLinkColor + '" vlink="' + MTMLinkColor + '" alink="' + MTMLinkColor + '">\n';
MTMOutputString += MTMHeader + '\n<table border="0" cellpadding="0" cellspacing="0" width="' + MTMTableWidth + '">\n';
MTMOutputString += '<tr valign="top"><td nowrap><img src="' + MTMUA.preHREF + MTMenuImageDirectory + MTMRootIcon + '" align="left" border="0" vspace="0" hspace="0">';
if(MTMUA.cssEnabled)
MTMOutputString += '<span id="root"> ' + MTMenuText + '<\/span>';
                    else
MTMOutputString += '<font size="' + MTMRootFontSize + '" face="' + MTMRootFont + '" color="' + MTMRootColor + '">' + MTMenuText + '<\/font>';
MTMDoc.writeln(MTMOutputString + '</td></tr>');
MTMListItems(menu);
MTMDoc.writeln('<\/table>\n' + MTMFooter + '\n<\/body>\n<\/html>');
MTMDoc.close();
if(MTMUA.browserType == "NN5")
parent.frames[MTMenuFrame].scrollTo(0, 0);
if((MTMClickedItem || MTMTrackedItem) && MTMUA.browserType != "NN3" && !MTMFirstRun)
MTMItemName = "sub" + (MTMClickedItem ? MTMClickedItem : MTMTrackedItem);
if(document.layers && parent.frames[MTMenuFrame].scrollbars)
MTMyval = parent.frames[MTMenuFrame].document.anchors[MTMItemName].y;
MTMWinSize = parent.frames[MTMenuFrame].innerHeight;
                              else if(MTMUA.browserType != "O5")
if(MTMUA.browserType == "NN5")
parent.frames[MTMenuFrame].document.all = parent.frames[MTMenuFrame].document.getElementsByTagName("*");
MTMyval = MTMGetYPos(parent.frames[MTMenuFrame].document.all[MTMItemName]);
MTMWinSize = MTMUA.browserType == "NN5" ? parent.frames[MTMenuFrame].innerHeight : parent.frames[MTMenuFrame].document.body.offsetHeight;
if(MTMyval > (MTMWinSize - 60))
parent.frames[MTMenuFrame].scrollBy(0, parseInt(MTMyval - (MTMWinSize * 1/3)));
if(!MTMFirstRun && MTMUA.cookieEnabled)
if(MTMCookieString != "")
setCookie(MTMCookieName, MTMCookieString.substring(0,4000), MTMCookieDays);
                              else
setCookie(MTMCookieName, "", -1);
MTMFirstRun = false;
MTMClickedItem = false;
MTMExpansion = false;
MTMTrack = false;
MTMCookieString = "";
MTMUpdating = false;
function MTMListItems(menu)
var i, isLast;
for (i = 0; i < menu.items.length; i++)
MTMIndices[MTMLevel] = i;
isLast = (i == menu.items.length -1);
MTMDisplayItem(menu.items[i], isLast);
if(menu.items[i].submenu && menu.items[i].expanded)
MTMBar[MTMLevel] = (isLast) ? false : true;
MTMLevel++;
MTMListItems(menu.items[i].submenu);
MTMLevel--;
                    else
MTMBar[MTMLevel] = false;
function MTMDisplayItem(item, last)
var i, img;
var MTMfrm = "parent.frames['code']";
var MTMref = '.menu.items[' + MTMIndices[0] + ']';
if(MTMLevel > 0)
for(i = 1; i <= MTMLevel; i++)
MTMref += ".submenu.items[" + MTMIndices[i] + "]";
if(MTMUA.cookieEnabled)
if(MTMFirstRun && MTMCookieString != "")
item.expanded = (MTMCookieString.charAt(MTMCookieCharNum++) == "1") ? true : false;
                    else
MTMCookieString += (item.expanded) ? "1" : "0";
if(item.submenu)
var usePlusMinus = false;
if(MTMSubsGetPlus.toLowerCase() == "always" || MTMEmulateWE)
usePlusMinus = true;
                    else if(MTMSubsGetPlus.toLowerCase() == "submenu")
for (i = 0; i < item.submenu.items.length; i++)
if (item.submenu.items[i].submenu)
usePlusMinus = true; break;
var MTMClickCmd = "return " + MTMfrm + ".MTMSubAction(" + MTMfrm + MTMref + ");";
var MTMouseOverCmd = "parent.status='" + (item.expanded ? "Collapse " : "Expand ") + (item.text.indexOf("'") != -1 ? MTMEscapeQuotes(item.text) : item.text) + "';return true;";
var MTMouseOutCmd = "parent.status=parent.defaultStatus;return true;";
MTMOutputString = '<tr valign="top"><td nowrap>';
if(MTMLevel > 0)
for (i = 0; i < MTMLevel; i++)
MTMOutputString += (MTMBar[i]) ? MTMakeImage("menu_bar.gif") : MTMakeImage("menu_pixel.gif");
if(item.submenu && usePlusMinus)
if(item.url == "")
MTMOutputString += MTMakeLink(item, true, true, true, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                    else
if(MTMEmulateWE)
MTMOutputString += MTMakeLink(item, true, true, false, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                              else
if(!item.expanded)
MTMOutputString += MTMakeLink(item, false, true, true, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                              else
MTMOutputString += MTMakeLink(item, true, true, false, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
if(item.expanded)
img = (last) ? "menu_corner_minus.gif" : "menu_tee_minus.gif";
          else
img = (last) ? "menu_corner_plus.gif" : "menu_tee_plus.gif";
          else
img = (last) ? "menu_corner.gif" : "menu_tee.gif";
MTMOutputString += MTMakeImage(img);
if(item.submenu)
if(MTMEmulateWE && item.url != "")
MTMOutputString += '</a>' + MTMakeLink(item, false, false, true);
                    else if(!usePlusMinus)
if(item.url == "")
MTMOutputString += MTMakeLink(item, true, true, true, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
                              else if(!item.expanded)
MTMOutputString += MTMakeLink(item, false, true, true, MTMClickCmd);
                              else
MTMOutputString += MTMakeLink(item, true, true, false, MTMClickCmd, MTMouseOverCmd, MTMouseOutCmd);
img = (item.expanded) ? item.expandIcon : item.collapseIcon;
          else
MTMOutputString += MTMakeLink(item, false, true, true);
img = (item.icon != "") ? item.icon : MTMFetchIcon(item.url);
MTMOutputString += MTMakeImage(img);
if(item.submenu && item.url != "" && item.expanded && !MTMEmulateWE)
MTMOutputString += '</a>' + MTMakeLink(item, false, false, true);
if(MTMUA.browserType == "NN3" && !MTMLinkedSS)
var stringColor;
if(item.submenu && (item.url == "") && (item.number == MTMClickedItem))
stringColor = (item.expanded) ? MTMSubExpandColor : MTMSubClosedColor;
                    else if(MTMTrackedItem && MTMTrackedItem == item.number)
stringColor = MTMTrackColor;
                    else
stringColor = MTMLinkColor;
MTMOutputString += '<font color="' + stringColor + '" size="' + MTMenuFontSize + '" face="' + MTMenuFont + '">';
MTMOutputString += ' ' + item.text + ((MTMUA.browserType == "NN3" && !MTMLinkedSS) ? '</font>' : '') + '</a>' ;
MTMDoc.writeln(MTMOutputString + '</td></tr>');
function MTMEscapeQuotes(myString)
var newString = "";
var cur_pos = myString.indexOf("'");
var prev_pos = 0;
while (cur_pos != -1)
if(cur_pos == 0)
newString += "\\";
                    else if(myString.charAt(cur_pos-1) != "\\")
newString += myString.substring(prev_pos, cur_pos) + "\\";
                    else if(myString.charAt(cur_pos-1) == "\\")
newString += myString.substring(prev_pos, cur_pos);
prev_pos = cur_pos++;
cur_pos = myString.indexOf("'", cur_pos);
return(newString + myString.substring(prev_pos, myString.length));
function MTMTrackExpand(thisMenu)
var i, targetPath, targetLocation;
var foundNumber = false;
for(i = 0; i < thisMenu.items.length; i++)
if(thisMenu.items[i].url != "" && MTMTrackTarget(thisMenu.items[i].target))
targetLocation = parent.frames[thisMenu.items[i].target].location;
targetPath = targetLocation.pathname + targetLocation.search;
if(MTMUA.browserType == "IE4" && targetLocation.protocol == "file:")
var regExp = /\\/g;
targetPath = targetPath.replace(regExp, "\/");
if(targetPath.lastIndexOf(thisMenu.items[i].url) != -1 && (targetPath.lastIndexOf(thisMenu.items[i].url) + thisMenu.items[i].url.length) == targetPath.length)
return(thisMenu.items[i].number);
if(thisMenu.items[i].submenu)
foundNumber = MTMTrackExpand(thisMenu.items[i].submenu);
if(foundNumber)
if(!thisMenu.items[i].expanded)
thisMenu.items[i].expanded = true;
if(!MTMClickedItem)
                                                  MTMClickedItem = thisMenu.items[i].number;
MTMExpansion = true;
return(foundNumber);
return(foundNumber);
function MTMCloseSubs(thisMenu)
var i, j;
var foundMatch = false;
for(i = 0; i < thisMenu.items.length; i++)
if(thisMenu.items[i].submenu && thisMenu.items[i].expanded)
if(thisMenu.items[i].number == MTMClickedItem)
foundMatch = true;
for(j = 0; j < thisMenu.items[i].submenu.items.length; j++)
if(thisMenu.items[i].submenu.items[j].expanded)
thisMenu.items[i].submenu.items[j].expanded = false;
                              else
if(foundMatch)
thisMenu.items[i].expanded = false;
                                        else
foundMatch = MTMCloseSubs(thisMenu.items[i].submenu);
if(!foundMatch)
thisMenu.items[i].expanded = false;
return(foundMatch);
function MTMFetchIcon(testString)
var i;
for(i = 0; i < MTMIconList.items.length; i++)
if((MTMIconList.items[i].type == 'any') && (testString.indexOf(MTMIconList.items[i].match) != -1))
return(MTMIconList.items[i].file);
                    else if((MTMIconList.items[i].type == 'pre') && (testString.indexOf(MTMIconList.items[i].match) == 0))
return(MTMIconList.items[i].file);
                    else if((MTMIconList.items[i].type == 'post') && (testString.indexOf(MTMIconList.items[i].match) != -1))
if((testString.lastIndexOf(MTMIconList.items[i].match) + MTMIconList.items[i].match.length) == testString.length)
return(MTMIconList.items[i].file);
return("menu_link_default.gif");
function MTMGetYPos(myObj)
return(myObj.offsetTop + ((myObj.offsetParent) ? MTMGetYPos(myObj.offsetParent) : 0));
function MTMCheckURL(myURL)
var tempString = "";
if((myURL.indexOf("http://") == 0) || (myURL.indexOf("https://") == 0) || (myURL.indexOf("mailto:") == 0) || (myURL.indexOf("ftp://") == 0) || (myURL.indexOf("telnet:") == 0) || (myURL.indexOf("news:") == 0) || (myURL.indexOf("gopher:") == 0) || (myURL.indexOf("nntp:") == 0) || (myURL.indexOf("javascript:") == 0))
tempString += myURL;
          else
tempString += MTMUA.preHREF + myURL;
return(tempString);
function MTMakeLink(thisItem, voidURL, addName, addTitle, clickEvent, mouseOverEvent, mouseOutEvent)
var tempString = '<a href="' + (voidURL ? 'javascript:;' : MTMCheckURL(thisItem.url)) + ' ';
if(MTMUseToolTips && addTitle && thisItem.tooltip)
tempString += 'title="' + thisItem.tooltip + '" ';
if(addName)
tempString += 'name="sub' + thisItem.number + '" ';
if(clickEvent)
tempString += 'onclick="' + clickEvent + '" ';
if(mouseOverEvent && mouseOverEvent != "")
tempString += 'onmouseover="' + mouseOverEvent + '" ';
if(mouseOutEvent && mouseOutEvent != "")
tempString += 'onmouseout="' + mouseOutEvent + '" ';
if(thisItem.submenu && MTMClickedItem && thisItem.number == MTMClickedItem)
tempString += 'class="' + (thisItem.expanded ? "subexpanded" : "subclosed") + '" ';
          else if(MTMTrackedItem && thisItem.number == MTMTrackedItem)
tempString += 'class="tracked"';
if(thisItem.target != "")
tempString += 'target="' + thisItem.target + '" ';
return(tempString + '>');
function MTMakeImage(thisImage)
return('<img src="' + MTMUA.preHREF + MTMenuImageDirectory + thisImage + '" align="left" border="0" vspace="0" hspace="0" width="18" height="18">');
function MTMakeBackImage(thisImage)
var tempString = 'transparent url("' + ((MTMUA.preHREF == "") ? "" : MTMUA.preHREF);
tempString += MTMenuImageDirectory + thisImage + '")'
return(tempString);
function MTMakeA(thisType, thisText, thisColor)
var tempString = "";
tempString += 'a' + ((thisType == "pseudo") ? ':' : '.');
return(tempString + thisText + ' {\n\tcolor:' + thisColor + ';\n\tbackground:transparent;\n}\n');
function MTMTrackTarget(thisTarget)
if(thisTarget.charAt(0) == "_")
return false;
          else
for(i = 0; i < MTMFrameNames.length; i++)
if(thisTarget == MTMFrameNames[i])
return true;
return false;
function MTMFetchCookie()
var cookieString = getCookie(MTMCookieName);
if(cookieString == null)
          { // cookie wasn't found
setCookie(MTMCookieName, "Say-No-If-You-Use-Confirm-Cookies");
cookieString = getCookie(MTMCookieName);
MTMUA.cookieEnabled = (cookieString == null) ? false : true;
return;
MTMCookieString = cookieString;
MTMUA.cookieEnabled = true;
// These are from Netscape's Client-Side JavaScript Guide.
// setCookie() is altered to make it easier to set expiry.
function getCookie(Name)
var search = Name + "="
if (document.cookie.length > 0)
          { // if there are any cookies
offset = document.cookie.indexOf(search)
if (offset != -1)
                    {   // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset)
// set index of end of cookie value
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
function setCookie(name, value, daysExpire)
if(daysExpire)
var expires = new Date();
expires.setTime(expires.getTime() + 1000*60*60*24*daysExpire);
document.cookie = name + "=" + escape(value) + (daysExpire == null ? "" : (";expires=" + expires.toGMTString())) + ";path=/";

Similar Messages

  • Need help accessing the router web page.  I have been tol...

    Need help accessing the router web page.  I have been told my router is acting like a switch and the IP address is not in the proper range.  I have tried reseting the router (hold for 30 sec and unplug for 5 mins).  Didn't work.
    thanks

    What router are you using?  Almost all Linksys routers use 192.168.1.1 as the default local IP address, but there is at least one that uses 192.168.16.1 , namely the WTR54GS  (not the WRT54GS).
    You need to try again to reset the router to factory defaults.
    To reset your router to factory defaults, use the following procedure:
    1) Power down all computers, the router, and the modem, and unplug them from the wall.
    2) Disconnect all wires from the router.
    3) Power up the router and allow it to fully boot (1-2 minutes).
    4) Press and hold the reset button for 30 seconds, then release it, then let the router reset and reboot (2-3 minutes).
    5) Power down the router.
    6) Connect one computer by wire to port 1 on the router (NOT to the internet port).
    7) Power up the router and allow it to fully boot (1-2 minutes).
    8) Power up the computer (if the computer has a wireless card, make sure it is off).
    9) Try to ping the router. To do this, click the "Start" button > All Programs > Accessories > Command Prompt. A black DOS box will appear. Enter the following: "ping 192.168.1.1" (no quotes), and hit the Enter key. You will see 3 or 4 lines that start either with "Reply from ... " or "Request timed out." If you see "Reply from ...", your computer has found your router.
    10) Open your browser and point it to 192.168.1.1. This will take you to your router's login page. Leave the user name blank (note: a few Linksys routers have a default user name of "admin" (with no quotes)), and in the password field, enter "admin" (with no quotes). This will take you to your router setup page. Note the version number of your firmware (usually listed near upper right corner of screen). Exit your browser.
    If you get this far without problems, try the setup disk (or setup the router manually, if you prefer), and see if you can get your router setup and working.
    If you cannot get "Reply from ..." in step 9 above, your router is dead.
    If you get a reply in step 9, but cannot complete step 10, then either your router is dead or the firmware is corrupt. In this case, use the Linksys tftp.exe program to try to reload your router with the latest firmware. After reloading the firmware, repeat the above procedure starting with step 1.
    If you need additional help, please state your ISP, the make and model of your modem, your router's firmware version, and the results of steps 9 and 10. Also, if you get any error messages, copy them exactly and report back.
    Please let me know how things turn out for you.
    Message Edited by toomanydonuts on 01-21-2008 04:40 AM

  • Need help to access a web page using midlet to retrieve some informations

    Hi everyone i'm trying to access a web page using midlet to retrieve some informations in text format, the web page is [http://daviddurand.info/D228/?villes|http://daviddurand.info/D228/?villes] for my project.
    the problem is that i always get error 10049 in socket::open meaning no adresse could be found i tried IP adresse and still the same.
    i managed to recreate the same web page to test it on local and the surprise that it works fine but when accessing it online i have this error.
    i tried also to get the page i created on a webserver i own to try it saying that there might be security issues but the same error appears again. so help plz
    here is my code :
    package mobileapplication5;
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class GetMidlet extends MIDlet {
    private Display display;
    String url = "http://dayaati.com/villes/index.php?villes";
    public GetMidlet() {
    display = Display.getDisplay(this);
    public void startApp() {
    try {
    getBirthdayFromNameUsingGet(url);
    } catch (IOException e) {
    System.out.println("IOException " + e);
    e.printStackTrace();
    public void pauseApp() {   }
    public void destroyApp(boolean unconditional) {  }
    public void getBirthdayFromNameUsingGet(String url) throws IOException {
              HttpConnection httpConn = null;
              InputStream is = null;
              OutputStream os = null;
              try {
    httpConn = (HttpConnection)Connector.open(url);
    httpConn.setRequestProperty("User-Agent", "Profile/MIDP-2.1 Configuration/CLDC-1.1");
    httpConn.setRequestProperty("Content-Language", "en-US" );
    httpConn.setRequestProperty("Content-Type", "text/html; charset=iso-8859-1");
    httpConn.setRequestProperty( "Connection", "keep-alive" );
    httpConn.setRequestProperty("Content-Length","51200");
              getConnectionInformation(httpConn);
              int respCode = httpConn.getResponseCode();
              if (respCode == httpConn.HTTP_OK) {
                   StringBuffer sb = new StringBuffer();
                   os = httpConn.openOutputStream();
                   is = httpConn.openDataInputStream();
                   int chr;
                   while ((chr = is.read()) != -1)
                   sb.append((char) chr);
                   // Web Server just returns the birthday in mm/dd/yy format.
                   System.out.println(sb.toString());
              else {
                   System.out.println("Error in opening HTTP Connection. Error#" + respCode);
              } finally {
                   if(is!= null)
                   is.close();
                   if(os != null)
                        os.close();
              if(httpConn != null)
                        httpConn.close();
    void getConnectionInformation(HttpConnection hc) {
    System.out.println("Request Method for this connection is " + hc.getRequestMethod());
    System.out.println("URL in this connection is " + hc.getURL());
    System.out.println("Protocol for this connection is " + hc.getProtocol());
    System.out.println("This object is connected to " + hc.getHost() + " host");
    System.out.println("HTTP Port in use is " + hc.getPort());
    System.out.println("Query parameter in this request are " + hc.getQuery());
    **Heeeeeeelp Please**

    [http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/crashes.html]
    SIGSEGV (0xb)Most common cause of that is JNI code used directly or indirectly through a 3rd party library.
    64-Bit Server VM (11.2-b01 mixed mode linux-amd64)Conversely that VM gets less traffic than others so you might have hit a bug in it.

  • Help with using a web page from disk after saved from web

    Hi, I almost forgot the little I learned about web page development, so, I'm a total noob when it comes to this and I need your help.
    I saved as a complete web page on my hard disk this web page but when I open it in Firefox or IE, it doesn't display as much as I need it. I'm mostly interested  in displaying the logo images as they appear on the original web page. The browsers just show them briefly when refreshing but hide them right away. I can see the image files downloaded to my hard drive and if I open the page in Dreamweaver it displays these images  in the preview pane but I can't make them show in the browsers. From Dreamweaver I saved the page as in the folder where the images are and this also updated the code with the relative image links but the browsers still don't show them.
    I will greatly appreciate your help with this.

    I'm sorry, but your post is very confusing
    I saved as a complete web page on my hard disk this web page
    Does this include site definitions?
    when I open it in Firefox or IE, it doesn't display as much as I need it.
    I dont know what this means...are there images that are not being displayed?  Is there styling that is not being rendered?
    . I'm mostly interested  in displaying the logo images as they appear on the original web page. The browsers just show them briefly when refreshing but hide them right away.
    Again, I dont know what this means?
    I can see the image files downloaded to my hard drive and if I open the page in Dreamweaver it displays these images  in the preview pane but I can't make them show in the browsers. From Dreamweaver I saved the page as in the folder where the images are and this also updated the code with the relative image links but the browsers still don't show them.I will greatly appreciate your help with this.
    Do you have a link to the page, and perhaps some explanation that is more clear as to what your issue is.
    Gary

  • Need help with iPad 2 web page access requiring Adobe Flash Player

    New to apple have iPad 2 WiFi and need to access web pages that utilize adobe flash player what are my options since adobe and apple are not friends

    There are options in the app store, which may or may not work.  iSwifter and puffin are two you may try.......

  • Help with silly little web page pls

    I've made a little web page for som kids in my neighborhood.
    Problem: PNG-8 image, w/alpha transparency, shows up fine when I preview in my browser (Firefox 3.0.10).
    - however -
    Image shows 'white' where it is supposed to be transparent when I view the web site...
    The page is at:
    http://www.hoppernet.info/our_heroes/index.htm
    I plan to add some eye-candy if I can get the image(s) to display properly.
    Any ideas on how to fix the transparency?
    Dan h.

    In Fireworks you need to set the alpha transparency before you export the image.
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://twitter.com/nadiap
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/

  • HELP - URGENT ... deleted Page 0

    Hi,
    I've done something very stupid ... by a mistake I've deleted my page 0, there were some regions applied and also all my onDemandProcesses require this page.
    I've a backup of my database, does anybody know what tables must be recovered to have restored my page0.
    I'm using ApEx 2.2 and have already found that the page description must somewhere be saved in the FLOWS_020200.
    Please help, because my customers cannot access my application anymore.
    first found table WWV_FLOW_PAGE_PLUGS ...
    Thanks
    chrissy
    Message was edited by:
    chrissy

    Hi Scott,
    sorry for my late answer ... but I'm now very happy again ...
    while dashing through my files I found an old export file of my application in the trash of my email.
    I imported it to my workspace and then copied the page 0 to my application.
    It is now running as fine as before.
    Thanks for all your help and quick answers.
    chrissy

  • Re: Need help with open a web page

    Dear friend i cant open www.truperenlinea.com maybe you can support me because i install IE but other 5.2 version,
    i dont want install parallel and Windows, you can try to open for me and explain me.
    See the right side in the web need can see the username and password space to fill.
    Thank you so much
    Best regards

    Sorry, I got confused.
    You need to stick you your original post.
    Please don't post in someone elses thread, especially when the thread is completely in the wrong place to begin with and you post has nothing to do with the original post.

  • Help Urgent : Invoking SMS Web Services Using ABAP FM HTTP_POST

    Dear Gurus,
    Our client requirement is in such a way that ,
    They want to invoke web services for sending SMS through ABAP program.
    Please suggest the way .
    I am using FM HTTP_POST in order to call the URL for web service for SMS.
    My URL is as follows,
    'http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?&mobile_no=9987536748&message=HI' .
    and my code is as follows,
    ========================================================================
    report ztesturl.
    data : begin of t_request_body occurs 0 ,
            body(1025),
            end of t_request_body.
    data : begin of t_request_header occurs 0 ,
            body(1025),
            end of t_request_header.
    data : str(20) value '9987536748' ,int(20) value 'text',uri(460),
           status_code(100),
           status_text(100),
           len type i.
    data : begin of t_response_body occurs 0 ,
            body(1025),
            end of t_response_body.
    data : begin of t_response_header occurs 0 ,
            body(1025),
            end of t_response_header.
    uri = 'http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?mobile_no=9987536748&message=HI' .
    concatenate 'mobile_no=' str into t_request_body-body.
    append t_request_body.
    concatenate 'message=' int into t_request_body-body.
    append t_request_body.
    move: url to t_request_header-body.
    append t_request_header.
    call function 'HTTP_POST'
      exporting
        absolute_uri                = uri
        request_entity_body_length  = 300
        blankstocrlf              = 'X'
        proxy                       = 'IP Address:Port'                  ===> Same as Interner Tools -> Connection
        proxy_user               = EMAIL ID                            ===> Which i am using Userid for Internet
        proxy_password       = 'password123'
      importing
        status_code             = status_code
        status_text              = status_text
        response_entity_body_length = len
      tables
        request_entity_body         = t_request_body
        request_headers             = t_request_header
        response_entity_body        = t_response_body
        response_headers            = t_response_header.
    I am getting Following log in t_response_body
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2 3 5                                             
    ERROR                                             
    6                                             
    Cache Accesss
    7                                             
    8                                             
    9 While trying to retrieve the URL: 10 http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?
    11
    12 The following error was encountered:
    13                              
    14
    15 16 Cache Access Denied. 17 18
    19
    20 21
    Sorry, you are not currently allowed to request: 22
        http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?
    23 from this cache until you have authenticated yourself. 24
    25 26
    27 You need to use Netscape version 2.0 or greater, or Microsoft Internet 28 Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please 29 contact the cache administrator if you have 30 difficulties authenticating yourself or
    31 change your default password.
    32                    
    33
    34                                             
    35                                             
    36 Generated Thu, 26 Jun 2008 11:18:54 GMT by ProxyServer.VakolaProxy (Squid/2.4.STABLE7) 37                                                                                
    Thanks in advance.
    With Regards,
    Rajesh C

    slen = strlen( user ).
    call 'AB_RFC_X_SCRAMBLE_STRING'
      id 'SOURCE'      field user        id 'KEY'         field key
      id 'SCR'         field 'X'         id 'DESTINATION' field user
      id 'DSTLEN'      field slen.
    slen = strlen( password ).
    call 'AB_RFC_X_SCRAMBLE_STRING'
      id 'SOURCE'      field password    id 'KEY'         field key
      id 'SCR'         field 'X'         id 'DESTINATION' field password
      id 'DSTLEN'      field slen.

  • HELP CANT VIEW SOME WEB PAGES

    I  have a linksys wirless router and i can view most pages execpt a couple ebay and anothe. if i plug my cpu into the modem direct it works?    what can i do?

    Open the setup page of router with 192.168.1.1 and leave username blank , password - admin
    Under application and gaming tab -> goto port range triggering and
    trigger ports 443 - 447
    Also under basic setup  change the MTU to 1300

  • Web Page for LT18i ??

    Help!! I bought this sony LT18i and then accidently the web page got deleted on first day. Now I want to re-install the web page. I cant open any web page the sony companion is also useless as it doesn help in getting the web page back .How can I do it  or anybody can tell me how to reboot whole phone. What software to download..how?? the Shop from where I bought the Phone is unable to help .thnx

    what do you mean "web page"? are you refering to the browser? open the app drawer > look for the browser > press and hold until it vibrates then drag it to the homescreen
    Don't forget to mark the Correct Answers & Helpful Answers
    unrelated topic, if you have some time please check this thread
    http://talk.sonymobile.com/thread/44888
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • Web page composer -end user

    hello,
    i've created a site with the help of this blog:
    "Web Page Composer - a new Way to create and publish Web Pages in the Portal"
    Web Page Composer - Web Page Layout (Part IV)
    Web Page Composer - the XML Editor Framework (Part II)
    Web Page Composer – how easy it is to create and publish a web page (Part III)
    Web Page Composer - Web Page Layout (Part IV)
    i have published it, asigned the role to some users and the content is only seen by those who have super admin role to.
    pls help
    thx

    Hi there,
    i found the solution:
    the solution is to modify the permission on security zone in this way:
    go to System Administration -> Permissions ->Security Zones -> com.sap.nw.wpc -> wpc -> no_safety and open the permissions of this object to add Authenticated Users gruop with this option:
    Authenticated Users (Group)  : read
    Katayoun Mahpour

  • Printing web page content from android tablet

    When I attempt to eprint a web page, the web address line prints just fine (with a lower line that reads:"sent from Samsung tablet"), but none of the content, even though the print preview showed everything on the page that I needed. PLEASE HELP!   Is the web page content considered an attachment and if so, how do I get the attachment to print?
    This question was solved.
    View Solution.

    Hi TurboLady,
    Thank you for the update.  I appreciate it.  You read the document correctly.
    The best way to print the web content is to print the web page using the browser found in the HP ePrint app.  Please download and install the HP ePrint Mobile app from the Google Play store. For reference I’ve included the HP ePrint Mobile App FAQ document.
    Please let me know how that works for you.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Creating a web page

    i m beginer to java. i want help to create a web page having login tag and password tag and few menus. these menu must be activated after login

    sabre150 wrote:
    Some tutorials to get you started
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    That one is a bit outdated. Here's the most recent: [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Part II is what you need.
    Another tutorials/docs besides the Java and HTML ones I can recommend for webdevelopment are:
    HTTP spec: [http://www.w3.org/Protocols/rfc2616/rfc2616.html]
    CSS tutorial: [http://www.w3schools.com/css/]
    JS tutorial: [http://www.w3schools.com/JS/default.asp]

  • Safari 5.1 Slow Web Page Delivery

    I'm seeking some help with very slow web page delivery on my mid-2010 iMac i3 with 12 GB of memory. Here's the facts:
    Using Safai 5.1 with OSX Lion (7.1)
    Very slow web page performance whether I use my wireless network or an ethernet cable connection (with wireless disabled). Both are slow.
    A Windows computer in the same room, on the same wireless network, delivers pages briskly (with IE or Chrome). The problem does not seem to be related to the ISP (Comcast).
    FTP on the Mac is quick, problem seems to be isolated to HTTP.
    I upgraded from Snow Leopard a week or so ago but even with Snow Leopard the web page delivery was slow. Lion seems to be even slower.
    For example, "Toms Hardware" just took about 2 minutes to fully load.
    Very frequently, a web page will stall (blue progress bar doesn't move). Reloading with Command + R often helps but not always.
    I tried to Empty Cache without a better result.
    At this point, Safari is almost unusable because of the speed issue. Please advise with any suggestions. Thanks.

    I upgraded from Snow Leopard a week or so ago but even with Snow Leopard the web page delivery was slow. Lion seems to be even slower.
    How much free space on the startup disk?
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure you have a minimum of 15% free disk space.
    If disk space is not an issue, try Safari in another user account. Pages load slow there, log back into your admin account, launch Disk Utility. /Applications/Utilities
    Select MacintoshHD in the panel on the left then select the FirstAid tab.
    Click: Verify Disk (not Verify Disk Permissions)
    If the startup disk needs repairing, follow the instructions for Using Disk Utility to verify or repair disks

Maybe you are looking for