jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Can I submit a string to a servlet from VBScript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Can I submit a string to a servlet from VBScript?" Watch "Can I submit a string to a servlet from VBScript?" New topic
Author

Can I submit a string to a servlet from VBScript?

Mark Lau
Ranch Hand

Joined: Dec 15, 2001
Posts: 120
Hi!
In a HTML (or JSP) file, I have a segment of VBScript code that generates a PKCS10 request
(i.e., a public key certificate request).
The following line of the VBScript code generates the PKCS10 request.
strReq = Enroll.createPKCS10( strDN, "1.3.6.1.4.1.311.2.1.21")
Now, I want to submit the string strReq to /x509/servlet/PKCS10Handler, which is a servlet on
my server. Can I call the VBScript submit function of the Request object like this the
following, assuming everything is well-defined?
nDisp = Request.Submit( CR_IN_BASE64 OR CR_IN_PKCS10, _
strReq, _
"", _
"/x509/servlet/PKCS10Handler")
Please kindly educate.
Gene
Mark Lau
Ranch Hand

Joined: Dec 15, 2001
Posts: 120
Nobody knows anything about this?
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

I'm not quite clear on what you want to accomplish here.
I assume the code you showed with a Request object(?) is not in a JSP script but is part of your VBScript. I am not familiar with VBScript so I can only assume that the code is submitting a request to the specified URL, equivalent to the the JavaScript document.form.submit(). This is fine, I guess, as long as the target servlet can process the request. That is, the request should have the parameters that the servlet expects.


Junilu - [How to Ask Questions] [How to Answer Questions]
Mark Lau
Ranch Hand

Joined: Dec 15, 2001
Posts: 120
Thanks, Junilu,
Please read the following and note that all codes are in VBScript.
The following is a VBScript example given at MSDN.


This example shows how to submit a string strReq to the server at
Machine\CertAuth, right?

Now, I use Tomcat 4.1.18 as my webserver, and I have a Java Servlet to
handle this string strReq.

Will I be able to submit this string to the servlet called ReqHandler like this?


or like so? :


I tried both of these with the following VBScript code:



and I get a VBScript pop-up window which says:

Error in Request Submit 2147023174

I don't understand that error number, thus have no clue where I went wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I submit a string to a servlet from VBScript?
 
Similar Threads
Can I get a VBScript generated value in my JSP code?
How to indentify Double byte or single byte from the request
Weblogic9.2 servicegen problem
Wierd problem
Wierd problem