Hi Falks,
Can somebody help me to do a server side forward from servlet to a jsp/xhtml.
When I do req.getRequestDispatcher(/xforms-jsp/my.jsp).forward(req,res); the xfroms elemets not rendered.
Please help me,
-- Chaminda Amarasinghe, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi chaminda, You need to add
<dispatcher> tags to the <filter-mapping> tags in your web.xml to
make dispatchers also use the filters: <filter-mapping>
<filter-name>ops-xforms-filter</filter-name>
<url-pattern>/xforms-jsp/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping> <filter-mapping>
<filter-name>ops-xforms-filter</filter-name>
<url-pattern>/ops/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping> Note that you need servlets
2.4 for this: <web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"> Hope this helps, Gerrit From: Chaminda
Amarasinghe [mailto:[hidden email]] Hi Falks, Can somebody help me to do a server side forward from servlet to a
jsp/xhtml. When I do
req.getRequestDispatcher(/xforms-jsp/my.jsp).forward(req,res); the xfroms
elemets not rendered. Please help me, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Thanks lot Gerrit,
Many Thanks for the replly, Il try..
On 11/21/07, Gerrit Germis <[hidden email]> wrote:
-- Chaminda Amarasinghe, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Gerrit,
Still the i couldnt find success :(
Can you check my code. Only 2 servlets 2 jsps... I have attached complete war and context config file for your easyness.. Just cheange the docBase in my-app.xml as required.
Thanks for your help,
Chami
On 11/21/07, Chaminda Amarasinghe <[hidden email]> wrote:
-- Chaminda Amarasinghe, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Chaminda
Hi Chaminda, Attached, you can
find a sample .war I threw together.. there’s only 1 servlet
(someAction.do) which forwards to /xforms-jsp/index.xhtml to process a form
with ops. Note that my ops is deployed at ‘/ops’, not ‘/ops-nightly’,
so be sure to change that in the web.xml To test, simply
navigate to: http://localhost:8080/my-app/someAction.do , it should show the Xform. (the reason I say “should”
is that ops sometimes throws a fit for some reason and shows an error page, but
refreshing and clearing the cache helps when that happens. Haven’t
checked yet why it does that, so if you find out, by all means, please do share
;)) Hope this helps, Gerrit From: Chaminda
Amarasinghe [mailto:[hidden email]] Hi Gerrit, Still the i couldnt find success :( Can you check my code. Only 2 servlets 2 jsps... I have attached
complete war and context config file for your easyness.. Just cheange the
docBase in my-app.xml as required. Thanks for your help, Chami On 11/21/07, Chaminda
Amarasinghe <[hidden email]>
wrote: Thanks lot Gerrit, Many Thanks for the replly, Il try.. On 11/21/07, Gerrit
Germis <[hidden email]> wrote:
--
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws my-app.war (11K) Download Attachment |
Hi Gerrit,
Thanks lot for you kind help,
I'l try and let you know.
On 11/22/07, Gerrit Germis <[hidden email]> wrote:
-- Chaminda Amarasinghe, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |