Gopikrishna Gopal

Greenhorn
+ Follow
since Sep 08, 2011
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 Gopikrishna Gopal

I am having a portlet `PortletA` in Page1 and PortletB in Page2

On submitting the form in `PortletA`, I am trying to invoke/render `PortletB` using `WindowURL`. But I am not successful and remain in `PorltetA` itself.
This is how I am doing...

PortletA
========



url value that is getting printed is -

http://localhost:7001/Demo/actionPortal.portal?_nfpb=true&_st=&_windowLabel=%2FPortletB&_pageLabel=Page1

I also tried `<portlet:renderURL>`,



But still same.

Please let me know if anything wrong.
5 years ago
I have created 2 jsf portlets testFacesA and testFacesB

testfacesA.jsp has commandbutton which invokes bean method as follows,





And in faces-config.xml , I have the following,





As you can see, I am trying to invoke /testfacesC.jsp in testFacesB portlet on clicking the command button.
But its not invoking it and still stays in its content url (i.e testfacesB.jsp)

Isnt the event been invoked and listened properly?


5 years ago
I want to redirect from one portlet to another. I know we can redirect in handlePostbackData method in portlet's backing file (on click of submit button for e.g)

But is there a way to redirect in forms action tag or onClick of a button? I tried this below technique but its not successful.



Preferrably I want to create a URL as follows,



And based on this url, I want to redirect in jsp's button control. Please let me know how this can be done.
5 years ago
Isnt it possible to store request attribute as follows in Action Class and access it in JSP ?
I know there is a simple way of directly doing getter and setter methods in Action Class. But just want to know if its possible to get values from request attributes in jsp using struts tags.

public class SignupAction1 extends ActionSupport {

HttpServletRequest request = ServletActionContext.getRequest();
MessageBean messageBean = new MessageBean();
messageBean.setMessage("test");
request.setAttribute("messageBean", messageBean);
@Override
public String execute() throws Exception {
...
return SUCCESS;
}
}

In jsp, use s:property tag to get the value ? If so, please mention how to do it.
5 years ago
oops sorry my bad !
Thanks
5 years ago
I am getting nullpointerexception after clicking submit button in SignUp.jsp and control goes to Action.
Line number 19 is

Full Details as follows...

Struts Problem Report
Struts has detected an unhandled exception:

Messages:
File: coreservlets/action/SignupAction1.java
Line number: 19

java.lang.NullPointerException
coreservlets.action.SignupAction1.execute(SignupAction1.java:19)

Struts.xml



SignUp.jsp




SignupAction1.java



Please suggest. Thanks in advance !
5 years ago
On clicking an image in jsp page, I am opening a pop up as follows,

<img src="${imgBanner}" style="cursor:hand; cursor:pointer" onClick="openPopup('Demo', document.all ? 524 : 524,'PopName', event);">

In the pop up window, there is a submit button. On clicking it, the pop up must close and page must be redirected to a different site.

Suppose the pop up window was closed instead of clicking the submit button, nothing must be done.

The pop up contents is just plain html page.


I have tried with adding a close_window() function on clicking the button in pop up, but getting the following js error on clicking the button,

Message: 'window.opener' is null or not an object

Please let me know how to correct it?

FYI, the demo.html page is displayed from weblogic repository and contentviewer.jsp takes care of that (nevermind of this part)


--jsp page



--demo.html



--js file

I even tried another new method as follows but that too failed.

I created a jar file DBLog.jar with DBLog class residing in the package (net.local.util.common)

Then added this jar file into the shared library of web project that is calling the method logPreAuth of DBLog class.



Then setted the Pointbase class path in startPointBase.cmd as follows,

@REM Add PointBase classes to the classpath
SET CLASSPATH=C:\bea\user_projects\workspaces\Work1\DBLog.jar;%POINTBASE_CLASSPATH%;%WEBLOGIC_CLASSPATH%

Restarted the admin server and published and, when I hit the page, getting the below error this time,

Error 500--Internal Server Error
java.lang.NoClassDefFoundError: net/local/util/common/DBLog
at net.local.webapp.RequestFilter.doFilter(RequestFilter.java:80)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


Whats wrong?

Paul Clapham wrote:Apparently you haven't tried the obvious, namely putting the fully qualified class name into your EXTERNAL NAME clause.



I tried like this too,

EXTERNAL NAME \"net.local.util.common.DbLog::insLog\"

But still getting,

java.sql.SQLException: The external "net.verizon.whatsnext.util.common.DBLog::insLog" routine had the following runtime exception "java.lang.ClassNotFoundException: net.verizon.whatsnext.util.common.DBLog"

Paul Clapham wrote:Apparently you haven't tried the obvious, namely putting the fully qualified class name into your EXTERNAL NAME clause.



You mean like this?
EXTERNAL NAME \"net.local.util.common.DbLog::insLog\"
I guess I tried like this too.
Or you mean to say something else?
I read the pointbase documentation at, http://docs.oracle.com/cd/E19518-01/817-7464/817-7464.pdf

And it says,

In order for the database to access this external Java method, the class SampleExternalMethods
must be included in the database CLASSPATH. For PointBase Embedded - Server Option, it
must be in the Server CLASSPATH, but not in the Client CLASSPATH.

The java method can be static or non-static. If it is non-static, connection object will be
established during function invocation, so a non-static member variable of java.sql.connection
and a constructor having parameter java.sql.connection needs to be implemented. If it is static,
the method is called directly and no connection object will be established during function
invocation.

I setted the POINTBASE_CLASSPATH as mentioned in my previous posts but of no use. Did i miss anything?
Should I create a constructor with a connection parameter? But it says, if java method is static, then no connection object will be established during function invocation. Does this mean, no constructor with connection parameter is needed for static java method too?

I was not able to create a new class(with insLog method) without package name, since I need to import that class using package name in DbLog class.
So that was not possible.

Strange.. Any other possibilities?
hmm yeah seems Pointbase is struggling to find DbLog class. Maybe I will try to create another class without package with insLog method and see if any luck?
I setted the classpath in commEnv.cmd as follows,
set POINTBASE_HOME=%WL_HOME%\common\eval\pointbase
set POINTBASE_CLIENT_CLASSPATH=%POINTBASE_HOME%\lib\pbclient57.jar
set POINTBASE_CLASSPATH=%POINTBASE_HOME%\lib\pbembedded57.jar;%POINTBASE_CLIENT_CLASSPATH%;C:\bea\user_projects\workspaces\work1\utility\build\classes
set POINTBASE_TOOLS=%POINTBASE_HOME%\lib\pbtools57.jar

My DbLog class in the path, C:\bea\user_projects\workspaces\Work1\util\build\classes\net\local\util\common
FYI, net\local\util\common is the package.

But when I try to execute the page which calls RequestFilter.java, I am getting the following error,

Error 500--Internal Server Error
java.lang.NoClassDefFoundError: Could not initialize class net.local.util.common.DbLog

Please find the code below,

--RequestFilter.java



--DbLog.java