Prash Singh

Ranch Hand
+ Follow
since Aug 23, 2009
Prash likes ...
jQuery Netbeans IDE Notepad
Working as a Java Programmer
Ghaziabad,India
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Prash Singh

Dear All,

I need to have multiple connection pools in my application. As I am using Tomcat 8.x , I have decided to use the tomcat container for managing my data sources.
For this I made multiple entries in context.xml for Resource tag



And for getting connection I look up the context and all DataSources present in the context.
I save all datasources in a Map<String,DataSource> and able to create connection with each datasource.

I am confused that if I call close on the retrieved connection , Will it be returned to the pool from which it was fetched ? Or It will be lost?
What will happen to such Connection object?


Please guide me.

Thanks in advance.

Dear All,

The JVM is capable of running multiple languages including Java Script. I am confused , what could be the possible cases in which one would use the Java script to be executed on the JVM.
Please explain.

Thanks in advance.


5 years ago
Dear All,


I am facing a problem in creating the Java object from return XML from the web service.
Web Service and Web Service Consumer applications are both created By me.

The problem is in unmarshalling the XML to Java Object.

My base Class




If I return the response in xml as String, it is showing the it is properly marshalled into XML as I can see in the reponse.

But When I am unmarshalling the response on the client Side,
it is not populating the subDobjs arrays of DO.

I am using Jersey 1.17 and tomcat.

Please suggest how to resolve this.




5 years ago
Dear All,

I am new to jsf application development and
I am really confused at some thing which I figured out.

the situation is , I am having a managed bean which is in request scope.
The jsp which is using that bean has a command button rendered attribute set to false by default.
On some value change event I change that attribute value to true.
But even now when the button is visible, the action method bounded to the bean does not execute and my whole bean gets refreshed. (Constructor gets called( expected)).

In other case if I make the render attribute of the button to true by default , then the button works fine , no problem at all.

Please clarify me on this behaviour of jsf.

Thanks & Regards
7 years ago
JSF
Dear Tim,
We originally had a swing application , which was required to deployed on web.
So for that purpose Applet was created which works successfully with all the jars required.
We used to distribute our application in .exe format and with the .dll files which were created using a tool JET Compiler
which compiles, packages the jars into .dll files.
The approach worked fine for Swing application .
So same approach is required in Applet too.



7 years ago
Dear All,

I am having a requirement which I don't know can be solved or not.
Really looking forward for some suggestion.

I created an Applet which works fine when all the code and resources are packaged in to the jar and provided in the archive tag of the applet tag.
The thing is , now the jars are replaced with .dll files with all the jars .
Now when I am running the applet, is show ClassNotFoundException for the code attribute which has the main class of the jar ( which invokes the applet).

I want to ask , that is it possible the way it has been requested?
Also, are there some code changes required to be done in the applet's init() to locate or call those dll files.


Thanks in advance.


7 years ago
Dear All,

This query is not related to Java only.
I want to improve my Data Structure and algorithms handling skills.
Please suggest me exercises or books to follow for such topics.

Regards
7 years ago
Dear All,

I am having a problem dealing with this issue, Don't know whether it is feasible or not.
The situation is , I have a jar that reads a specific xml file from the class path using the following code.



The jar which I have developed will be used in multiple environments like servlets , swing etc.

The restriction I have here is that the "TO_BE_READ.xml" file has to be in a jar or to be placed along with the class that reads it.

My question is , Is it possible to place that xml file separate from the classes.
Like, if I am putting jar on class path of an application, then is it possible for the jar to locate and read the xml file with in the application.


Regards


7 years ago
Dear All,
This post will clearly explain what actually is happening.

The sequence of components on my jsp is like this,
HtmlInputText, HtmlSelectOneMenu1,HtmlSelectOneMenu2.

Each of these component has ValueChangeEvent attched to their onblur, onchange and onchage event.
Now after the onblur event of the InputText , the onchange event of the HtmlSelectOneMenu1 is called twice,
and If keep on calling the same event again, it is called three times, and so on.
Same is the case with HtmlSelectOneMenu2..
Can you please point out why is this actually happening.?

Thanks in advance
7 years ago
JSF
Dear All,

I am new to the JSF programming.

The issue is that, in my form, i have several menus and text boxes , most of them generated ValueChangeEvent.
The problem I am facing is that , on the onchange event of menus the ValueChnageListener method is being called multiple times.


any ideas regading this issue?



Thanks
7 years ago
JSF
Hello everybody. Please reply to this thread..
7 years ago
JSF
Dear All,

I am trying to develop a custom component of my own.
I am trying to set the component tag attributes using ValueExpression.

I am a bit confused about the ValueExpression is behaving.

There is a method isLiteralText()
which states


This method must return true if and only if the expression string this expression was created from contained no unescaped EL delimeters (${...} or #{...}).



and getExpressionString() which returns the string which formed the ValueExpression for that attribute.

The confusion is
when I check

value.isLiteralText() it reurns true.
but when I call value.getExpressionString()
it returns #{testBean.dateField} , so in this case value.isLteralText() must return false, but is not happening.

Please help me with this issue.
7 years ago
JSF
Thanks for reply Tim.

No one can say you lack ambition, Prash!


Is it a bad thing?


I agree with you that JSF 1.2 version is obsolete, but due to some circumstances I am allowed to use
only JSF 1.2.

The reason I asked this question is because I have to create a component .
Component has been created, but still there are some bugs which need to be fixed in it.

For example,
For the attribute values for the custom component, I am trying to pass values to them using ValueExpression,
But so far , no luck.

Also there is something strange happening, and I am just not that much experienced in JSF to figure out what's going wrong
The component values get updated on the click of commandAction , but are not updated on ValueChangeEvent of some input box
in the same form.It will be a huge help if you can throw some light on this.

I am trying to work this out, but some guidance from you would be a huge boost .

Thanks

7 years ago
JSF
Dear All,

I am creating a custom development of my own using jsf 1.2.

I want to know that Do I have to code a separate ELResolver for my component?

Please reply .
7 years ago
JSF