deepak kukreja

Ranch Hand
+ Follow
since Aug 13, 2001
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by deepak kukreja

Hi,

I dont think this is javascript question.

my jsp has a hyperlink to generate a pdf report .Response is commited through outputstream from the servlet. Once the Outputstream is commited from servlet, I want to refresh the jsp page which had the hyperlink to generate a PDF. i want control back on jsp even though response was commited through outputstream. any workaround would be appreciated.

thanks,
Deepak
9 years ago
Hi,

I have a hyperlink on a jsp page which generates a report in PDF format. When user selects large amount of data and clicks on this link it takes lot of time for the
report generation (this is fine). Issue is: If user selects large amount of data and clicks multiple times on this hyperlink, multiple threads started on the application server (WAS 6) and the site performance goes down.

The flow is --> User clicks on a hyperlink on a JSP , Request goes to a servlet which generates the PDF report and provides the PDf back to the user.

Now one way to control multiple submit could be that I disable the hyperlink on the click but I do not know how to enable it back as the response would be already
commited through the PDF report that was given back to the user(OutputStream).Can somebody please help me on this by giving some suggestions/best
practices/examples? any help would be appreciated.

Thanks,
Deepak
9 years ago
Do you mean I need to create XML representation in the web service for all these objects and return it to the client as a String? Will appreciate if you can point me to any sample code if available.

Thanks
9 years ago
Hi - I want my web service to have methods which return Custom objects e.g. Employee, Project etc objects. I am using Axis2 with the ADB data binding. I used wsdl2java to create the stubs and call the stub method from the client program.

WSDL has the following type for Employee

<xs:element minOccurs="0" name="return" nillable="true" type="ax22:Employee"/>

Now when I try to invoke a method from the client progrom, I get the following exception:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Any type element type has not been given

Can you suggest the changes required on client/server side?

Thanks.
9 years ago
Hi,

I want to use Ant in the development of my application
Could somebody tell me what are thr pre-requisites and what configurations I need to do once I start using it?

Thanks,
Deepak
13 years ago
Hi, I want to read data from some table and maintain it in a data structure.
Table o/p is like:

Id Parent Id
-- ---------
1 0
2 0
3 2
4 3
5 2
6 0
7 6
8 6
Here parent id 0 means that node is a parent node.
I want to know the way that I can use to maintain this data in a data structure(HashMap,ArrayList etc.) so that I can read it in my jsp.
As an example data structure should say: for Id number 6 -> 7 and 8 are the children.

thanks.
13 years ago
Hi,

I am making a dynamic(database based) java script menu.
Can any body tell me any scripts available which take the required data as Input (parent-child data from tables) and creates a multilevel menu.

Pls let me know of any suggestions/resources for that.

Thanks
Hi

I have a jsp page. Page contains few html controls like text boxes.
It has a link whose href calls "submitRequest()", which should be activated when user clicks on it, or user presses the enter key. So I am catching the Enter key press in function "enter()" and calling function "submitRequest()" from "enter()" for validations. This function( submitRequest()) performs some validations on the text boxes and other controls on the page and show proper alerts if something is not valid.

To implement it I have applied the onkeydown event on the form instead of doing it on individual controls as I also have to catch the key press events for other combinations on the page say Alt+k, anytime on the page. Everything runs ok. But when the focus is on the link and I presses on Enter, first the enter() function gets called, which in turn call submitRequest() and show approprite alert if to be shown. After that the links href calls the same function and shows the same alert for the second time.

How could i prevent this function/alerts for the second time?

Thanks
Hi,

I have a table, which is to be made sortable. When the user clicks on first column header it should sort on the first column i.e. Order by first column
, and then under the first column data, order the data in second column......and so on. User can click on any of the columns so the order by will also change accordingly.

as an example.

if the columns available are:

Project name, Employee name.

If there are two projects which starts from letter 'k', then after sorting on projects column, it should sort on employee name column for those two projects.

