dcsimg
Rendering Javascript using html:rewrite tag
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aarti_Ekbote
Posted On:   Tuesday, October 16, 2007 06:05 PM

In my application, on clicking "Print" link, I want a person's record to be displayed in a new window. In JSP I have a href: javascript:doPrint( property="candidateid"/>) & my javascript is : function doPrint(aID) { aBase = ' ' doOpenRemote(aBase,'?candidateid=' + aID, 'View', '*', '600', 'scrollbars', 'form'); } function doOpenRemote() is another javascript to open a new window. in struts-config.xml: forward name="printID" path="/Print" /> and action mapping as: type="org.theclass.candidate.view.GetCandidateAction"    More>>

In my application, on clicking "Print" link, I want a person's record to be displayed in a new window.

			
In JSP I have a href:

javascript:doPrint(
property="candidateid"/>)


& my javascript is :

function doPrint(aID)
{
aBase = ' '
doOpenRemote(aBase,'?candidateid=' + aID, 'View', '*', '600', 'scrollbars', 'form');
}

function doOpenRemote() is another javascript to open a new window.

in struts-config.xml:

forward name="printID" path="/Print" />


and action mapping as:


type="org.theclass.candidate.view.GetCandidateAction"
name="candidateForm"
scope="request"
validate="false"







But i get the following exception:
javax.servlet.ServletException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForward named printID




i have followed the steps mentioned in "Struts in Action" book.
Can somebody help me please?

   <<Less

Re: Rendering Javascript using html:rewrite tag

Posted By:   Aarti_Ekbote  
Posted On:   Wednesday, October 17, 2007 01:12 PM

I fixed the problem.


previously in my jsp i had

now i replaced it with:





I dont get that error anymore.
About | Sitemap | Contact