Use of WML
Hi All of u,
I have a query- Can we use WML for accessing the database in the same way as use servlets for returning queries response to the mobile emulator. How WML connects to database? What's the best book that can help a J2ME developer who wants to use WML ?
Thanks!!
Cheers!!
Nitin
WML is a markup language.
A browser that can display WML could be used to access content that is delivered by a database, but that's not quite the same thing as saying that you're using WML to connect to a database.
I suppose it should be pretty straightforward to write a servlet that responds to requests by accessing a database, and then formatting the results page in WML.
Is that what you're asking?
Similar Messages
-
Handling events in BSP application using WML tag Extensions
Hello Everyone ,
We are developing a BSP applications for Mobile handheld using WML tag library. I am looking for some code samples to know how we can handle evevents inside the BSP using the WML tag library.
Can any one of you plesae help us by placing a code snippet for handling onInputprocessing() methods (BSP Using WML Tag extensions).
I mean to ask how we can handle events inside the BSP applications that uses the WML tag library.
I know about how to handle BSP events using HTMLB and XHTMLB tags frameworks.
Thanks for your help in advance.
Thanks,
GreetsonIs this WML tag library something that is supplied by SAP u2013 as a BSP Extension Element? Or are you just using WML tags directly in your layout? I can tell you in general that if you want to generate HTMLB events from regular HTML code you can generate the JavaScript calls using the htmlbEvent tag of the BSP extension library. However your tags have to be running within an HTMLB Content tag for this to work.
If you want to work totally without HTMLB then you need to use the simple HTTP Post but format the input name as OnInputProcessing(<function code>) like this:
<input type="submit" name="OnInputProcessing(ok)" value="OK">
This will cause the OnInputProcessing event handler to trigger without needing any HTMLB tags (this is how it was done in WebAS 6.10 before we BSP Extensions). -
I just wanna know that what is the effective java technique that can be used for WAP especially WML.....
How ll be struts, if used with WML for server side processing..........
What are the best alternatives?
how popular is struts-wml tag lib?
Edited by: Hammad.Ayaz on 28-Mar-2008 13:06One thread is enough - http://forum.java.sun.com/thread.jspa?threadID=5279886
-
Calling wml script function in jsp?
how can i write/call wml sciprt function(for doing client side validations) in a jsp?
becoz we are using wml code in jsps, but we are not using any wml script functions for client side validations.
please help me ...What do you mean by "wml".. Java server pages are a server side technology. They do not execute on the client.
-
Hi all,
We are developing a J2ME application to download and Play ringtones from a server. We need to integrate this with a WAP browser application. Our client has a WAP site used to browse for different kind of tones. But, they don't have any option to download and preview the tone. We have a J2ME Midlet which can do that. So, How can we embed this Midlet in the wml file ( like embedding an applet in HTML file) . I understood that we can install the Midlet by giving links to the .jad file from wml file. Once it is installed how do I invoke that MIDlet for different events in the WML file.
Thanks
IbrahimHi ,
No answers to this good question :-) . I got an answer which says it is NOT possible to invoke MIDlet application from a WML code . All we can do is download the .jad file using a WML page . JAM ( Java Application Manager) will install the app using the information in the downloaded .jad file .
If this is true , What does this following Paragraph, extracted from one of the papers of Mr.Bill day, (Technical Evangelist from SUN) mean
" In a sense, then, Java technology is very good at many of the things in which WAP is
lacking: Java techology and WAP are complementary technologies.
One option for using the two together is to have a WAP browser in the phone, and to
have a VM that implements the CLDC and MIDP specifications. This virtual machine
might be the KVM, or it might be another VM, so long as it is compliant with the J2ME
CLDC and MIDP specifications. The WAP browser and the J2ME environment could
then call each other via an API between the two. When the JAM wants to run a Java
application, it has the WAP browser do the download via its standard mechanisms,
and then the JAM manages the installation of the Java application and its execution
by the JVM. If the JVM wants to put some text up in the device screen, it tells the
browser that, "This is what I'd like you to display" via the standard callback
mechanism.
Hopefully, what we will see in the longer term are WAP and other micro browsers
written in the Java programming language themselves. (In fact, there are several
Java technology based WAP micro browsers available already; refer to the J2ME
Archive for examples.) In most of the non-Java technology browsers in phones now,
if you want a new version or a new feature you have to buy a new phone. A micro
browser based on Java technology could give you extra flexibility in that you could
update your WAP browser itself, on-the-fly, ieven over the air. You could keep the
same phone and download browser updates as they become available. This would
benefit consumers by keeping their handset costs down and benefit operators by
allowing them to add new features to their service more easily and quickly. ".
Can any one explain what he was trying to say, if calling Midlet application from WML is NOT possible. -
SQL query with Java Server Pages
Hey,
I'm trying to read some information from database with SQL Query. How I can put the parameter that I get from previous *.jsp page to SQL query?
Technologies that I use are WML, JSP and MySQL.
I can get the parameter by method getParameter() and it is correct.
But how to but the requested parameter into sql query and complete the sql query?
Should I read it to some variable before putting it to sql query?
*/ this works fine */
out.println("<p>periodi"+request.getParameter("periodi"+"loppu</p>");
/* this doesn't work */
ResultSet tulokset = lause.executeQuery("select * from kurssi where periodi='+request.getParameter("periodi")+'");
/* this doesn't work */
String periodi=request.getParameter("periodi");
ResultSet tulokset = lause.executeQuery("select * from kurssi where periodi='periodi' '");
Thanks,
RampeHey,
I'm trying to read some information from database
se with SQL Query. How I can put the parameter that I
get from previous *.jsp page to SQL query?
Technologies that I use are WML, JSP and MySQL.
I can get the parameter by method getParameter()
() and it is correct.
But how to but the requested parameter into sql
ql query and complete the sql query?
Should I read it to some variable before putting it
it to sql query?
*/ this works fine */
out.println("<p>periodi"+request.getParameter("periodi"
"loppu</p>");
/* this doesn't work */
ResultSet tulokset = lause.executeQuery("select * from
kurssi where
periodi='+request.getParameter("periodi")+'");
/* this doesn't work */
String periodi=request.getParameter("periodi");
ResultSet tulokset = lause.executeQuery("select *
* from kurssi where periodi='periodi' '");
Thanks,
RampeTry this
ResultSet tulokset = lause.executeQuery("select * from kurssi where periodi=" + "'" +request.getParameter("periodi")+"' " );this should work -
Publishing maps to mobile devices
hi all..
using Oracle MapViewer i developed a JSP page to display a map but i now want to create a similar page to be displayed onto a mobile device simulator (such as Nokia Mobile Internet Toolkit and WAP Gateway and Browser Simulator) probably using a WML file.. How do i get the map to be published onto a WML page. Please offer assistance on this topic or suggestions of what else can be done..
thanks..
AvinashYour best bet these days (when it comes to web-enabled mobile applications) would be to take a look at the Oracle ADF framework for mobile applications. There is some good info. here: http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3?topic=mbl_adevelopapps_html
...as well as a tutorial here: http://www.oracle.com/technology/obe/obe1013jdev/pda/eim_pda_final.htm
I hope this helps.
-Justin -
hello everyone,
I wanted to test OTA on j2me wtk2.0
I placed my .jad and .jar file at one location in tomcat server running on the localhost.
I added the corresponding MIME types also.
When i tried OTA from the tool provided, it did not work :(
Any ideas or solutions???
Please reply,
Thanks.In addition to the jad and jar file, you will need a html or wml file. The html/wml will point to the jad file.You will need to access the html/wml file using the emulator (or real device).
For example, say the midlet is called 'game' and is located in http://url/download.
You must add a html file (let's call it index.html) with the following content:
<html>
<title>Download</title>
<body>
Game
</body>
</html>
At this stage the location http://url/download should have three files,namely:
game.jad
game.jar
index.html
Now after all these, use your emulator and go to http://url/download/main.html.
You will be presented with the 'game' link. Select it and the midlet will be downloaded.
Of course, you can use the wml for the same purpose.
HTH :) -
JavaServer Faces and Portal Servers
Hi all,
Do you think JavaServer Faces will have substantial applications in developing the user interface for a portal server? To me, it seems like the whole portal page with the tabbed panes and other gadgets could be one large JavaServer Faces component, composed of many smaller JavaServer Faces components. The user interface for a portlet for instance would be a smaller component that is a part of the larger portal page component. Does this make sense to you?
Your ideas are appreciated.
Thanks,
MeteHello Craig,
Thanks very much for your reply. I think this topic is an exciting one: Making portal servers and portlets integrate well with JavaServer Faces.
You said that JavaServer Faces will make it easy for portal servers to contain portlets that have JavaServer Faces components in their GUI, but understandably this does not mean that portlets will be required to have a GUI that is made out of JavaServer Faces. The portal server should be tolerant to any kind of GUI that a portlet may be using. So, how would a portal server that has its portal layout built completely with JavaServer Faces work well with portlets that do not have a JavaServer Faces GUI? Would JavaServer Faces make it easy to to embed GUI markup from non-Faces portlets into a portal page that is generated by a master JavaServer Faces component that encapsulates the whole portal page layout?
How could a scenario like this be handled:
The user device is a handheld device, so the master portal page JavaServer Faces component decides to use a WML renderer for generating the portal page instead of an HTML renderer. All of the JavaServer Faces enabled portlets are generated using the WML renderer, but the portlets that do not have a JavaServer Faces GUI cannot be rendered in WML. What should the master portal page JavaServer Faces component do in this case?
Thanks,
Mete -
Synchronizing AiR SQL Lite with Server MySQL
Hi Folks,
I have a need to keep my AiR application's local data (in SQL Lite) in sync with my Server side data (in MySQL).
If possible (please tell me if it is or not) I was thinking of building on the server a copy of an SQL Lite database that would contain all of the CRUD records for the previous hour (for an hourly sync scheme) that was also encrypted and then each client AiR app would simply download that SQL Lite db and merge it into the local master. I am thinking of this because I have found online storage that does not charge for bandwidth.
However, are there better schemes?
Is there perhaps an encryptable transaction log file that can be downloaded and applied to the desktop SQL Lite db?
How would you do such a synchronization?
Can XML files be encrypted on the server then decrypted by AiR on the client, reasonably safely?
Also, even for encrypting the local AiR SQL Lite db, how does one hide the encryption key or rather, where can I read up on this whole issue?
Thanks,
VCHey,
I'm trying to read some information from database
se with SQL Query. How I can put the parameter that I
get from previous *.jsp page to SQL query?
Technologies that I use are WML, JSP and MySQL.
I can get the parameter by method getParameter()
() and it is correct.
But how to but the requested parameter into sql
ql query and complete the sql query?
Should I read it to some variable before putting it
it to sql query?
*/ this works fine */
out.println("<p>periodi"+request.getParameter("periodi"
"loppu</p>");
/* this doesn't work */
ResultSet tulokset = lause.executeQuery("select * from
kurssi where
periodi='+request.getParameter("periodi")+'");
/* this doesn't work */
String periodi=request.getParameter("periodi");
ResultSet tulokset = lause.executeQuery("select *
* from kurssi where periodi='periodi' '");
Thanks,
RampeTry this
ResultSet tulokset = lause.executeQuery("select * from kurssi where periodi=" + "'" +request.getParameter("periodi")+"' " );this should work -
Converting XML in WML using XSL Processor from XMLParser v2
When trying to concert an XML doc into WML, it seems like the XSL Processor is removing some WML tags. Below are the XML doc and XSL doc I am using :
The XML DOC
<?xml version="1.0"?>
<ROWSET>
<ROW id="1">
<NAME>RestaurantName</NAME>
<ADDRESS>RestaurantAddress</ADDRESS>
<PHONE_TYPE>Fixed</PHONE_TYPE>
<PHONE>0112345678</PHONE>
<PRICE>60</PRICE>
<MENU>Salad, Pizza</MENU>
<DESCRIPTION>Very good restaurant</DESCRIPTION>
</ROW>
<ROW id="2">
<NAME>SecondRestaurantName</NAME>
<ADDRESS>SecondRestaurantAddress</ADDRESS>
<PHONE_TYPE>Fixed</PHONE_TYPE>
<PHONE>0187654321</PHONE>
<PRICE>60</PRICE>
<MENU>Salad, Fish</MENU>
<DESCRIPTION>Godd restaurant</DESCRIPTION>
</ROW>
</ROWSET>
The XSL DOC
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<WML>
<CARD>
<xsl:apply-templates/>
</CARD>
</WML>
</xsl:template>
<xsl:template match="ROWSET">
<xsl:for-each select="ROW">
<xsl:value-of select="NAME"/>
<xsl:value-of select="ADDRESS"/>
Phone : <xsl:value-of select="PHONE"/>
Price of the menu : <xsl:value-of select="PRICE"/>
You can order : <xsl:value-of select="MENU"/>
<xsl:value-of select="DESCRIPTION"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
The
tag are removed by the XSL Processor ; In fact it seems that any tag contained within <xsl:template match="ROWSET"> and </template> is removed. This does not occurs with other XSL processor (such as lotusxsl).
Is there something I'm doing wrong ??Your examples works correctly for me using the XSLT engine that comes with release 2.0.2.6 of the Oracle XML Parser "v2" for Java.
Are you working with this latest release? -
Using XML Components to generate WML Output
Hello
Is there a way to configure the XSL stylesheet in a Portal XML Component so that if the compoment is being called from the Portal Page it shows HTML Output and if it's being called by a WAP Phone it generates WML?For the purpose you mentioned, you shouldn't use XML component. Rather you should user mobile XML portlet. Basically, if you want to display content in WAP phones, you can use mobileXML portlet available under portal tools in Portlet repository. The XML content which you provide in mobile xml portlet, needs to follow the iAS wireless edition DTD. Then you can put this portlet on a page. Now if the page is accessed from HTML browser, it will transform this content and if it is accessed from WAP phone, it will convert the XML content to WML.
Hoep it helps.
Thanks,
Ved -
Hi
I am stuck with xsl for wml.I cannot get to see my wml page in any mobile emulator.However I was able to see it in some WAP browsers like winwap etc..
What could be wrong with xsl?I am actually generating wml from xml and xsl passed on to the transformer class in servlet .This works fine for wap browser like winwap but not for any emulators like erricsson,nokia etc..
Please help
ThanksActually I am setting header (i.e PUBLIC //WAPFORUM etc)from servlet hence not mentioned here in XSL file.
In servlet:
static void getWmlHeader(java.io.PrintWriter out)
{ out.println("<?xml version=\"1.0\"?>");
out.println("<!DOCTYPE wml " +
"PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"");
out.println ("\"http://www.wapforum.org/DTD/wml_1.1.xml\">");
XSL File:
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="customer_Id" select="customerInfo/customer/CUSTOMER_ID"/>
<xsl:variable name="product" select="customerInfo/customer/PRODUCT"/>
<wml>
<card id="S3" title="Product Page">
<p align="center">
*<b>Login Successful</b>*
customer Name :<b><xsl:value-of select="customerInfo/customer/CUSTOMER_NAME"/></b>
customer Id :<b><xsl:value-of select="customerInfo/customer/CUSTOMER_ID"/></b>
Item :<b><xsl:value-of select="customerInfo/customer/PRODUCT_ITEM"/></b>
Proceed to register
<a href="/ProductIndex/ItemList?cid={$customer_Id&product={$product">Select Items</a><br/>
<a href="/ProductIndex/Index">HomePage</a><br/>
</p>
</card>
</wml>
</xsl:template>
</xsl:stylesheet>
Thanks
Ash -
Close Blackberry Browser using WML
I have deveIoped a purchase requistion approval app for blackberry users, using NW04s sp13. After the approval is saved I am trying to close the browser programatically. I have tried using both of these:
wdThis.wdGetRAComponentBBInterfaceViewController().wdFirePlugOut_plugExit("http://CloseBB.html");
WDClientUser.forceLogoffClientUser("http://CloseBB.html");
but neither closes the browser on the blackberry it closes fine in IE. Any help would be greatly appreciated.Joe,
You can try these things :
1. Instead of navigating to your page call google. Put logoff-URL as http://www.google.com. Doing this you will ensure that redirection is working fine.
2. If above thing works then try giving the complete URL of your html page. i.e : http://server.com......
Also post the code of closeBB.html here. There may be some javscript event you might have which is probably not supported by Blackberry Browser.
Chintan -
SQL query with JSP and WML-parameters
Hey,
Could you help me?
I'm trying to do the following. WML deck card 1 send parameter to same WML deck's card help. I try to read the parameter with JSP in card help by putting the parameter to SQL query, but it doesn't work. I can read the parameter with WML in card help. I can also print the value of the parameter with JSP if I generate WML with JSP.
/*parameter sending from card 1 to card help*/
out.println("<go href='#helpcard'>");
out.println("<setvar name='valittukurssi' value='$(valittukurssi)'/>");
/*parameter read with WML in card help */
<p>Valitse kurssi.
$valittukurssi</p>
/'parameter read with JSP by generating WML with JSP*/
out.println("<p>$valittukurssi</p>");
/* SQL query with JSP */
ResultSet uudettulokset = uusilause.executeQuery("select * from kurssi where lyhenne='$valittukurssi'");
Thanks,
RampeYou're problem is easy to fix. You're confusing WML variables with JSP variables. See below:
>
/*parameter sending from card 1 to card help*/
out.println("<go href='#helpcard'>");
out.println("<setvar name='valittukurssi'
value='$(valittukurssi)'/>");
Above you set a var that will work on the phone, not in JSP.
/*parameter read with WML in card help */
<p>Valitse kurssi.
$valittukurssi</p>
Yes the above does display the parameter, because it is a client side WML var, but you cannot use this variable in the JSP code (that's why your SWL fails).
/'parameter read with JSP by generating WML with
JSP*/
out.println("<p>$valittukurssi</p>");Here's you're problem, the above line is EXACTLY the same as the one before it. When the container parses through this JSP code it translates the above line to:
<p>$valittukurssi</p> on the WML page and the CLIENT uses it's local variable to display it.
What you need and want is to have a variable that can be used in JSP code and output to your WML page. Here's how it's done:
out.println("<go href='#helpcard'>");
String some_name = "valittukurssi";
out.println("<setvar name='"+some_name+"'
value='$("+some_name+")'/>");
//note that you may have to escape the ( and ) with a \
//so we displayed the variable above into the WML page, now we can use it in the SQL query:
/* SQL query with JSP */
ResultSet uudettulokset =
uusilause.executeQuery("select * from kurssi where
lyhenne='"+some_name+"'");//the end of the command is: " ' " ) ;
Frank Krul
Got Node?
Maybe you are looking for
-
Can i use my creative cloud membership on laptop and desktop? Or is one membership needed for each device?
-
IPhone contacts won't sync with Outlook
I am trying to sync my iPhone contacts with my Outlook contacts but they won't sync. In iTunes I checked "Sync Contacts with Outlook" but nothing happens.
-
OS Windows 7 Home Edition. Firefox Version 3,6,16 New tab does not open when clicking on tab on right of tab bar or New Tab in file menu. Have other users experienced this and what is the solution to this problem?
-
I am working on a pretty straight-forward motion graphic, that requires lines to extend in various directions via animation. I made one attempt, but feel like my way of doing this – making a small square, then motion tweening it to extend can not be
-
Hi, I am facing few problem with coherence filters . My code looks like, ValueExtractor extractor = new ReflectionExtractor("getMethod"); Set<Map.Entry<String, ValueObject>> entries = cache.entrySet(new LikeFilter(extractor, datakey+"%