|
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
|
|
|
| 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.
| |
|
| 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!
| |
|
| 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).
|
|
|
|
|