Sat Nar

Ranch Hand
+ Follow
since Oct 22, 2004
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 Sat Nar

Hello All,

Our application uses Servlet 2.5. We need to set Session Cookies as Http-Only. Servlet 3.0 has provision to allow cookies to be marked as HttpOnly. I am not sure how to have the same in Servlet 2.5. Any help on this is greatly appreciated.
7 years ago
Hi All,

I have the below requirement in my project. The project uses dynamic sql in its queries in the following way.

sqlQuery = sqlQuery + " AND GROUP IN ("+ userRole.toString().trim() + ") ";

userRole is StringBuffer whose value would be 'admin','inq'

Now the query hard codes the value, i want the value to be set at run time using PreparedStatement.

I tried modifiying the above query as below.

StringBuffer userRole = new StringBuffer(" ");
userRole.append(" ' ");
userRole.append("admin");
userRole.append(" ', ");
userRole.append(" ' ");
userRole.append("inq");
userRole.append(" ' ");
sqlQuery = sqlQuery + " AND GROUP IN ( ? );
stmt = conn.prepareStatement(sqlQuery);
stmt.setString(1,userRole.toString().trim());

But the problem here is while runtime, the below value is considered as a "single String" instead of two different strings due to which my query is failing.

'admin','inq'

Can someone help me out on this? I need the value to be two different strings when i am setting it dynamically.
Hi All,
I want to print the actual query executed by the hibernate. Is there any way for it? Thanks in advance.
Hi,

Is there any specific version of struts that we need to use for weblogic 9.2?

I had an application running in Weblogic 8.1 and it was working fine. Now we moved to Weblogic 9.2. Now we are facing with lot of struts related errors.

Kindly help me out. Also how to find the version of the struts?

Thanks in advance.
11 years ago
Hi,
The hwa folder and the WEB-INF folder are present under the same folder. Kindly let me know what is the url you are talking about.

Note: The image was getting displayed in Weblogic 8.1. We upgraded to Weblogic 9.2. Now we are facing this problem.

Also, my ear has two war files. There is a link in the main application which then accesses the other war. The images in main application war file is getting diplayed properly. The images under the other war file is not getting diplayed properly.

Kindly help me out.

Thanks in advance.

[ November 12, 2008: Message edited by: Sat Nar ]
[ November 12, 2008: Message edited by: Sat Nar ]
11 years ago
Hi,
I have to display an image in my page. Below is the code to get the image.

<IMG border="0" height=28 alt="image1" vspace="3"
hspace=5 src="<%=request.getContextPath()%>/hwa/images/image1.gif" width=170 >

request.getContextPath() is returning the correct context name and the path in which the image is also present is also perfect. But still the image is not getting displayed. Kindly help me out.

Thanks in advance.
11 years ago
Hi,

My application uses Struts frameowork. In my JSP page, there are checkboxes and a submit button. When i select the checkbox and click the button, i am getting the below error.

Root cause of ServletException.java.lang.NullPointerException
at org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:427)
at org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:340)
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:684)
at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:884)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

I am not sure where the problem lies. Kindly help me out.

Thanks in advance.
11 years ago
Hi,
My application uses Struts framework and i am facing the below error when i click a link. Below is the error.

Problem occurred while serving the error page
javax.servlet.UnavailableException: Parsing error processing resource path
at org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.java:1035)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1012)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:278)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:507)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:525)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:261)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:706)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:555)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3237)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

I am not able to proceed further. Kindly help me out.

Thanks in advance.
[ November 06, 2008: Message edited by: Sat Nar ]
11 years ago
Hi,
I am reading a config file from a java program. Below is the code.

str = loader.getResourceAsStream(filename);

It is returning a null. I have placed the file under WEB-INF and also tried placing it under WEB-INF classes. But still its returning a null. Kindly help me out.

Thanks
11 years ago
Hi,
I have a servlet and when i start the server, i get the error message

"Servlet failed to preload on startup in Web application"

The servlet is present inside a jar file and the jar has been included in the classpath.

I am not able to move forward. Kindly help me out.

Thanks
11 years ago
Hi,
I am moving my application to Weblogic 9.2. During deployment, i am getting the below error.

Unable to load descriptor

C:\bea 9.2\user_projects\domains\AML_CPEI\servers\AdminServer\tmp\.appmergegen_1224586134603_cpei.ear\xxxx/WEB-INF/web.xml
of module xxxx. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed

I have checked the web.xml for duplicate entries. Kindly let me know how to proceed.

Thanks in advance.
11 years ago
Hi,
I resolved this by placing the POI 3.5 related jars in the Weblogic Classpath in the Weblogic Startup script. Now, i am getting the below error.

java.lang.UnsupportedClassVersionError: org/apache/poi/xssf/usermodel/XSSFWorkbook (Unsupported major.minor version 49.0)


I am using jdk142_08.

Kindly let me know by which jdk POI 3.5 classes have been generated.

Thanks in advance.

[ October 15, 2008: Message edited by: Sat Nar ]
[ October 15, 2008: Message edited by: Sat Nar ]
Hi,
I am new to struts. My application uses Struts Tiles framework. In one page, the header,footer,body is getting loaded properly.But in the menu tile, it is throwing the below error.

Exception in:/jsp/common/menu.jsp] null

I checked the tiles-defs.xml and the mapping is correct. Kindly let me know how to proceed.

Thanks in advance.
11 years ago
Hi,
My application uses Struts Tiles framework.In the JSP page, the header, footer,body JSP's are executed and diplayed properly. But the menu in the tiles shows the below error.

Exception in:/jsp/common/menu.jsp] null

I am new to struts. Kindly let me know how should i proceed. I checked the tiles-defs.xml and the mapping is correct.

Thanks in advance.
11 years ago
Hi,
Thanks la lot for your replies. I tried creating a .xlsx file using POI 3.5 through a separate java program and it got created properly. Now i tried integrating the code into my Servlet. When executing my application(i.e when the link which creates the excel is clicked), i am getting the below error.

java.lang.NoClassDefFoundError rg/apache/poi/xssf/usermodel/XSSFWorkbook

I have placed the jars related to the POI under WEB-INF/lib.

Do i need to add anything in the Weblogic server classpath?

Kindly let me know the solution.

Thanks