WebSphere Portal Server - added Servlet config to web.xml, but still not working

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > June 2007 > added Servlet config to web.xml, but still not working





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author added Servlet config to web.xml, but still not working

2007-06-20, 1:24 am

I want to call a Servlet from my portlet.

1. I created the class com.flowserve.fpd.gid.portal.servlet.Downloader

2. I edited web.xml:

<servlet>
<servlet-name>downloader</servlet-name> <servlet-class>com.flowserve.fpd.gid.portal.servlet.Downloader</servlet-class>
</servlet>

...............

<servlet-mapping>
<servlet-name>downloader</servlet-name>
<url-pattern>/downloader</url-pattern>
</servlet-mapping>

3. I restarted Portal Server and hit the servlet with this url:
/.Portlet/downloader

(works fine.)

This works on my desktop, but not on the test server. The only difference I see is thae test server uses a different context, like this:

/wps/PA_iizxnh2/downloader

I also tried:
/wps/downloader

Any ideas why this new Servlet is not working?

I appreciate your help.

2007-06-20, 7:32 pm

Hey guys, to clarify,

When I created this new Servlet, I DID not re-deploy the war file. I simply did this:

1. Stopped the server.
2. Edited web.xml with the servlet mappings (above).
3. Uploaded the new Servlet class file to the server.
4. Started the server.

Do I need to actually re-deploy this war before it will see this new Servlet?

Any ideas would be helpful!


2007-06-28, 1:28 pm

Redeploying will be recommended. The first part of the url is dynamic (portlet context) and should be generated by a snippet (depending on your framework).

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com