• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

anyone came across building database-powered applications on the Java platform

 
jasmine keh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i came across this article on build database-powered mobile applications on the java platform on this website http://www.javaworld.com/javaworld/jw-01-2002/jw-0118-midp_p.html
this website provide the source code n the way to compile it..
but i'm using the wireless toolkit to program this n i have no ideas to put those codes at which locations, eg which codes need to be place at the server sides..
if anyone have done it using the wireless toolkit, please let me know..
cos i really need the help asap..
pls leave me a msg if u done it before..
thanks..
 
payal agrawal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the URL below:


Connecting to databases like Mysql, SQL Server or Oracle on J2ME devices
http://www.java-tips.org/content/view/356/73/

In the example above, you need to put the compiled servlet class "getConnection" in tomcat servlet engine.
 
jasmine keh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by the way u know to put the getConnection at the tomcat?is it like C:\tomcat41\webapps\servlets-examples\WEB-INF\classes?
 
payal agrawal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create a new application and put in webapps directory of tomcat by creating web.xml file Or if it is just one Servlet you can put in existing application Servlets-examples of tomcat. The path you mentioned is right but you need to edit web.xml file of servlets-examples application.

<servlet>
<servlet-name>getConnection</servlet-name>
<servlet-class>getConnection</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>getConnection</servlet-name>
<url-pattern>/servlet/getConnection</url-pattern>
</servlet-mapping>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic