Topic
4 replies Latest Post - ‏2013-01-22T14:38:52Z by gas
GKDV
GKDV
3 Posts
ACCEPTED ANSWER

Pinned topic Accessing servlet from a Portal link

‏2013-01-22T06:31:36Z |
Hi,

I have seen an issue on clicking a link on a Portal 7 page which will call a servlet and after doing some logging will return to the page as required.

I am deploying my servlet on IBM Admin console an giving the context root as : /sdpredirectexternallinks

and when i am hitting my servlet on url :

http://10.24.61.40:10000/sdpredirectexternallinks/RedirectToExternalLinks

it will print the required message.

But when i am hitting the servlet using the portal link it is throwing some error as shown below:

*SRVE0255E: A WebGroup/Virtual Host to handle /sdpredirectexternallinks/RedirectToExternalLinks has not been defined.

SRVE0255E: A WebGroup/Virtual Host to handle my_host_name:10039 has not been defined.

IBM WebSphere Application Server*
My host alaises on default_host is attached

Can anyone figure it out what is the problem ???

Thanks & Regards
GKDV
Updated on 2013-01-22T14:38:52Z at 2013-01-22T14:38:52Z by gas
  • GKDV
    GKDV
    3 Posts
    ACCEPTED ANSWER

    Re: Accessing servlet from a Portal link

    ‏2013-01-22T06:41:57Z  in response to GKDV
    Adding to my question...
    I am hitting the portal on url :

    http://bharti-9d671eef.in.ibm.com:10039/wps/portal

    then any link on the portal page and also in coding perspective have configured the code for the calling servlet.

    For example i am hitting on the url link as follows ::


    <%String hom1=redirectServContext+"/RedirectToExternalLinks?lnkURL="(String)request.getAttribute("tab1link")"&lnkName="(String)request.getAttribute("tab1text")"§ion="+confSectionTabs;
    hom1=URLUtil.encodeURL(hom1);%>
    <%=(String)request.getAttribute("tab1text")%>

    redirectServContext is getting from property file as : /sdpredirectexternallinks

    RedirectToExternalLinks is servlet name
    Is there any port or Server1 issue in my war deployement ???

    Thanks & Regards
    GKDV
  • gas
    gas
    681 Posts
    ACCEPTED ANSWER

    Re: Accessing servlet from a Portal link

    ‏2013-01-22T08:58:00Z  in response to GKDV
    Hi,

    It looks like you deployed your servlet to the 'server1' application server, not the 'WebSphere_Portal' server.
    So the servlet is available via port 10000 (probably http default transport on server1:
    http://10.24.61.40:10000/sdpredirectexternallinks/RedirectToExternalLinks

    and it is not available on teh Portal server.

    Go to the admin console > Applications > yourApp.
    Select Manage modules, and map your web module to the Portal server instead of server1.
    Restart application.
    • GKDV
      GKDV
      3 Posts
      ACCEPTED ANSWER

      Re: Accessing servlet from a Portal link

      ‏2013-01-22T13:49:02Z  in response to gas
      Hi,

      I had already done that work also.

      I mapped my servlet to WebSphere_Portal, save the changes and when going start the application error message shows as follows :

      My_Servlet_Name will not be started because it is installed on different server
      • gas
        gas
        681 Posts
        ACCEPTED ANSWER

        Re: Accessing servlet from a Portal link

        ‏2013-01-22T14:38:52Z  in response to GKDV
        I dont understand this:
        "My_Servlet_Name will not be started because it is installed on different server"

        Maybe you are connected to the wrong admin console?
        You either need to restart WebSphere_Portal server after that change, or connect to admin console on Portal server (check WC_defaulthost_secure port), not on the server1.
        You cannot start/stop applications deployed on other server, unless you work in ND environment and have the deployment manager and node agents.

        The easiest will be restart WebSphere_Portal.