• Post Reply Bookmark Topic Watch Topic
  • New Topic

Conversion configuration objects from ASP to JSP  RSS feed

 
Rams kuwait
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have a problem with conversion configuration objects from ASP to JSP.

My tasks are
1.Create a html file with some fields.
2.Get the values from above html file and then send to "PR@XYZ.Com" Url.
3.When the user click on submit button of above html file ,it sholud display Thanq.html file contents but the values should reach to the above URL.

How we can send the values to above URL.

This is the ASP code to convert into JSP program.

<%
Dim myMail
Dim Conf
<!-- Getting the CDO message object -->
Set myMail = CreateObject("CDO.Message")

<!-- Getting the CDO Configuration object -->
Set Conf = CreateObject("CDO.Configuration")

<!-- Setting SMTP server name etc to configuration object -->
response.write("xxx");
With Conf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="192.100.100.200"
.Update
End With

<!-- Setting configuration values to my mail object -->
Set myMail.Configuration = Conf

<!-- Getting values from html submited html form-->
fdate=Request.form("fdate")
fday=Request.form("fday")
ftime=Request.form("ftime")
brand=Request.form("brand")
problem=Request.form("problem")
company=Request.form("company")
roomno=Request.form("roomno")
department=Request.form("department")
section=Request.form("section")
uname=Request.form("uname")
tel=Request.form("tel")

myMail.To = "PR@XYZ.COM"
myMail.From = email
myMail.Subject = "Service Form Details"

mytable="<table border='0' ><tr><td ><strong> INFORMATION FROM SERVICE FORM</strong></td></tr><tr><td >
</td><tr><td ><table border='0' id='table1' ><tr><td >

<strong>Date</strong>

</td><td class='smallbold'>"&fdate&"</td></tr>"

mytable=mytable& "<tr><td ><strong>Day</strong></td><td class='smallbold'>"&fday&"</td></tr>"

mytable=mytable& "<tr><td ><strong>Time</strong></td><td class='smallbold'>"&ftime&"</td></tr>"


mytable=mytable& "<tr><td class='smallbold'>
</td></tr><tr><td ><strong>Problem Description</strong></td><td>"

mytable=mytable& "<tr><td ><strong>Brand/SW</strong></td><td class='smallbold'>"&brand&"</td></tr>"


str=""
options=Request.Form("options")

opt=split(options,",")

for i=0 to ubound(opt)
str=str& opt(i)
if i <> ubound(opt) then
str=str& "
"
end if
Next

mytable=mytable& str

mytable=mytable& "<tr><td ><strong>Type of problem</strong></td><td class='smallbold'>"&problem&"</td></tr>"

mytable=mytable& "
</td></tr><tr><td class='smallbold'>
</td></tr><tr><td ><strong>User Information</strong></td><td>"

mytable=mytable& "<tr><td ><strong>Company/Ministry</strong></td><td class='smallbold'>"&company&"</td></tr>"
mytable=mytable& "<tr><td ><strong>Room No</strong></td><td class='smallbold'>"&roomno&"</td></tr>"
mytable=mytable& "<tr><td ><strong>Department</strong></td><td class='smallbold'>"&department&"</td></tr>"
mytable=mytable& "<tr><td ><strong>Section</strong></td><td class='smallbold'>"§ion&"</td></tr>"
mytable=mytable& "<tr><td ><strong>User Name</strong></td><td class='smallbold'>"&uname&"</td></tr>"
mytable=mytable& "<tr><td ><strong>Telephone No</strong></td><td class='smallbold'>"&tel&"</td></tr>"







mytable=mytable& "
</td></tr><tr><td class='smallbold'>
</td></tr></table></td></tr></table>"

myMail.HTMLBody=mytable

myMail.Send

set myMail = nothing
set Conf = nothing
if err Then
Response.Write err.Description %>
XYZ CO.
<%Else
Response.Redirect "thankq.html"
End if%>


If you provide JSP code of the above program i'll be very thankfull to you.

Thanks & Regards
Rams
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37252
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rams kuwait wrote:If you provide JSP code of the above program i'll be very thankfull to you.

Nobody is going to write the code for you. What part of it do you specifically have a question about?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!