Ankit Mishra

Ranch Hand
+ Follow
since Jul 15, 2009
Merit badge: grant badges
Biography
Java Development, Game Programming, Writing, Reading, Games..
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ankit Mishra

Hi,
Thanks for your replies!
Ya that would be a performance hit that's why i put up this question. I am working with dynamic queries now searching on criteria basis now.
Thanks Bear, Sorry for the trouble!

@ Vijitha

I give you an example - I have 4 fields say date, name, age and marks.

now i have combinations to give me desired results for example:
Only date [gives a longer search result]
date + name
date + age
date + marks
date + name + age
date + name + marks
.................

I have one single query to get the desired search result!

What I am doing is extracting the complete result once which is say will get on the date search criteria a bigger chunk.

now, for other combinations I am currently maintaining one list in which i have the search result [bigger chunk] and then I am removing elements not needed with other combinations
for example:

I have got this list
name - a, b, c,d, e ,f
age - 12,13, 12,, 13, 14
marks- 78, 78, 78 ,78 ,78

so above is one complete list when i say on date say 10 oct 2010 and search only by age which is 12 so my result set should be:
name - a, d
age -12,12
marks-78,78

for this i am removing unwanted items

Any help in this regard will be helpful for me!

Please, Its urgent for me ...

Hi All,

I have one requirement - There are say 4 search criteria and using permutation I can have combination of these search criteria to drill down my search results.

What will be the best way to achieve this in the backend. I have used query to get the search results now how can I get the desired search result using java!

Hi!

This may be of some help for identifying the problem:

Following is the header.jsp :



Below is the page I am using the header.jsp for having menu on this page.



Any kind of help in this is much appreciated by me. Thanks for Vijitha for seeing it
13 years ago
JSP
Hi All,

I have one problem in displaying a drop down menu.
I have created one header.jsp in which there is a drop down menu code.

Now, there is second jsp say home.jsp in which i am including header.jsp. But the problem is my drop down menu is getting hidden behind the page elements say a table having form.

Please, help me out solving this.

[code of header.jsp includes javascript code]
13 years ago
JSP
Hi Thank you both of you for the resolution. I was thinking about the database, so that if I have to make any change I can directly change in the database. But there will be an additional overhead of data fetching.
Yes Jeanne I am aware of JDBC.

I was unaware of <fmt:message> tag. Thank you both of you for guidance
13 years ago
JSP
Hi All,

I have one issue :

I have a form say for login and I have two fields login id and password. Now what I want is to save the labels attached to these fields in database. Can anyone help me regarding this how to fetch the associated lables from database.

I want some thing like below:

Example:

13 years ago
JSP
Thank you guys for your replies. I have understood your points. Just one clarification will following be a worth for a small web application

JSP (View) - sending data
1 servlet controller which will redirect to different servlets based upon say some hidden parameter.
Bean classes to capture data which will then interact with database codes to do database things.


Actually I just need one servlet where requests from jsp will be redirected from that servlet will call other business logic classes.
13 years ago
Hi All,
What is the best way to capture HTML form data in servlet. What I mean is I don't want to directly say request.getParameter("x") in servlet. I want to create one class which can capture the form data and I can use that object in that servlet class.

Is it the correct approach? and what other approach I can use it.

I have worked on MVC Design pattern earlier but need to know how can I enhance this I mean capturing of data not directly in a servlet.

Note: I dont want struts, springs, Hibernates.
13 years ago

Hi, I am getting the following exception. I am unable to rectify it can anyone help me in this regard. I am working with Weblogic 8.1 EJB 2.0

I was trying to work around with CMP-CMR and here I am getting this exception.

Error 500--Internal Server Error
java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.NullPointerException
at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:102)
at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:307)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:284)
at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:168)
at com.order.session.order_hvhkpl_EOImpl.addOrderDetails(order_hvhkpl_EOImpl.java:108)
at com.order.session.order_hvhkpl_EOImpl_CBV.addOrderDetails(Lcom.order.dto.OMOrderDTO;)Lcom.order.dto.OMOrderDTO;(Unknown Source)
at com.order.processor.OMProcessor.doGet(OMProcessor.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.NullPointerException
at weblogic.ejb20.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:247)
at weblogic.ejb20.internal.BaseEJBLocalHome.handleSystemException(BaseEJBLocalHome.java:246)
at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:326)
at com.order.entity.OrderManagementEntity_2oq38n_ELOImpl.getValues(OrderManagementEntity_2oq38n_ELOImpl.java:57)
at com.order.session.OrderManagemetBean.addOrderDetails(OrderManagemetBean.java:59)
at com.order.session.order_hvhkpl_EOImpl.addOrderDetails(order_hvhkpl_EOImpl.java:98)
... 14 more
Caused by: java.lang.NullPointerException
at com.order.entity.OrderManagementCMPBean.getValues(OrderManagementCMPBean.java:78)
at com.order.entity.OrderManagementEntity_2oq38n_ELOImpl.getValues(OrderManagementEntity_2oq38n_ELOImpl.java:45)
... 16 more

14 years ago
Hi,

Which is the best way to generate a primary key. Say, for example I have one table Student and in that I have a student Id. Now how can I generate it as an automated key.

I don't want to use sequencing or auto increments. I want to do with a business logic, so how can I achieve that?
ya i have added that in remote interface and bean class.

I dont know why it is happening any idea where could be I am making mistake?

Below is my servlet code:

14 years ago
hi everyone,

I am getting following exception while running my servlet. I have deployed my ejb jar and application war on weblogic server 8.1 sp6.

Using jdk 1.4 version.

It will be great if some one can help me resolve with this.

java.lang.NoSuchMethodError: com.order.session.OrderManagement.sayHello(Ljava/lang/String;)Ljava/lang/String;
at com.order.processor.OMProcessor.doGet(OMProcessor.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

14 years ago
Hey I finally ran my first EJB example.

Problem was I was having weblogic service file in my lib (in eclipse).

I removed that and it worked ..

Thanks a lot for your help ulf
hmmmm thanks Ulf for your help and time. I have reached till this point:




What's this exception now

Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/kernel/KernelStatus
at weblogic.jndi.Environment.<clinit>(Environment.java:73)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at com.client.ConverterClient.main(ConverterClient.java:23)

I am really tired working on this from days....


I really appreciate your time and kindness