Is it possible to do this with javascript.
Could somebody provide me with good links?
Could somebody pls tell me the answers to these question?
What happens if there is some error in the init() method.
13 years ago
1. How is concurrency controlled in EJB, i.e. what happens when two client call the same bean at the same time.
2.When is an MDB instantiated?
3.What is dirty read, repeatable read and phantom read, how do you use transaction isolation in EJB.
4.Can you use threading and reflection inside EJB.
5.Why are separate home and remote interfaces required in the EJB architecture, why not only one?
6.Why is there a remove() method in both the EJBHome and the EJBObject?
7.What does the create() method do in the home interface.
8.What protocol is used in EJB.
Could somebody tell me that why Jsp's are internally converted to the
servlets.
13 years ago
JSP
Hi,
I am making my own Navigator view Plugin for eclipse.
View consists of a TreeViewer.
The issue is I want to refresh(automatic) this view in case of any
addition/deletion/change to the resource workspace.
I refresh my TreeViewer in the code like this:
IResourceChangeListener listener = new MyResourceChangeReporter();
ResourcesPlugin.getWorkspace().addResourceChangeListener(listener);
....

private class MyResourceChangeReporter implements IResourceChangeListener {
public void resourceChanged(IResourceChangeEvent event) {
try{
treeViewer.refresh();
}
catch(Exception e){
e.printStackTrace();
}
}
}
//inner class ends
I am able to add the resources, but while deleting a Project I get exception:
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2119)
at org.eclipse.swt.SWT.error(SWT.java:2051)
at org.eclipse.swt.widgets.Widget.error(Widget.java:370)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:301)
at org.eclipse.swt.widgets.Tree.setSelection(Tree.java:932)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:207)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:1123)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:939)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:695)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:746)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:708)
at com.glic.ea.framework.ide.views.navigator.FrameworkNavigatorView.refresh(FrameworkNavigatorView.java:705)
at com.glic.ea.framework.ide.views.navigator.FrameworkNavigatorView$MyResourceChangeReporter.resourceChanged(FrameworkNavigatorView.java:137)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:128)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:839)
at org.eclipse.core.runtime.Platform.run(Platform.java:416)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:143)
at org.eclipse.core.internal.events.NotificationManager.deleting(NotificationManager.java:94)
at org.eclipse.core.internal.resources.Workspace.deleting(Workspace.java:685)
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:440)
at org.eclipse.core.internal.resources.Project.delete(Project.java:290)
at org.eclipse.ui.actions.DeleteResourceAction.delete(DeleteResourceAction.java:284)
at org.eclipse.ui.actions.DeleteResourceAction.delete(DeleteResourceAction.java:271)
at org.eclipse.ui.actions.DeleteResourceAction$2.execute(DeleteResourceAction.java:363)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:64)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1378)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:78)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2119)
at org.eclipse.swt.SWT.error(SWT.java:2051)
at org.eclipse.swt.widgets.Widget.error(Widget.java:370)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:301)
at org.eclipse.swt.widgets.Tree.setSelection(Tree.java:932)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:207)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:1123)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:939)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:695)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:746)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:708)
at com.glic.ea.framework.ide.views.navigator.FrameworkNavigatorView.refresh(FrameworkNavigatorView.java:705)
at com.glic.ea.framework.ide.views.navigator.FrameworkNavigatorView$MyResourceChangeReporter.resourceChanged(FrameworkNavigatorView.java:137)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:128)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:839)
at org.eclipse.core.runtime.Platform.run(Platform.java:416)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:143)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:67)
at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:133)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:753)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1383)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:78)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)

Pls give suggestions.
Deepak
I am making my own navigator view in eclipse.
I have got one problem while making it:
Suppose I am having a base class say A.
Class B extends from class A.
And class C extends from class B.
Now in the navigator view I want to show all those classes in a project which extend from
A in the hierarchy.
If there is another class say D which is not inheriting from A,B,C, I do't want to show
it in the navigator view.
I want to know how I can i do this.
Regards,