Udit Manektala

Ranch Hand
+ Follow
since Sep 17, 2006
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 Udit Manektala

So basically Im trying to play a MIDI Note on the Mouse onClick and it works fine in my eclipse workspace but but doesnt really work when i play it through the browser or the applet viewer.
Here's the code
14 years ago
So we have some Data in a Mainframe, that is in VSAM files. And we need to be able to import the data into a DB2 Database using Java. Any ideas ?

One that I was thinking about was converting the VSAM data to a flat file CSV and then going from there. Anyone know how to convert VSAM files to CSV ? Any other approaches?
14 years ago
Im using an IBM implementation of JSF and need to disable a command button after it is clicked so that the user can't click it again until the page is refreshed. Doing a this.disabled='disabled' in the onClick event doesnt work because once the button is disabled, the submit button wont submit anymore.

So we thought, we'd make the submit button a regular button and put some kind of form.submit in the onClick. So we made a clickLink JS fxn and a commandLink with the appropriate action which would be called by the clickLink fxn. the clickLink fxn would in turn be called on the onClick of the command button.

This idea being taken form this page:
Using Javascript with JSF

Now the problem is that in this example we're using the Tomahawk JSF commandlink.

<t:commandLink id="hiddenLink" forceId="true" action="register" >
<h:outputText value="tester" />
</t:commandLink>

But if I use the <h:commandLink from the ibm implementation that our architect insists on, it doesnt have the "forceId" property. Without that property being there, The button does get disabled but the form doesnt get submitted.

