• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Conversion configuration objects from ASP to JSP

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41093
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Normally trees don't drive trucks. Does this tiny ad have a license?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic