Feb 03

Sub domain

  • Lets say your domain is mysite.com.
  • You install a Message Board and put in in a directory called mysite.com/board/.
  • You can turn the directory board into a sub-domain by adding it as a sub-domain from your Control Panel.
  • Now you can access your Message board as either mysite.com/board OR board.mysite.com
  • This costs you nothing and is free.

Parked Domain

  • You have two domains mysite.com and my-other-site.com.
  • mysite.com is the domain of your website and you want to add my-other-site.com.
  • You want them both to go to the same place. In other words, when someone types either www.mysite.com or www.my-other-site.com they will go to the same page(s) on your website.
  • In order to have additional parked domains you need to purchase the additional domain(s).

Add-On Domains

  • You have two domains mysite.com and my-other-site.com.
  • You want the two domains to be totally separate/independent websites.
  • In order to have additional parked domains you need to purchase the additional domain(s).

source : http://webnet77.com

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • description
  • Furl
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis

Feb 03

We know that Open Document Format or simply ODF is a widely used XML based document representation format to which Sun is the key contributor. OpenOffice, KOffice and a lot other office suites stores its documents in any one of the following OpenDocument formats by default

  • odt for word processing (text) documents
  • ods for spreadsheets
  • odp for presentations
  • odg for graphics
  • odf for formula, mathematical equations

Though, these suites support the proprietory and popular .doc, .xls, .ppt formats, Microsoft had, for a long time gave a deaf ear to what happened on the “other” side. It never even cared to support these formats for a long time.

But after a biiiiiiigggggggggggggg annoucement by the State of Massachusetts that “we cannot have our public documents locked up in some kind of proprietary format, perhaps unreadable in the future, or subject to a proprietary system license that restricts access”, Microsoft started financing the ODF plugin for Word last year (under BSD license, of course). A lot of third parties, even before Microsoft, announced that they are developing plugins for ODF in Office course). A lot of third parties, even before Microsoft, announced that they are developing plugins for ODF in Office environment.

All this happened last year. So, why this blog now? The popular open document format has just been approved as an ISO standard. And the Open Document Foundation Inc has annouced complete development of ODF plugins for Office suite. With it, every 32-bit Windows user can use ODF. They are planning to distribute the plugin bundled with the Google Pack. Oops !!! (Google always gives me that heart attack).

Now that we see a huge migration of windows users to Linux flavours, this plugin surely gives an extended life to MS Office. But then this should really have given Gates a taste of his bitter future.

Edwards, co-founder and president of Open Document Foundation Inc, says that he’s now waiting for theĀ  “Microsoft ODF plugin to show up. Microsoft has said that if the demand is out there, they will produce it. If Bill Gates holds up a finger to judge the wind for ODF demand today, he’ll get his arm ripped off.” :-)

 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • description
  • Furl
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis

Tags: , ,

Feb 03

We already know that ResultSet gets closed once we close our Statement object. So, prior Java 5.0 we were just “migrating” the ResultSet values to a Collection of Value objects.. But, bundled with Java 5.0, the “disconnected” RowSet came up. Although there is a rowset.jar that could be used with Java 1.4, most people still follow the conventional “migration” process.We know that there are three kinds of RowSet implementations, the CachedRowSet (one which stores the data in memory. best suitable for less quantity of data), the JDBC Rowset (I really havent used it yet. They say ResultSet could be used as a Java bean.) and my personal favourite, the WebRowSet.

WebRowSet typically fetches your ResultSet in an XML format. You could just use a plain Javascript DOM parser or an XPath language and just show the data on your HTML page.

I just wrote this small program so you could feel what i felt.

So, I have my getConnection() method to link my app to the database.

public Connection getConnection() throws ClassNotFoundException, SQLException {
Class.forName(”com.mysql.jdbc.Driver”);

Connection con = DriverManager.getConnection( “jdbc:mysql://localhost:3306/ukc”, “root”, “orange”);

if (!con.isClosed())
System.out.println(”Connection created”); return con;
}

Then i am just using the connection to fetch some data

public WebRowSet getWebRowSet(Connection conn) throws SQLException {
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery(”select * from Products”);
WebRowSetImpl webRowSet = new WebRowSetImpl();
webRowSet.populate(rs);

return webRowSet;
}

And finally a main program to link these two methods and write the XML to the Console

public static void main(String[] args) {

WebRowSetSample rowSetSample = new WebRowSetSample();

try {
Connection conn = rowSetSample.getConnection();
WebRowSet rowSet = rowSetSample.getWebRowSet(conn);
//I am writing output to Console. Just pass an OutputStream to the writeXml method
rowSet.writeXml(System.out);

} catch (Exception e) {
e.printStackTrace();
}

}

tabledata

output

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • description
  • Furl
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis

Tags: ,

Feb 03

errorconsole


You know very well that Mozilla Firefox is a much much better browser than the IE. But one thing i missed during development testing with Firefox is the debugging of Javascript error messages. IE would just pop us a very useful ‘Object expected’ message. ;-)
Ignorance had the best in us. Actually, Mozilla gives a wonderful Javascript AND CSS console to play with. To view the console Click TOOLS — > Error Console.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • description
  • Furl
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis

Tags: ,

Feb 03

Recently, I was trying to integrate Struts with Hibernate 3.2 under Weblogic. And i had this big pestering exception…

javax.servlet.ServletException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.g2h.biz.vo.Category category]
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:909)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:873)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:812)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3226)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:694)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
at weblogic.Server.main(Server.java:32)

The reason for this problem is this. Both Weblogic and Hibernate was using “antrl.jar”. Weblogic 8.1, that i was using, had an “antlr” jar bundled inside its weblogic.jar. Since server libraries had preference over the jars in our application, hibernate wasnt using the latest antlr jar in my web application’s lib folder.

Solution that i used :

Put the following lines in your “.cfg.xml” inside your session-factory tag

classicquery
There is a biggggg discussion in the hibernate forum on this issue. It also had another solution for weblogic. To add the following tag inside weblogic.xml

weblogic.xml

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • description
  • Furl
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis

Tags: ,