1. Is this is the most optimal approach to achieve what I want (Disable cmd button after one click, yet submit form)
2. Is it possible to use the regular implementation of commandLink instead of the Tomahawk one and still achieve the same objective?
14 years ago
JSF
I was trying out the Sample Hibernate Application
here
and it all worked fine until I ported the sample to Servlet form. I'm getting the following error when i try to initiate a data Save through Hibernate.
java.lang.ExceptionInInitializerError
util.HibernateUtil.<clinit>(Unknown Source)
events.EventManagerServlet.doGet(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

And in the Tomcat log it says
13:10:29,921 INFO Configuration:1403 - Configuration resource: /hibernate.cfg.xml
Excepotion thrown /hibernate.cfg.xml not found


which originates from


Now the Hibernate.cfg.xml is in the webapps\hibtest\WEB_INF\classes folder.
And I assume this in the runtime classpath of the application, then why does it still give this error?
So Im trying to optimize this Sybase SQL query to perform faster. I did a show plan and looked for all "Table Scans" in the Plan. One by one I eliminated them all by providing index hints in the SQL itself ((index xyz_idx1).

This eliminated all the Table Scans but the perfoemance is the same. Now all of them are forward scans.

So whats the difference between a forwad scan and a table scan ?
All I knew was that Table Scans were evil. I dont really know how to interpret the elements of a SQL plan. Is there any online resource or book available that can explaion the various elements of a SQL plan ?

And finally, if a forward scan is bad performace-wise, then how do I really fix it?... im already forcing it to use the available indexes.
One more try:

Development Area:

Project Root:
----src
------com
--------acme
-----------sales
-------------*.java
-------------servlet
---------------*.java
----ProjectName
-------*.htm
-------*.jsp
-------*.js
-------WEB-INF
-------META-INF
----classes
15 years ago

Development Area:

Project Root:
-src
-com
-acme
-sales
-*.java
-servlet
-*.java
-ProjectName
-*.htm
-*.jsp
-*.js
-WEB-INF
-META-INF
-classes

15 years ago
Im just starting to learn ANT and havent been able to figure out how to compile and move an antire directory structure full of code. Can anyone help me with this.

So this is the directory structure of our apps.

Development Area:

Project Root:
-src
-com
-acme
-sales
-*.java
-servlet
-*.java
-ProjectName
-*.htm
-*.jsp
-*.js
-WEB-INF
-META-INF
-classes




Now to deploy this to a web container, Im assuming i need to do the following steps.

1 Create the same folder\package structure under the classes older
2 Compile java classes under sales,servlet foldersto the corresponding folder under the classes subdir
3.Add the classes and {ProjectName} folder to a jar


Problem.
1. Is this the correct idea ?
2/ how to include multiple folders into a jar file since the *.* does not include folders.
3.How to compile java files across folders. Will this have to be broken into multiple tasks that look like:
a. mkdir the whole dir structure under classes folder
b. compile the java files under src\com\acme\sales into classes\com\acme\sales
c. compile the java files under src\com\acme\sales\servlet into classes\com\acme\sales\servlet
15 years ago
From HFSJ, Pg 699 Q5:

Which of the following is True:
option D: Filters support an initialization mechanism that includes an init() method that is guaranteed to be called before the filter is used to handle requests.

This is not checked in the Answers, so according to the book, this is False. But I cant understand why. It makes perfect sense to me (except that the option doesnt specify that init() takes a FilterConfig object as a pramater)

Any idea what im missing ?
Can anyone recommend a certification\books\website\resource for database design? For creating a DB table structure out of a given set of business requirements ?
<rambling thoughts>

We use JBuilder\EAServer at my workplace and sinc I hate JBuilder, I wanna switch to Eclipse but can't find an apropriate plugin which would allow deployment to EAServer. (Lomboz has never worked for me.)

So thinking to myself, I realise that all thats needed for a Java IDE to connect with an App Server is some way to deploy the application and some way to start\stop\restart the service.

I realised that if I used Eclipse for development, I could make custom ANT scripts for deploying to EAServer and the start\restart of the service could be accomplished by small command line batch files (using net stop and net start).

So one drawback to this would be that I'd have to make a different ANT file for every project and another is that there might be no shortcut inside Eclipse to run the Server restarts\builds from.

</rambling thoughts>


1. So, is that all there is to connecting an IDE to an app server ?..automatic deployment configuration and shortcuts for server restarts ? Or am I missing something deeper ?

2. Can shortcuts for batch files\command files\command line directives be added to eclipse ?

3. Can ANT do all this that i just rambled about ?

Background Info: We use Servlets\JSP here... no EJBs anymore. Dont know if that makes a difference.

Thanks
1.Are there any\ do you know of any Freeware\FOSS GWT Designers which enable developers to create U/I's using a drag-drop from a VB like IDE ?

I know about Instantiations GWT Designer but that is a commercial software and I know Googlipse which has Exlipse Integration for projects but not a visual U/I designer.

2. How easy is it to integrate external js libraries like Scriptaculous\Prototype\In-house,home-grown js file within a GWT app. Can it create any conflicts ?
The reason I ask is that over time,as we get more experienced with JS, its easier to figure out how to do something in JS rather than think in Java. I hope its easy to integrate GWT generated JS and developer generated JS.

3. If existing enterprise apps using GWT switch to using .NET, is there a possible upgrade path to switch an app using GWT components\widgets over to .NET ?
15 years ago
GWT
Is there a tool\ utility\website that I cna use to pass a JS file\JS Code Snippet and it detects all the browser dependant code ?

How do most programmers go about converting browser dependant JS code into browser independent code? I have a JS file i made a while back which only runs on IE and i wanna make it browser independent. Im planning on using ProtoType.JS. Is there any way to identify all the lines of code that need changing so then I can find the equivalent prototype.js fxns to replace them.
Or do I just have to go by line by line in debug mode ?
Im making a javascript barchart and having the user pass in a DIV element to the BarChart object which in turn fills that DIV with the table data.

When I set


(objContainer is the DIV element the user passed in )

What i get when i do a alert(objContainer.innerHTML) is:



Where did the THEAD, TBODY etc. come from ? Why is the javascript parser changing the HTML I assign to it ?
This discrepancey between the browser's port and the server's port is exactly what confuses me. I mean, what is the browser doing on port 2432, listening or sending to ? If its listening, then exactly what is it listening to ?
15 years ago