JPDK Samples

When I test the IsItWorking servlet it works fine. I tried installing the PDK-Java Framework and Samples following the newest instructions. But when I try to put the URL http://servername/servlets/samples I get the following:
NOT FOUND
The request URL /servlets/sample was not found on this server.
What could be causing this?
I do have the debuglevel=1 in the servlet.sample.initArgs.
I am using the provider.xml file found at D:\jpdk\providers\sample.
Thanks.....JS

Hi Julie,
I know it's not very exciting, but try to go over the installation steps again.
If it helps you, copy the corresponding parts of the config files here:
1) jserv.properties: wrapper.classpath=<your_jar_file>
2) zone.properties:
Servlet Alias section: servlet.sample.code=oracle.portal.provider.v1.http.HttpProvider
Aliased Servlet Init Parameters section:
servlet.sample.initArgs=provider_root=D:\jpdk\providers\sample, sessiontimeout=1800000, debuglevel=1
3) Have you modified the provider.xml file according to the physical location of the examples?
What's the physical path your example directories (helloworld, lottery, etc.) are?
Copy your provider.xml here.
Regards,
Peter

Similar Messages

  • JPDK Sample Provider compile error

    Hi
    I have installed 'OracleAS Containers for J2EE Pre-configured PDK', version 9.0.4.
    The Portlal tools are running fine, but the 'JPDK Sample Provider' fails with a compile error:
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\pdk-container2\j2ee\home\application-deployments\jpdk\jpdk\persistence\_pages\_htdocs\_testpage\_TestPage.java.
    I have set the PART and JAVA_HOME environment to point to a jsdk:
    java -version
    java version "1.4.2_05"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
    Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode).
    Any ideas???

    By setting the home, are you setting the JAVA_HOME to a proper JDK installation, and not to the JRE installation?
    thanks,
    Harsha

  • Problems in pdk and jpdk samples?

    Any known problems in the samples externalApp and iFame that comes with the latest PDK and JPDK?
    I tried to install these samples by following exactly the steps in the installation html files. But, when trying to test the installation in the last step. The error messages showed up:
    "Forbidden
    You don't have permission to access /servlet/flightsprov on this server."
    "Forbidden
    You don't have permission to access
    /servlet/iframe on this server."
    By the way, there is no "externalApp.jar in the jpdk
    Do I miss any thing? Are there walkaround?
    null

    This post is best suited to the Oracle Portal Development Kit (PDK) forum.
    thanks

  • Repository does not display JPDK samples

    Hello,
    I've seen several threads for people having the same issue as me, where registering a web provider appears to work, but it ends up not being displayed in the repository and the Refresh Errors page displays an HTTP_PROV_EXEC_EXCEPTION, however I am still unable to get it to work. I have tried both the JPDK and the URLServices samples. I have tried registering with hostname.domain, hostname, localhost, IP address. Does anyone have any advice for what to try next?
    Thanks,
    Damian

    Hi Aradhana ,
    1) On the menu bar, select Help->Check for updates.
    2) Select the ‘Skip This Page Next Time’ checkbox and then click Next.
    3) Select the ‘Install From Local File’ radio button and click the Browse button.
    4) Browse to ‘/apps/middleware/Oracle_ECM1/ucm/Distribution/RIDC/jdev’ directory, select the oracle.ucm.ridc.jdev-11.1.1.zip, and click Open.
    5) Click the Next button.
    6) Click the Finish button.
    7) On the Confirm Exit screen, click Yes.
    Follow these steps and then check if the issue still persists.
    Thanks
    Srinath

  • JPDK Samples? Nothing in my Portlets!

    Server: UNIX
    DB: 8.1.7
    Portal: 3.08
    Installed the JPDK according to the instructions and have got the sample to work as well as registered the Provider.
    I can see all of the sample portlets with descriptions in the repository but when the portlet is added to a page it is blank. The only portlet that displays anything is SampleRenderer example.
    I have not seen any errors in the portal but have noticed the following errors reoccuring in the jserv.log file:
    1. ajp12: Servlet Error: ClassNotFoundException:
    jpdk]
    2. sample/Not Found: NoClassDefFoundError: oracle.jsp
    .JspServlet
    Does anyone have any ideas as to what could be the problem?
    Thanks, Michael
    null

    Michael,
    You are seeing this error message because the servlet container cannot find the classes necessary to parse and compile JSPs.
    I suggest you ensure your server's classpath caontains the ojsp.jar file from the Oracle JSP Engine (required for the JPDK).
    If you are using iAS (or Apache/JServ) you can verify the server's classpath by going to the JServ statuc page at http://your.server.name/jserv/
    Regards,
    Gareth

  • Default implementations of JPDK V2 classes and interfaces - is the source code?

    Hi
    Is the source code for all the default implementations of the JPDK interfaces, renderers etc. available somewhere?
    Regards
    Harry

    Please find jpdk samples sources for jpdk implementation under src.zip inside PDK.zip
    In addition, one can many articles related to PDK under articles folder.

  • New Patch Release 3.0.9.8.1 for Oracle9iAS Portal 3.0.9.8.0

    The patch can be found on metalink. The patch number is: 1841088.
    Oracle9iAS Portal 3.0.9 Patch Release Notes
    July 2001
    Contents
    For the latest release note updates, visit the Oracle Technology Network
    and click the Documentation tab.
    Installation and Setup Patch Contents
    Installation (Windows) Bugs fixed by this patch
    Installation (UNIX)
    Post-installation steps
    Installation (Windows)
    You can only apply this patch to Release 3.0.9 of Oracle Portal
    (Oracle9iAS v1.0.2.2). To apply this patch, do the following:
    From the command line prompt, execute the patch command according to
    the following syntax:
    patch.cmd [-m patch_mode] [-s schema_name]
    [-p schema_password] [-u sys_password]
    -c connect_string [-l log_file_name]
    -m patch_mode is the patch mode. Valid values are
    loginserver or portalschema. Default value is
    portalschema.
    -s schema_name is the name of the Portal schema that you
    want to patch. Default value is PORTAL30.
    -p schema_password is the password of the schema you want
    to patch. Default value is PORTAL30.
    -u sys_password is the SYS Password. Default value is
    CHANGE_ON_INSTALL.
    -c connect_string is the TNS connect string information.
    -l log_file_name is the name of the log file. Default value
    is patch.log.
    Examples:
    To patch Login Server Only:
    patch -m loginserver -s portal30_sso -p portal30_sso -u
    change_after_install -c mydatabase -l mypatch.log
    To patch Portal Schema Only
    patch -m portalschema -s portal30 -p portal30 -u
    change_after_install -c mydatabase -l mypatch.log
    To patch both Portal Schema and Login Server
    patch -m loginserver -s portal30_sso -p portal30_sso -u
    change_after_install -c mydatabase -l mypatch.log
    patch -m portalschema -s portal30 -p portal30 -u
    change_after_install -c mydatabase -l mypatch.log
    To complete the application of the patch, follow the instructions in
    Post-installation steps.
    Installation (UNIX)
    You can only apply this patch to Release 3.0.9 of Oracle Portal
    (Oracle9iAS v1.0.2.2). To apply this patch, do the following:
    From the command line prompt, execute the patch command according to
    the following syntax:
    patch.csh [-m <patch_mode>] [<-l log_file_name>]
    -m <patch_mode> is is the patch mode. Valid values are
    loginserver, portalschema, or both. Default value is both.
    -l log_file_name is the name of the log file. Default value
    is patch.log.
    Examples:
    To patch Login Server only
    patch.csh -m loginserver -l mypatch.log
    To patch Portal Schema only
    patch.csh -m portalschema -l mypatch.log
    To patch both Portal Schema and Login Server
    patch.csh -m both -l mypatch.log
    patch.csh -l mypatch.log
    To patch both Portal Schema and Login Server with default
    log file
    patch.csh -m both
    patch.csh
    To complete the application of the patch, follow the instructions in
    Post-installation steps.
    Post-installation steps
    The bug fixes for bug numbers 1817550, 1830898, 1832632, 1840420, 1664594,
    1810741, 1807325, and 1819442 are not installed via the patch script
    because you must shut down your Web server prior to applying them. The
    sections that follow describe how to apply these fixes.
    JPDK.ZIP
    On the Web server where the provider is running:
    Unzip the contents of jpdk.zip into a directory (e.g., JPDK_30901).
    Shut down your Web server.
    Change your zone.properties file to include <extract
    dir>/jpdk/lib/provider.jar in the wrapper.classpath.
    If you are using Java Portal Development Kit (JPDK) samples from a
    previous release of the JPDK, update your samples using those
    included in the zip file. Refer to <extract dir>/installing.jpdk.html
    for more details.
    Restart your Web server.
    Note: Refer to <extract dir>/release.notes.html for a list of changes made
    in this release.
    wwpage.jar
    On the middle tier where the Portal listener is running:
    Shut down your Web server.
    Create a backup of your current wwpage.jar file.
    Replace /$IAS_HOME/Apac he/Jserv/servlets/wwpage.jar with the new
    wwpage.jar provided in this patch.
    Restart your Web server.
    New Parameters
    The Parallel Page Engine now accepts two new parameters in the
    zone.properties file:
    minStall is the minimum stall value allowed for a contentfetcher
    before it assumes there is a problem and times out. This value
    defaults to 120 seconds. It was added to help upgrades from
    308, which had a normal stall value of 40 seconds. The meaning
    of stall has changed slightly, raising the need for a minimum
    value.
    minTimeout is the minimum timeout that may be sent by a
    portlet. At times portlets send very small values, like 1
    second. This almost always fails, and pages are rendered
    incomplete. The minTimeout defaults to 5 seconds, but may be
    set otherwise if this is not large enough. The minTimeout is
    different from the requestTime. The requestTime is used when no
    timeout value is sent for a portlet.
    opca.jar
    Back up your current opca.jar file, which is found in the
    <IAS_HOME>/assistants/opca/ directory.
    Copy the opca.jar file provided with this patch to the
    <IAS_HOME>/assistants/opca/ directory.
    To install the Portal repository, run the launch.bat (on NT) or
    launch.sh (on Solaris) to invoke the Portal Configuration Assistant.
    Follow the steps in the configuration assistant.
    Oracle Portal Cache
    Go to Oracle MetaLink and retrieve the patch for bug number 1817550.
    Stop your Oracle HTTP Server.
    Apply the patch you downloaded from Oracle MetaLink as per the
    instructions in the README.txt file.
    Login to your system as root and delete all cache files and
    subdirectories under the directory
    <IAS_HOME>/Apache/modplsql/cache/plsql. Make sure the directory
    <IAS_HOME>/Apache/modplsql/cache/plsql is empty.
    Start your Oracle HTTP Server.
    Bugs fixed by this patch
    This patch fixes the following known bugs:
    Bug Number Bug Subject and Description
    1817550 ON SOLARIS, WHEN RUNNING ON PORT 80, ORACLE PORTAL CACHE
    GETS DISABLED
    Due to a bug in the Oracle HTTP Server powered by Apache,
    the Oracle Portal cache gets disabled when it is running
    on port 80.
    1819194 EXCEPTION THROWN IF A USER'S PASSWORD HAS AN AMPERSAND.
    Special characters such as an ampersand (&) in passwords
    or any text node that is sent to the Web providers were
    causing errors.
    1664594 XML TAGS IN THE JAVA STACK - CAUSING PARSER TO CRASH.
    (Duplicate Bug: 1788506) Control characters were not
    being properly escaped appropriately and causing errors
    in the database SOAP parser.
    1823166 PORTLET SECURITY IS RAISING AN ERROR FOR NON-ADMIN USERS
    W/ ANY_PORTLET MANAGE.
    1782458 NOT ABLE TO CREATE MASTER DETAIL REPORT.
    1802055 308-309 UPGR: CLICKING ON "REFRESH ERROR" IN PORTLET
    REPOSITORY GIVES ERROR.
    1815257 UPGRADE: 306-309:308-309:SEARCH PEOPLE PORTLET: SHOWS
    ERROR.
    1744458 REPORTS FROM SQL: VALID SQL:GIVES AMBIGUOUS COLUMN ERROR
    FOR JOINED TABLES.
    1783257 REPORT COMPONENT AS PORTAL IN PAGE CAN'T BE ASSOCIATED
    WITH TAB.
    1801961 UPGRADE:307-309:ADD PORTLETS REGION IS SHOWING UP VERY
    SLOW.
    1807325 FETCHERS TIMEOUTS, AND PORTLET PRODUCED AN ERROR.
    This bug pertains to a synchronization issue in the 3.0.9
    fetching of portlet content. The Document could not be
    contacted error is randomly raised. However, it may be
    that other problems are causing this error. This bug only
    refers to the synchronization issue in which the Parallel
    Page Engine causes the problem.
    1810741 PROVIDER USER DOES NOT DETECT PUBLIC USER CORRECTLY.
    Previously, the JPDK did not correctly detect if the
    current user was logged in or accessing the portal using
    a public session. This bug also affected providers
    registered with a login frequency of PUBLIC. Failure to
    detect the logged in state of the user correctly caused
    ProviderUser.isPublicUser() to return an incorrect value
    when a provider written using JPDK release 3.0.9 was used
    with earlier releases of Oracle9iAS Portal.
    The most common symptom of thi s error is the Customize
    link being shown to public users when the provider
    definition specified that it should be hidden. A new
    username parameter has been added so the JPDK can
    correctly detect the logged in state of users while
    maintaining backwards compatibility with older versions
    of Oracle9iAS Portal.
    1811275 GROUP NAME IS REPEATED IN LIST OF GROUPS IN SPANISH,
    FRENCH ETC.
    1812018 PERSPECTIVES ARE REMOVED FROM ITEMS IF THEY ARE EDITED.
    1815037 OPCA HANGS AT 90%
    Oracle Portal Configuration Assistant hangs at 90% during
    the Oracle9iAS 1.0.2.2 installation.
    1819442 PROVIDE MINTIMEOUT FOR PPE TO OVERRIDE SMALLEST
    TIMEOUT(S).
    Previously, there were no minimum values for timeouts.
    The fix for this bug adds some minimum values for
    timeouts and changes the defaults such that the Parallel
    Page Engine works better without any configuration by the
    user. These changes help to prevent getting the Portlet
    could not be contacted error message.
    1830898 SSOUNLCK.SQL DOESN'T UNLOCK SSO USER ACCOUNT.
    1832632 BITMAP INDEXES IN EXPORT-IMPORT FAIL TO INSTALL ON ORACLE
    8I STANDARD.
    1833509 SITE MANAGER BUGS FOR CATEGORY, ITEMTYPE, FOLDERTYPE, AND
    PERSPECTIVE.
    This bug covers the following:
    Showing the category popup correctly when you hide
    categories.
    Same Banner appears more than once while rendering.
    All Item Types show up when you create Custom Item
    Types.
    All Folder Types show up when you create Custom
    Folder Types.
    No data found error occurs in perspective list of
    content area manager.
    All item types get hidden when you hide different
    item types in different content areas.
    Categories are not displayed appropriately when you
    go into content areas of default languages other
    than "us."
    Minor issues with Bulk action.
    1840420 CUSTOM WRITTEN EXTERNAL AUTH MODULE NEED TO BE UPDATED
    AFTER 3.0.9 UPGRADE SSOXOID.PKB DOESN'T LOAD.
    External authentication modules that were written before
    3.0.9 need to be updated after upgrading to 3.0.9.
    ssoauthx.pks is updated in 3.0.9 and contains additional
    routines that need to be implemented.
    null

    Richard,
    I have just applied patch to upgrade from Portal 3.0.9 to 3.0.9.8.1 (Patch applied to loginserver and portal schema) and the External Applications that were previously set up have gone from the portlet.
    Does this relate to your note at the bottom:
    "Minor issues with Bulk action. 1840420 CUSTOM WRITTEN EXTERNAL AUTH MODULE NEED TO BE UPDATED AFTER 3.0.9 UPGRADE SSOXOID.PKB DOESN'T LOAD.
    External authentication modules that were written before 3.0.9 need to be updated after upgrading to 3.0.9. ssoauthx.pks is updated in 3.0.9 and contains additional routines that need to be implemented." ??
    If I go to the "Login Server Administration" portlet and select the link "Administer External Applications" I get a list of 5 External Applications that have previously been set up.
    If I go back to the Home Page and select "customize" on the "External Applications" portlet I get the message "Your Login Server administrator has not registered any external applications".
    Does that mean I should just run 'ssoauthx.pks' & 'ssoxoid.pkb' or do I need to do something else ??
    Thanks
    Simo

  • Calling portal v2 pages with parameters in a jsp

         Hello everybody,
         I'm currently trying to create, in a jsp, a link to a portal-v2 page with parameters.
    Practically :
    [JSP / Portlet 1]
         - a 1st jsp generates some links, all to the same page but each sets a different value to a parameter (for example a productId in a list).
    [JSP / Portlet 2]
         - a 2nd jsp gets this parameter and use it (for example it displays the details of the chosen product).
    So the 1st portlet would be jsp (coded by a portlet designer) and clicking a link would lead to another page (chosen by a page designer) which would hold the 2nd portlet (= 2nd jsp, coded by the same portlet designer).
         Writing the second jsp is easy : getting parameters is described in many examples and pdk articles.
         But I can't find the java methods to use to generate the link. More precisely I don't know how to call the portal page (which would then be a jsp1's parameter). Adding the parameter is well described in the jpdk API-Doc.
         I've tried to use portal events but they seem to work only in an html form. So I supposed it was a wrong way.
    As I've lost myself so many times in the API-Doc and I didn't find any jpdk sample about that, I would be really thankfull if someone has an idea (may I hope for a sample code ? :-)
    Thanks.
    Jean-Roch

    I'm having a similar problem!
    I have a JSP page which I have published as a portlet to Portal. The JSP portlet is placed on Portal a page. I need to call this Portal page with some parameters in the URL, which should get passed to the JSP portlet.
    In the JSP portlet I used this syntax in release 1 to retrieve the URL parameters:
    String p_itemID = request.getParameter("item_id");
    That worked great in release 1, but not in release 2.... I think the problem is that you need to define which parameters a portlet has, then map those portlet parameters to page parameters in the page properties. In dynamic page - portlets you define bind variables to accomplish this. But how do you do in JSP portlets? When you try to map Page Parameters to the JSP portlet you'll find that Portal doesn't think that the JSP portlet has any parameters. Hence the page parameters does not get passed to the portlet.
    (More info: JDBC----getImportedKeys() )
    I've looked at the Multipage example and the forminput example. But I don't see how pass a parameter in the URL to the very first JSP portlet from looking at those examples. I do see how you can pass parameters to the next JSP portlet, but that's not my problem. Maybe I'm missing something obvious...
    Any ideas?

  • 10.1.2.0.2 Resource proxying constructResourceURL without change

    10.1.2.0.2 supports for the first time to tunnel resources like images from the provider directly thru the Portal.
    Unfortunately we don't get it to work as expected. You can easyly reproduce using the JPDK samples. The lotto sample has allready implemented the feature:
    IMG SRC="<%= UrlUtils.constructResourceURL(portletRequest, HttpPortletRendererUtil.absoluteLink(request, "images/ball" + picks[i] + ".gif")) %>" WIDTH="68" HEIGHT="76" ALIGN="BOTTOM" BORDER="0"
    but when accessing the portal page the image links are still the old ones (http://<webapp_url>/jpdk/htdocs/lottery/images/ball1.gif) but should be something like http://<portal_url>/portal/...provider...resource=http://<webapp_url>/jpdk/htdocs/lottery/images/ball1.gif
    Do you have a hint for us?
    thanks
    Heiko
    Message was edited by:
    hr

    In order for the JPDK to generate links that use resource proxying, both the PPE (Portal) and JPDK must be configured with a shared key.
    For the PPE, an init-param called resourceUrlKey must be defined.
    For the JPDK, a JNDI environment variable with the same name (resourceUrlKey) must be defined.
    The key must have the same value in both places.
    Please see section 4.11 of the 10.1.4 Portal Configuration Guide for more information.
    The JPDK will fall back to the old behaviour if either key has not been set -- which is what I think you are seeing in your case.
    I hope that helps.
    Andy.

  • PUBLISHING OC4J JSP as web portlet

    I have developed a JSP page in OC4j and want to publish this page on portal 3.0.9 as web portlet. I have created web provider and registered this page as portlet. When I view the portlet it comes as a Blank Page.
    Can anyone tell me how to publish a JSP page developed in OC4J as a web portlet? Can I publish JSP web pages developed in OC4J as web portlet without modifying any JSP code?
    I have installed all JPDK samples and they are working fine.
    Regards

    Here is what we are forced to do, because V2 has had a great delay in the time scheduling.
    Hope it helps. Anyone better ideas?
    Michael.
    ------------8<----------------8<----------------8<-----------
    1. use mod_proxy in httpd.conf
    <IfModule mod_proxy.c>
    ProxyRequests On
    ProxyPass /pof/ http://localhost:7779/pof/
    ProxyPassReverse /pof/ http://localhost:7779/pof/
    </IfModule>
    2. create JSP under JServ, use hidden fields to transfer parameter
    <%
    try{
    PortletRenderRequest portletRequest = (PortletRenderRequest) request.getAttribute(HttpPro
    vider.PORTLET_RENDER_REQUEST);
    ProviderUser pUser = (ProviderUser) portletRequest.getUser();
    String vUser = pUser.getName();
    if ( !vUser.equalsIgnoreCase("PUBLIC") )
    %>
    <input type="hidden" name="user" value="<%= vUser %>">
    <%
    3. in the action-Tag, use the mapped URL to connect to OC4J
    <form action="/pof/ ....

  • URL services HTTP_PROV_EXEC_EXCEPTION error while displaying repository

    The sample testpage at http://my.server/servlet/urlsample works. But when I open the Other providers repository in Portal it display a refresh error saying:
    "Name Date Information
    wwpro_api_provider.get_portlet_list 07-SEP-2001 PROVIDER[9619744]: URLSamples LANGUAGE: us ERROR: HTTP_PROV_EXEC_EXCEPTION
    wwpro_api_provider.get_portlet_list 07-SEP-2001 PROVIDER[9619744]: URLSamples LANGUAGE: us ERROR: HTTP_PROV_EXEC_EXCEPTION"
    null

    Have you resolved this? I am interested in finding out what happened with this problem 'cause I am getting the same error when I did the same with JPDK sample web application. I was able to install it on NT with no problem. But when I tried to do the same in Solaris the problem came up.

  • Convert existing servlet into portlet

    Hi
    We have a set of Java servlets running on apache and jserv and not using Portal. My task is to be able to convert these into Portal.All of the existing servlets are extends/use our existing set of classes. They display a list of rows in a table as HTML with a URL pointing back to the same servlet or different servlet based on logic, with set of parameter. With my current setup (all on a Win2000 system), I have installed the JPDK samples and it is working fine, but have now got stuck in applying the concepts to my own existing servlets. So can you help me how can i convert an existing Java servlet into Portal?
    First i tried the "how to build your own java portal exercise" and it runs fine. But when i tried to run simple servlet to convert into portlet, i got the following error. I am really confuse about Renderer. Is it nessessary to make Renderer or use Default Renderer? I will really thankful to you if you give me some idea.
    I changed the following in to conf/jserv properties.
    1. set the " <showPage class="AgeServlet"/> " in provider.xml
    2. in zone property
    servlet.AgeServlet.code=oracle.portal.provider.v1.http.HttpProvider
    servlet.AgeServlet.initArgs=provider_root=C:\MyProvider,sessiontimeout=1800000,debuglevel=1
    3. In jserv property
    wrapper.classpath=C:\MyProvider\MyClasses
    Where i put my AgeServlet.class
    4.Stop and Start the Oracle HTTP Server.
    When i try to run url(http://host.domain:port/servlet/AgeServlet) it gives me following error.
    Error!
    javax.servlet.ServletException: Unable to initialize new provider instance: java.lang.reflect.InvocationTargetException
    My servlet is
    // JDK1.2.2 module
    import java.io.*;
    import java.util.*;
    //JSDK modules
    import javax.servlet.*;
    import javax.servlet.http.*;
    * class to promt for the year of birth
    * and calculate the age.
    * @author Vipul Patel [email protected]
    public class AgeServlet extends HttpServlet {
    * method to call doPost
    * @param request
    * @param response
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    doPost(request, response);
    * method to call calculateAge
    * @param request
    * @param response
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    getAge(request, response);
    * method for display html form for get year
    * and calculate the age
    * @param request
    * @param response
    public void getAge(HttpServletRequest request,
    HttpServletResponse response) {
    response.setContentType("text/html");
    PrintWriter out = null;
    try {
    out = response.getWriter();
    } catch(IOException ex) {
    ex.printStackTrace();
    String age = calculateAge(request, response);
    // create and send html form to user
    out.println("<html>");
    out.println("<body>");
    out.println("<title>Age calculation</title>");
    out.println("<form action=\"/servlets/AgeServlet\" method=get>");
    out.println(age + "<br>");
    out.println("Enter the Year of Birth<input type=\"text\" name=ageyear><br>");
    out.println("<input type=submit value=submit>");
    out.println("<input type=\"reset\" value=\"reset\">");
    out.println(" </form>");
    out.println("</body>");
    out.println("</html> ");
    * calculate the age
    * @param request
    * @param response
    * @return age
    public String calculateAge(HttpServletRequest request,
    HttpServletResponse response) {
    String age= "";
    String year="";
    int curr_year;
    int count_year = 0;
    year = request.getParameter("ageyear");
    Date date = new Date();
    String today_date = date.toString();
    today_date = today_date.substring(24,29);
    curr_year = Integer.parseInt(today_date);
    if((year != null) && (!year.equals("")) ) {
    int get_year = Integer.parseInt(year);
    if(get_year > curr_year) {
    age = "You enterd wrong entry!!!!!";
    } else {
    for (int i=get_year; i<=curr_year; i++) {
    count_year++;
    age ="Your age is: " + String.valueOf(count_year);
    } else {
    age = "Enter the year of Birth";
    return age;
    Thank you very much!!
    Vipul Patel
    null

    Hi
    Now i changed my code and it display my contents on broweser. But when i submit the form i cannot able to forward my request to same page. Any suggestion please.
    Thanks.
    changed code
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import oracle.portal.provider.v1.*;
    import oracle.portal.provider.v1.http.*;
    public class AgeServlet extends HttpServlet {
    * Initialize global variables
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    * Process the HTTP Post request
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
    IOException {
    doGet(request,response);
    * Get Servlet information
    * @return java.lang.String
    public String getServletInfo() {
    return "AgeServlet Information";
    * Process the HTTP Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
    IOException {
    PortletRenderRequest pr = (PortletRenderRequest)request.getAttribute(HttpProvider.PORTLET_RENDER_REQUEST);
    try {
    renderShow(pr);
    } catch (Exception e) {
    private void renderShow(PortletRenderRequest pr)
    throws PortletException {
    try {
    /*HttpServletRequest request = (HttpServletRequest)
    pr.getAttribute(HttpProvider.SERVLET_REQUEST);
    HttpServletResponse response = (HttpServletResponse)
    pr.getAttribute(HttpProvider.SERVLET_RESPONSE); */
    PrintWriter out = pr.getWriter();
    pr.setContentType("text/html; charset=WINDOWS-1252");
    pr.setContentType("text/html");
    //PrintWriter out = response.getWriter();
    // create and send html form to user
    out.println("<html>");
    out.println("<body>");
    out.println("<title>Age calculation</title>");
    out.println("<form method=\"POST\" action=\""+HttpPortletRendererUtil.htmlFormActionLink(pr,PortletRendererUtil.PAGE_LINK) +"\">");
    HttpPortletRendererUtil.htmlFormHiddenFields(pr,PortletRendererUtil.PAGE_LINK);
    String ageParam = HttpPortletRendererUtil.portletParameter(pr, "ageyear");
    String submitParam = HttpPortletRendererUtil.portletParameter(pr, "mySubmit");
    out.println("Enter the Year of Birth<input type=\"text\" name=\" + ageParam + \"><br>");
    out.println("<input type=\"submit\" name=\" + submitParam + \" value=\"submit\">");
    out.println(" </form>");
    out.println("</body>");
    out.println("</html> ");
    if (pr.getParameter(submitParam) != null ) {
    out.println("You are "+ calculateAge(pr,out));
    } catch (Exception e) {
    * calculate the age
    * @param request
    * @param response
    * @return age
    public String calculateAge(PortletRenderRequest pr, PrintWriter out) {
    String age= "";
    String year="";
    int curr_year;
    int count_year = 0;
    year = pr.getParameter("ageParam");
    Calendar rightNow = Calendar.getInstance();
    curr_year = rightNow.get(Calendar.YEAR);
    if((year != null) && (!year.equals(""))) {
    int get_year = Integer.parseInt(year);
    if(get_year > curr_year) {
    age = "You enterd wrong entry!!!!!";
    } else {
    count_year = curr_year - get_year;
    age = String.valueOf(count_year);
    } else {
    age = "Enter the year of Birth";
    return age;
    Error message
    Wed, 08 Aug 2001 00:04:55 GMT
    No DAD configuration Found
    DAD name:
    PROCEDURE : !null.wwpob_page.show
    URL : http://ntserver:80/pls/null/!null.wwpob_page.show?_pageid=null
    PARAMETERS :
    ===========
    ENVIRONMENT:
    ============
    PLSQL_GATEWAY=WebDb
    GATEWAY_IVERSION=2
    SERVER_SOFTWARE=Oracle HTTP Server Powered by Apache/1.3.12 (Win32) ApacheJServ/1.1 mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.24
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_PORT=80
    SERVER_NAME=ntserver
    REQUEST_METHOD=POST
    QUERY_STRING=_pageid=null
    PATH_INFO=/null/!null.wwpob_page.show
    SCRIPT_NAME=/pls
    REMOTE_HOST=
    REMOTE_ADDR=172.16.0.27
    SERVER_P ROTOCOL=HTTP/1.1
    REQUEST_PROTOCOL=HTTP
    REMOTE_USER=
    HTTP_CONTENT_LENGTH=52
    HTTP_CONTENT_TYPE=application/x-www-form-urlencoded
    HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) RPT-HTTPClient/0.3-2S
    HTTP_HOST=ntserver
    HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
    HTTP_ACCEPT_ENCODING=gzip, deflate, x-gzip, compress, x-compress
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_ACCEPT_CHARSET=
    HTTP_COOKIE=portal30=3.0,en,us,AMERICA,7044103775205D94AE891C2EB8EC88ECB9671CC56E5524FFBAE3419299B938639A5159BD1DF60D6A57362DA77173DED757521073FAB521072C6E83A9EDD32D5DD1E3859A48A75
    9C1537468FDD6B2AF6C36692DA501614F9B;
    portal30_sso=3.0,en,us,AMERICA,C62FD25D23E9A2D66948EDCD463B2CCD50050AD8D02B7EF55A61DBC14E253387C44B1A5D9668CC141CE38DD4455FEF3D28188817CC1678D8F0C1F642C95CB0E34406EFC41D4A36E1A2915
    182A5FC121377E258FA76480763
    Authorization=
    HTTP_IF_MODIFIED_SINCE=
    HTTP_REFERER=
    null

  • Supressing Portlet Header programatically

    All,
    I need to supress the Portlet header. I would like to do this without using the customize tab. The API says that the portlet_runtime_record has the has_title_region attribute. How can I set this value to false, so that the header is suppressed automatically.
    Rgds
    Sanjay

    That's right because you have multiple provider instances deployed. Each provider has its provider.xml for its configuration. To locate the appropriate provider.xml you need to identify the provider instance. For instance if you use the JPDK sample provider in your portal installation (http://host:port/jpdk/providers sample) then the location of the provider.xml will be $ORACLE_HOME/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/providers/sample.
    Note that the location of the provider.xml within the deployed provider application is defined in the sample.properties located in $ORACLE_HOME/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/deployment.
    You now have access to the provider settings and you can set the renderer for each portlet of the provider individually. By default the standard portlet renderer class is used. You need to write you own renderer class. For more information about portlet development you need to look at the documentation. Starting point is http://www.oracle.com/technology/products/ias/portal/index.html

  • JPDK June - Portlet customization sample question

    Hi,
    I was wondering whether someone could help me out with the customization sample provided in the JPDK distribution of June.
    Since BaseCustomization usage is deprecated I'm trying to use subclass the 'NameValuePersonalizationObject' class. However until now I've not been able to change title nor (default) message of the portlet. What am I doing wrong?
    Thx.

    Jan,
    I need a few more details here! Do you mean that you have created your own portlet and are having trouble implementing customization?
    Please repost with a few more details, include your usage of NameValuePersonalizationObject and the context in which you are using it.
    Regards,
    Gareth

  • JPDK - Unable to see Sample provider in repository - getting Error

    I have been trying to intall the sample provider as outlined in
    the document "Installing the PDK-Java Framework and Samples".
    Everything works fine except that I am unable to see the
    provider in the repository...even after I refresh the repository
    or restart the server. I see the following error when I click
    the Refresh Error link in the Portlet Repository;
    wwpro_api_provider.get_portlet_list 09-OCT-2001
    PROVIDER[1097547]: SampleWebProvider
    LANGUAGE: us ERROR: HTTP_PROV_EXEC_EXCEPTION
    I am able to see the test page fine and don't have a problem
    registering the provider, it just doesn't show up in the
    repository and I cannot add the provider to a page.
    Has anyone encountered this problem?
    Were you able to solve it?
    Any ideas on how I might fix this problem?

    Hi , me too I have the same problem.
    I cannot see the sample portlets in the portlet repository , after I have succesfully registered the provider , in the "administer" tab of Portal.
    If I click the refresh error , I see this error : wwpro_api_provider.get_portlet_list 12-SEP-02 PROVIDER[208]: JSP_esempio LANGUAGE: us ERROR: HTTP_PROV_EXEC_EXCEPTION
    My jserv.log says :
    [12/09/2002 13:59:39:007 GMT+02:00] sample/DefaultProvider.getPortlets() - ProviderId = -1
    [12/09/2002 13:59:39:007 GMT+02:00] sample/ - start index = 0
    [12/09/2002 13:59:39:007 GMT+02:00] sample/ - count = 99
    [12/09/2002 13:59:39:007 GMT+02:00] sample/ - byUser = false
    [12/09/2002 13:59:39:007 GMT+02:00] sample/ - No User Specified
    [12/09/2002 13:59:39:007 GMT+02:00] sample/DefaultProvider.getPortlets() - returning 14 of 14 portlets
    It sounds good :-)
    jserv_mod.log doesnt give errors.
    My environment is:
    9iAS : 1.0.2.2.2
    Portal : 3.0.9
    JPDK : 3.0.9.0.7.
    Any suggestions ?????
    Please help me !
    Max

Maybe you are looking for

  • Use of procedure in function

    Hi, Can we use Procedure in Function? Please elaborate with answers. Thanks, Sid

  • Webi open by default not at 100%

    Hi all, Some users are asking me if it's possible to configure one report (webi) in a way that when it's open, it's visualized not in real size (100%) but smaller as it's a bit too big. Do you know if it's possible to do it? Is that a configuration w

  • CC causes black screen with cursor

    Quite a number of people, including me, are noting that when the Creative Cloud app is active and showing in the menu bar, when my rMBP goes to sleep, and I try to resume immediately, for 5-8 seconds I get a black screen with cursor.  If I close down

  • Every time i log on to my computer i get an error message MSVCR.dll

    itunes wont open and i dont want to lose all the music his happen after a recent failed update can any  thoughts

  • Performance Management in three Different Languages

    Hello Gurus,        My client wants to implement Performance appraisals in three different languages, English, German and Japanies. As for as I know we can set blank in JCO  language setting so employees in German and Japan can use their own language