Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
JSP Problem
coltrane30
Im using Teamsite 6.5
Windows
i have a cgi callout in a DCT that i need to call a jsp.
This jsp is located in a callout directory on the server where other jsps live that are called by other DCTs and function properly.
The jsp connects to a db and builds a list of options and displays them in html.
I get no errors but when i click my button in the DCT nothing happens. Ive tried many different ways
but cant seem to get the DCT's cgi button to get ahold of this jsp.
The jsp defintely has been tested and does work.
heres a piece of code to go by:
<substitution>
<script><![CDATA[
function init()
{
IWEventRegistry.addItemHandler("/myButton", "onCallout", fetchJSP);
}
function fetchJSP()
{
var url="/iw-cc/formspub/callout/query23.jsp";
IWDatacapture.callServer(url);
}
init();
]]></script>
<item name="myButton">
<hidden>
<cgi-callout label="Click Here"/>
</hidden>
</item>
</substitution>
Thanks in advance.
-newbie
Find more posts tagged with
Comments
coltrane30
Little help anyone????????
mgal
Not sure if this is the issue but
can you try specifying the absolute URL and try ?
http://servername/iw-cc/...jsp
Hope this helps
Mohammed Gazal.
Nicholas
Can't you do the whole stuff in Perl rather using JSP. Would be easier to handle the situation.
Just a thought.
-- Nicholas
coltrane30
i tried the absolute path before and that didnt work.
i would use perl but i was instructed to use a jsp. im an intern so i do what im told you know.
but i will mention that to my super about the perl idea i will be meeting with him today
and hopefully he can shed some light on the subject. the funny thing is tho is that they have
other jsp's on this working in the same fashion. but if theres and other suggestions please tell them
to me im all ears. Thanks very much
Johnny
Firstly.. please choose an appropriate forum. This belongs in the templating forum.
A few things:
I'm totally confused as you mention callouts and I see a callServer formapi method. They perform two different actions and do not work with each other.
Are you trying to display a window to the user (callout) or are you trying to update the form in some manner in the background (callServer)? If your JSP is to display a page to the user, the callServer is not intended to do that.
Your JSP is in an unsupported location
/iw-cc/formspub/ is not for customer use.
If you wish to create servlets/jsps in a supported form, you need to use the UI toolkit.
I also see substitution tags in your sample DCT - have you posted the full DCT or is this the output of an inline command (which the subsitution tag suggests) - try posting the full set.
I would have a good read of the templating guide and the UI customization guide, before you attempt this again as it seems you are missing a few basic principles. If you still choose Java for this component, I would follow the standard process of separation with the logic built into a servlet and the display in a JSP, rather than embedding both into a JSP.
Best of luck.
John Cuiuli