File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes Oracle 10g portal. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Oracle 10g portal." Watch "Oracle 10g portal." New topic
Author

Oracle 10g portal.

Mohammed Shareefuddin
Greenhorn

Joined: Apr 15, 2008
Posts: 3
Hello everybody,

I am new to portal development, please help me in solving this problem. I would really appreciate if anyone could guide me through.

I have a portlet on which there is a text box and a button named "Select Employee", when I click the button it will popup a JSP file.

The code in the JSP file is to retrieve the employee numbers and names from database.

I want the JSP file to be executed when I click the button and display the required employee numbers and names on the page.

But it is not doing so. It is displaying only the HTML contents on the popup page.

Thank you.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

When you say 'pop-up', do you mean 'pop-up.'

Getting away from the existence of pop-up blockers, and the fact that users just hate them, and the fact that users who have pop-up blockers will spend hundreds of hours calling help desks asking why their applications aren't working, the fact is, the portlet context doesn't typically seem to get transferred into any popped up pages - at least not on the portal servers I've worked with.

Have the portlet process some logic, and then have the portlet use a JSP page to display content back to the user in the same portlet space.

It's this simle. Just create a jsp, and forward to it from the portlet. Here's some sample portlet code:



And of course, the JSP:



And of course, the deployment descriptor for the portlet module:



You can download the code from here, if you're interested:

Portlet Examples: How to forward from a portlet to a JSP page for redering results.

Good luck! And keep asking questions. It'll all come together soon.

-Cameron McKenzie
[ May 17, 2008: Message edited by: Cameron Wallace McKenzie ]
Mohammed Shareefuddin
Greenhorn

Joined: Apr 15, 2008
Posts: 3
Thank you for your reply, Cameron.

As I am novice to this portal and portlet technology, I did not understand the answer.

Let me explain my problem once again...

I have deployed a JSP portlet into Oracle 10g AS.

=====================

And I have a JSP file:

=====================
&alt;
%
try
{
out.println("Initializing database connection!");
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con;
con=DriverManager.getConnection("jdbc racle:thin:@vss.ab-sol:1521 rcl","rbank","rbank");
out.println("---Connected---");
Statement stmt;
stmt=con.createStatement();

String vsql="select employee_number, employee_english_name, job_title_english from employee where division_id=(select division_id from employee where employee_number='4100102') and (job_title_english like '%Mgr%' or job_title_english like '%Dept%')";
ResultSet rs=null;
rs=stmt.executeQuery(vsql);
}
catch(Exception excp)
{
out.println(excp);
}
%&alt;
&alt;%
while(rs.next())

=======================

I have stored the JSP file under the following directory:

C:\midtierHome\Apache\Apache

When I click the 'Select Employee' button in the portlet the above JSP will appear as a popup but it will not display the data which is retrieved from the database.

Please help me in displaying the data.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Pop ups are the bane of portal servers.

Don't use a pop-up.

-Cameron McKenzie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle 10g portal.