Help on Java to ASP page
I have written a zip function that it's used on an ASP page. The java class has a main static function which is as follows:
public static void main(String[] args) inside the main function I have calls to other functions which will perform the zipping of a directory. Moreover, since main is STATIC, i am forced to declared all of the other functions STATIC as well.
How do I make reference to the main functions from ASP?
Currently I have:
Set objZip = GetObject("java:ZipDirectory") I've tried objZip.main "pathToDIrectory" , which does not work. I've also tried to move all of the functionalities of main into a new function (Start) , once I call start
objZip.Start "pathToDIrectory" I keep getting an error, Could it be that since the zip functions written recursively and the static declarations could cause the browser to give out errors.
Please HELP .....
Thanks
Jorge
You can execute a command line program from an ASP but you have to write a VB COM object to do it. At least that is the only way I was able to do it.
I think that you may have to make your Java object a COM object in order to access it from ASP. I have heard that this can be done and you may even be doing it. But I have never seen it done nor done it myself.
However, this post begs me to ask the question. Why are you using ASP and not JSP? I have not done a lot of JSP but I would think that this would be very very easy to do that way. If you have to use ASP, then why Java, why not use VB? VB and ASP are very easy to work together as are Java and JSP. If you have no reason to mix them, then don't.
Stephan
Similar Messages
-
Urgent help(xml, java and asp)
Hi all,
I,m new with XML and i have to convert a VB application that connects to an ASP using Microsoft XML and I need to know if I can connect from a java application to an ASP using XML for transfering the infornation.
In the ASP side it uses DOM, and I would like not to touch the ASP and create a new application with java and get rid of the VB applicationDrClap what I have in the VB side is this:
Private Function SetBalanceForReal(Amount As Currency, Action As String) As Boolean
On Error GoTo ehSetBalance
Dim ohttp As New MSXML.XMLHTTPRequest
Dim oResponseXML As New MSXML.DOMDocument
Dim oDoc As New MSXML.XMLDSOControl
Dim oElement As MSXML.IXMLDOMElement
Dim oNode As MSXML.IXMLDOMNode
ohttp.open "POST", ServerUrl & "ActualizaBalance.asp", False
Set oElement = oDoc.XMLDocument.createElement("ActualizaBalance")
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Client", ""))
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Action", ""))
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Amount", ""))
oElement.childNodes.Item(0).Text = Trim(ClientLogin)
oElement.childNodes.Item(1).Text = Action
oElement.childNodes.Item(2).Text = Amount
ohttp.send (oElement.xml)
oResponseXML.loadXML (ohttp.responseText)
If oResponseXML.documentElement.childNodes.Item(1).Text = "OK" Then
Available = oResponseXML.documentElement.childNodes.Item(0).Text
Else
Available = 0
End If
Set ohttp = Nothing
Set oResponseXML = Nothing
Set oDoc = Nothing
Set oElement = Nothing
Set oNode = Nothing
SetBalanceForReal = True
Exit Function
ehSetBalance:
Set oNode = Nothing
Set oElement = Nothing
Set oDoc = Nothing
Set oResponseXML = Nothing
Set ohttp = Nothing
Available = 0
SetBalanceForReal = False
End Function
Public Function GetConsecutive(Game As String) As Boolean
On Error GoTo ehGetConsecutive
Dim ohttp As New MSXML.XMLHTTPRequest
Dim oResponseXML As New MSXML.DOMDocument
Dim oDoc As New MSXML.XMLDSOControl
Dim oElement As MSXML.IXMLDOMElement
Dim oNode As MSXML.IXMLDOMNode
ohttp.open "POST", ServerUrl & "ObtieneConsecutivo.asp", False
Set oElement = oDoc.XMLDocument.createElement("ObtieneConsecutivo")
Set oNode = oElement.appendChild(oDoc.XMLDocument.createNode(1, "Game", ""))
oElement.childNodes.Item(0).Text = Game
ohttp.send (oElement.xml)
oResponseXML.loadXML (ohttp.responseText)
Consecutive = oResponseXML.documentElement.childNodes.Item(0).Text
Set ohttp = Nothing
Set oResponseXML = Nothing
Set oDoc = Nothing
Set oElement = Nothing
Set oNode = Nothing
GetConsecutive = True
Exit Function
ehGetConsecutive:
Set oNode = Nothing
Set oElement = Nothing
Set oDoc = Nothing
Set oResponseXML = Nothing
Set ohttp = Nothing
Consecutive = 0
GetConsecutive = False
End Function
and the ASP code is this:
<%@LANGUAGE=VBScript%>
<%
'Variables Simples
Dim Cliente
Dim Accion
Dim Monto
'Variables Complejas
Dim oClienteBD
Dim oClienteInfoXML
Dim oDoc
Dim oElemento
Dim oNode
'Inicializacion de Variables Complejas
Set oClienteBD = Server.CreateObject("Casino_Clases.CClient")
Set oClientInfoXML = Server.CreateObject("MSXML.DOMDocument")
Set oDoc = Server.CreateObject("MSXML2.DSOControl")
oClientInfoXML.async=false
oClientInfoXML.load(Request)
Cliente = oClientInfoXML.documentElement.childNodes.item(0).text
Accion = oClientInfoXML.documentElement.childNodes.item(1).text
Monto = oClientInfoXML.documentElement.childNodes.item(2).text
Set oElemento = oDoc.XMLDocument.createElement("Resultado")
Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "AVAILABLE",""))
Set oNode = oElemento.appendChild(oDoc.XMLDocument.createNode(1, "ESTADO",""))
If oClienteBD.UpdateBalance(Cliente, Accion, Monto) = True Then
If oClienteBD.GetClientBalance(Cliente) = True Then
oElemento.childNodes.Item(0).Text = oClienteBD.Available
oElemento.childNodes.Item(1).Text = "OK"
else
oElemento.childNodes.Item(0).Text = 0
oElemento.childNodes.Item(1).Text = "BAD"
end If
else
oElemento.childNodes.Item(0).Text = 0
oElemento.childNodes.Item(1).Text = "BAD"
end If
Response.Write(oElemento.xml)
Set oClientInfoXML = Nothing
Set oDoc = Nothing
Set oClienteBD = Nothing
Set oNode = Nothing
Set oElemento = Nothing
%>
What I need to do is to change the VB part for a Java application and basicly, I don't know what Class of Java I have to use to connect to the ASP.
If you were so kind of giving me an example to do this I will appreciate it.
Ocorella -
Using Two asp Page into Master-Page
Hi All,
I Have Master-Page and I want tow assign two Different Asp Page into the "div" tag in master Page , however
I have different "div" tag in my master-Page , and I focus Assign in one "Div" the Home-page by suing "ContentplaceHolder",
and i Assign to another "div" different asp page using "Contentplaceholder" , but when i assign the second asp page to the "div" it give me
nothing on that "div", while the "div" which i assign the Home-page it works fine.
I just think that the Master-page already know the Home-page by setting it as "Home-Page" while the other page is do nothing.
So could you please help to assign different asp page to different "div" in master Page.
thanks all .Hi,
According to your description, my understanding is that you want to insert two asp pages to mater page in SharePoint 2010.
You can use <!– #include file=”[filename].aspx” –> to include the pages in the master page.
More information are provided in the link below:
http://triaslama.wordpress.com/2008/11/19/how-to-include-file-in-aspnet-pages/
I recommend to use User Controls to include the asp pages in master page.
http://blog-sharepoint.blogspot.com/2011/10/sharepoint-2010-add-user-control-to.html
http://pankaj-sharepoint2010part12.blogspot.com/2011/10/add-custom-user-control-to-sharepoint.html
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Running a java program from a .asp page
i'm looking for someone in the community that knows how to run a java program
on a web server ( not an applet) from a asp page. The server as IIS 5 and the jre1.3.1
any help or tips would be welcomedThe following site explains in detail how you have to do it. I have done it and it works fine.
If u still have problems, contact me at [email protected]
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q167941 -
My company uses ASP pages calling java objects ( do not ask me why). Now we have an issue about passing the http requests into the java objects.
You know in asp pages you can Server.createObject(MyClass), and then in MyClass.java, we uses com.ms.iis.asp.Request as the wrapper of Http request.
Here I have two questions:
1)Where the heck can I find the API documents about those Microsoft JRE classes? Could not find it anywhere myself.
2) I used in getQueryString().getString(param_name) in com.ms.iis.asp.Request , as suggested in http://www.javaworld.com/javaworld/jw-06-2000/jw-0616-iis.html. But I did not get any http request params in my java class. Can someone paste a fragment of working code?
Thanks>
Now I want to write some java class and call in ASP
Page.
Is there any way to achieve my goal.
One I don't want to Install Microsoft's Visual J++ or
Microsoft JVMTo call java program directly in ASP, you have to write some com+ component around Java and call through com component.
To call java program indirectly in ASP, you can put all java code in *.jar file and call it through a batch file in ASP.
Otherwise, just install Tomcat behind IIS and write JSP code and let IIS pass the control to Tomcat if a user request a JSP page. -
Can Java Applet Call the ASP Page
Hi,
I would like to know whether the Java Applet can call the ASP page.
If it can be done, how does the Java Applet get the value from ASP page?
Please provide me some running example.
Thanks.I would like to know whether the Java Applet can
an call the ASP page.Something like:
AppletContext.showDocument(new URL("http://wherever/myPage.asp"), "_blank");
how does the Java Applet get the value from ASP page?What?
Please provide me some running example.Nope. -
Java Crystal Server and ASP pages
Hi
I would like to move away from the RDC period, but our application's web tier is written in ASP
In the near future we will migrate to J2EE applciation, but till than i wanted to migrate reporting mechanism to java server and connect it to ASP pages for view only.
Can you point to me some code examples showing this case ?
thanks a lot !Please re-post if this is still an issue to the OnDemand Forum. You can publish your reports to the WEB for user to view only
-
SOAP Response From ASP Page gives Exceptions-Why ?
Hi Friends,
I am trying to call an ASP Page by sending it a SOAP Request.
The SOAP Request reaches the ASP Page but still i am getting lot of
exceptions.This is my code from Request.java
import javax.xml.soap.*;
import java.util.*;
import java.net.URL;
public class Request {
public static void main(String[] args) {
try {
SOAPConnectionFactory scFactory =
SOAPConnectionFactory.newInstance();
SOAPConnection con = scFactory.createConnection();
MessageFactory factory =
MessageFactory.newInstance();
SOAPMessage message = factory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
SOAPBody body = envelope.getBody();
header.detachNode();
Name bodyName = envelope.createName(
"TestDtls", "m",
"urn:myserver/soap:TestThis");
SOAPBodyElement gltp =
body.addBodyElement(bodyName);
Name name = envelope.createName("PhoneOrigin");
SOAPElement symbol = gltp.addChildElement(name);
symbol.addTextNode("0672324228");
URL endpoint = new URL
("http://john/myservices/testsoap.asp");
message.writeTo(System.out);
SOAPMessage response = con.call(message, endpoint);
response.writeTo(System.out);
SOAPPart sp = response.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPBody sb = se.getBody();
Iterator it = sb.getChildElements(bodyName);
SOAPBodyElement bodyElement =
(SOAPBodyElement)it.next();
String myvalue = bodyElement.getValue();
System.out.print("The Value Retrived is ");
System.out.println(myvalue);
con.close();
} catch (Exception ex) {
System.out.println(ex);
This is what i have in my ASP Page: testsoap.asp
<%
Set objReq = Server.CreateObject("Microsoft.XMLDOM")
objReq.load(Request)
strmycode = "SOAP-ENV:Envelope/SOAP-ENV:Body/m:TestDtls/PhoneOrigin"
varPhoneOrigin=objReq.SelectSingleNode(strmycode).text
status="ok"
strReturn = "<SOAP-ENV:Envelope xmlns:SOAP=""urn:schemas-xmlsoap-org:soap.v1"">" & _
"<SOAP-ENV:Header></SOAP-ENV:Header>" & _
"<SOAP-ENV:Body>" & _
"<m:TestDtlsResponse xmlns:m=""urn:myserver/soap:TestThis"">" & _
"<PhoneStatus>" & Status & "</PhoneStatus>" & _
"</m:TestDtlsResponse>" & _
"</SOAP-ENV:Body>" & _
"</SOAP-ENV:Envelope>"
Response.Write strReturn
%>
The Exceptions i get are as follows:
=====================================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S
OAP-ENV:Body><m:TestDtls xmlns:m="urn:myserver/soap:TestThis"><PhoneOrigin>"0672
324228"</PhoneOrigin></m:TestDtls></SOAP-ENV:Body></SOAP-ENV:Envelope>Jul 11, 20
03 6:37:35 PM com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType
SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a S
OAP message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
Jul 11, 2003 6:37:35 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
SEVERE: SAAJ0535: Unable to internalize message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:2
02)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:te
xt/html. Is this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
... 7 more
CAUSE:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
CAUSE:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
nImpl: Unable to internalize message
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at Request.main(Request.java:34)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize m
essage
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:2
02)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
... 3 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:te
xt/html. Is this an error message instead of a SOAP response?
at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(Messa
geImpl.java:268)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
35)
... 7 more
Actually,i need to see the response in XML format as per my program.
But,What does all this stuff mean ? I have using latest jwsdp 1.2.
Can Anyone Help me on this ?i have the same problem. when i make a test with a VB client, the SOAP message is builded this way "<SOAP.... instead of <SOAP-ENV.... tag generated by java. When a make a test in vb client using this syntax (SOAP-ENV), the asp page returns a error:
<font face="Arial" size=2>
<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a01a8'</font>
<p>
<font face="Arial" size=2>Object required: 'objXMLDOM.selectSingleNode(...)'</font>
<p>
<font face="Arial" size=2>/rcruz/soap/vbSoap/simplesoap.asp</font><font face="Arial" size=2>, line 6</font>
Anyone have a idea???
Thanks -
How to include an ASP page from JSP?
I had a working ASP page to be repeated on each page of the web site as an navigation bar updated from a single SiteMap.xml. Anyone knew how to include the ASP page from the JSP app?
ThanksYou might achieve your desired result by calling the ASP page from your JSP controller (server side) using the standard JAVA HTTP classes you could then process the resulting XML. I suggest you look at the JAVA API for more information in particular the JAVA.NET package and the HTTPUrlConnection class...
http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html
Hope this helps,
BRgds,
Simon -
HttpConnection.POST to an ASP page
First - I'm new to J2ME & I'm a novice to java in general. I'm an ASP programmer & I need to write an app for a nextel phone in J2ME.
I have written a test application that just sends an http request to my asp page and the page should send back the appropriate response to be displayed on the phone, however the asp page does not seem to be receiving the data. However it IS sending back a response. I have tried removing flush() from the dataOutputStream, but that didn't fix the problem. Here is the code inside my MIDlet:
private void loginViaHTTPConnection(String strLogin) throws IOException {
HttpConnection hconn = null;
InputStream is = null;
OutputStream os = null;
StringBuffer data = new StringBuffer();
try {
hconn = (HttpConnection)Connector.open(url);
hconn.setRequestMethod(HttpConnection.POST);
hconn.setRequestProperty("IF-Modified-Since",
"20 Jan 2001 16:19:14 GMT");
hconn.setRequestProperty("User-Agent",
"Profile/MIDP-2.0 Configuration/CLDC-1.0");
hconn.setRequestProperty("Content-Language", "en-CA");
os = hconn.openOutputStream();
// send request to the ASP script
String str = "PIN=" + strLogin;
byte postmsg[] = str.getBytes();
for(int i=0;i < postmsg.length;i++) {
os.write(postmsg);
//os.flush();
//receive response
is = hconn.openDataInputStream();
int ch;
while((ch = is.read()) != -1) {
data.append((char) ch);
} finally {
if(is!= null) {
is.close();
if(os != null) {
os.close();
if(hconn != null) {
hconn.close();
resultItem.setText(data.toString());
display.setCurrent(resultScreen);
The ASP code is:
<%
PIN = request("PIN")
If PIN = "" Then
response.write "INVALID"
Else
response.write "GOOD"
End If
%>
The response returned is always "INVALID" no matter what I pass it.
Any help would be greatly appreciated.deepspace
Thank you, Thank you, Thank you!!!
That worked like a charm.
Working Code in case anyone's interested:
private void loginViaHTTPConnection(String strLogin) throws IOException {
HttpConnection hconn = null;
InputStream is = null;
OutputStream os = null;
StringBuffer data = new StringBuffer();
try {
String str = "PIN=" + strLogin + '\r';
hconn = (HttpConnection)Connector.open(url);
hconn.setRequestProperty("IF-Modified-Since",
"20 Jan 2001 16:19:14 GMT");
hconn.setRequestProperty("User-Agent",
"Profile/MIDP-2.0 Configuration/CLDC-1.0");
hconn.setRequestProperty("Content-Language", "en-CA");
hconn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
hconn.setRequestMethod(HttpConnection.POST);
// Send request to ASP page
os = hconn.openOutputStream();
os.write(str.getBytes());
os.flush();
//receive response
is = hconn.openDataInputStream();
int ch;
while((ch = is.read()) != -1) {
data.append((char) ch);
} finally {
if(is!= null) {
is.close();
if(os != null) {
os.close();
if(hconn != null) {
hconn.close();
resultItem.setText(data.toString());
display.setCurrent(resultScreen);
} -
Hi all,
I am new to Java but have developed in the equivilent in the Microsoft domain. I have been doing a lot of reading trying to get my head around all the new terminology and it would be nice to get some feedback to ensure my understanding is correct.
I am referring to a N-Tier architecture when I describe my understanding -
JSP - Java Server Pages - Are used in the Presentation layer and are served up by the Webserver eg. WebLogic. The only information that should be contained within should be presentation specific - no business logic. Similar to ASP pages - contain HTML and some java scripting (??). I know they can reference JavaBeans.
Servlets - Similar to JSP's but generally contain more business logic(?). JSP's, when compiled turn into servlets.
Java Beans - Similar to COM and run on the Webserver. Contain business logic. Composed of a set (?) of Java classes. Can be called from JSP's.
Enterprise Java Beans - Similar to DCOM and run on a seperate application server. Contain business logic. Composed of a set (?) of Java classes. Can be called from JSP's (?) or from Java Beans (?).
Jar files - Is an archive file for java classes. Not sure when/why you would use these in an N - Tier application. Is there a relationship with any of the above file types??
JPO - Java Program Objects - The vendor of the product we use has documentation referring to JPO's - I am assuming they are EJBs..??
Any help on setting my understanding straight would be welcomed :)
Thanks in advance.
DarcyI am referring to a N-Tier architecture when I
describe my understanding -
JSP - Java Server Pages - Are used in the
Presentation layer and are served up by the Webserver
eg. WebLogic. The only information that should be
contained within should be presentation specific - no
business logic. Similar to ASP pages - contain HTML
and some java scripting (??). I know they can
reference JavaBeans.Specifically used to facilitate coding the presentation; similar to ASP.
Servlets - Similar to JSP's but generally contain
more business logic(?). JSP's, when compiled turn
into servlets.Wrong... servlet is not supposed to handle business logic. It is intended to process requests and delegate calls to business layer.
Java Beans - Similar to COM and run on the Webserver.
Contain business logic. Composed of a set (?) of Java
classes. Can be called from JSP's.In a way, yes.
Enterprise Java Beans - Similar to DCOM and run on a
seperate application server. Contain business logic.
Composed of a set (?) of Java classes. Can be called
from JSP's (?) or from Java Beans (?).Business logic components; independently deployable
Jar files - Is an archive file for java classes. Not
sure when/why you would use these in an N - Tier
application. Is there a relationship with any of the
above file types??It is used to package the components in a homogeneous unit. For example, EJB is packaged in a JAR to make it a single component..
JPO - Java Program Objects - The vendor of the
product we use has documentation referring to JPO's -
I am assuming they are EJBs..??Might be referring to JDO... Java Data Objects. -
How to create a asp page in dreamweaver cc 2014
How in the hec do I create an asp page in Dreamweaver CC.
I installed the database, server behaviors. I can create a PHP page and add database connections for that type but not Asp?
Help anyone?
Thanks TraciCreate a new HTML document.
Go to File > SaveAs > filename.asp
Nancy O. -
Need help w/ JSP formating a page.
Ok. I need to make the following code work. I think it needs help w/ formating is all. Below is the JSP page I would like it in as well as where I think the code should go. Not shure how to get it to display the output though.
var fullSessionName;
Function startHODSession(sessionName) {
var i = document.HODApplet.startSession(sessionName);
if (i == 0) {
fullSessionName = sessionName + document.HODApplet.getSessionID();
I need to run that part of code and display the output on a webpage. Any help would be awosme as I am lost w/ JSP more of a vb kind of guy. but learning quickly. Thanks for any help or advice.
Thanks
My JSP file:
<%--
Document : index
Created on : Oct 7, 2008, 7:14:58 AM
Author : tl01mjf
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import ="java.applet.Applet" %>
<%@page import = "ibm.eNetwork.HOD.BaseApplet" %>
<%@page import = "ibm.eNetwork.HOD.HostOnDemand" %>
<%@page import = "ibm.eNetwork.HOD.JSHostOnDemand" %>
<%
CODE GOES HERE
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h2>Hello World!</h2>
<input type="text" name="AgentID" value="" />
<input type="submit" value="Push IT" name="id"/>
</body>
</html>Great catch on the aplet and maybe that is where I am going wrong. So let me back up a little and maybe you can get me out of my bind.
Basically what I want for a test app is: a little text box w/ a button. type in an number and click the button.
the button will then send the info to a terminal emulator. (ibm host on demand)
So that is what the 3 include statements where for. I got that from the API example.
so what I really need the page to do is print the list of connections.
so I need to get the latest session ID:
var fullSessionName;
Function startHODSession(sessionName) {
var i = document.HODApplet.startSession(sessionName);
if (i == 0) {
fullSessionName = sessionName + document.HODApplet.getSessionID();
Then run:
public int sendKeys1 (String text)
The string being what was put in the box.
for right now i do not need error checking and i know the screen will be on the right spot to accpet the input.
so if there is a better way to make it work using an applet....Im all for it.
any ideas would be great.
thanks -
Testing ASP pages in DW CS3?
Hello.
I need to start learning ASP, so I bought a book on it. I
opened up a (very simple) sample ASP page from the accompanying CD
ROM in Dreamweaver (CS3). The page opened and was viewable, but
when I clicked F12 to preview in a browser, the page did not
display. Attached is the full simple code that's on the page. Is
there something else that I need to do in order to get this to
work? Thanks!...> ...You see, the whole reason this started is because my
boss wanted to me
> learn some sort of new programming language in hopes
that it would
> stimulate
> new ideas for application development. Neither he nor
myself knows
> anything
> about ASP, but I guess he heard something about it
somewhere, so that's
> what he
> picked.
In general, just picking a new language isn't the key to
stimulating new
ideas for app development.
A better approach would be to pick new app development
methods and/or
consider looking at all the various application frameworks
out there.
ASP is pretty much identical to PHP in terms of basic
premise. ASP isn't
being developed by MS anymore, though.
ASP.net is the replacement and is an Object Oriented
Programming language
ala JAVA.
Ruby On Rails is a trendy option these days, so maybe look at
that. It's the
Ruby language written on top of the Rails application
framework. Lots of
proponents of it out there.
> Are ASP and PHP basically the same (I mean, in what they
can achieve)?
In terms of 'what they can achieve' pretty much ANY web
programming language
is going to be 90% alike.
In terms of syntax/logic, ASP and PHP are very close, so no
real benefit in
learning ASP in too much depth (especially since it's not
really developed
by MS anymore).
> a fairly true statement that learning ASP.net after
knowing PHP may just
> be a
> waste of time?
ASP.net is king in the corporate enterprise application
development world.
If that's a direction your company wants to target/head in,
then it makes
sense. If you need to integrate tightly with Microsoft's
other offerings
(office, sharepoint, active directory, MS SQL, etc.) then
ASP.net makes
perfect sense.
Otherwise, I'd say PHP is a really safe place to be. It has a
HUGE market
share, constantly being updated, and so many commercial and
open source
add-ons at your disposal.
-Darrel -
Hi,
I'm trying without success to write an AS3 script to post data to a server ASP page (which is scripted in ASP to insert the data into a DB. The ASP script does not return any data to Flash.). It is set up so that it only receives data and does not send any data back.
I've written a script which follows, but I get back a trace of "error" (see script), and when I independently check the DB, no new data that I am trying to send, is received. So, not working.
storeBtn.addEventListener(MouseEvent.CLICK,dbStore,false,0,true);
function dbStore(event:MouseEvent):void{
var g2:String;
if (selectGm == true){
g2 = "abc";
if (selectGf == true){
g2 = "xyz";
var scriptPage6:String ="https://mysite.com/ASPpage.asp";
var request6:URLRequest = new URLRequest(scriptPage6);
request6.method = URLRequestMethod.POST;
var variables6:URLVariables = new URLVariables();
variables6.aaa = data88;
variables6.bbb = data99;
variables6.name = name6;//carried over in the script from text input in an earlier frame: var name6:String = username_txt.text;
variables6.ggg = g2;
var loader6:URLLoader = new URLLoader();
loader6.dataFormat = URLLoaderDataFormat.VARIABLES;
loader6.addEventListener(Event.COMPLETE, handleComplete6);
loader6.load(request6);
//request6.data = variables6;
var msg:String;
function handleComplete6 (event:Event):void{
var msg = event.target.data;
if(msg=="true"){
trace("Done!");
} else{
trace("Error: "+msg);
I must be doing something wrong and would appreciate any help. I'm not sure how to send data when no return data is needed or requested?
The goal is simply to send 4 items to the ASP page (aaa, bbb, name and ggg) which can process and insert these into a DB.
Regards,Hi esdebon,
Thank you. The script executes OK. No error, traces OK.
But, I am still not geting any new data into the DB.
This is most likely a mistake I am still making with the variables I am sending. I've used this ASP page before and it works. So, I will check what I am sending.
Hi kglad,
I am trying to adapt another script that I am using in the same FLA, but that script does get a return of data. So, I renamed it from variables to variables6, to give it a unique (non-conflicting name), and in my experimenting to try tofind what would work, I probably commented it out.
Is it needed?
One other way to deal with the data, if the DB will not work:
SMTP Mail from the SWF/APK, using ASP, that sends the data to me.
Maybe you are looking for
-
Free Good indicator Tick in PO
Dear Experts, My user want one material in Free from vendor and tick the Free indicator in Po but when user tick the free indicator , system ask for Gr based IV and IR indictor tick, when we tick the same system ask for Rate.. Neeru
-
Opening the utility "activity monitor", I see a process that appears and disappears, called 3265 "du" process. It occupies a lot of CPU % system (the red one in the mac activity monitor utility). Anyone knows what's that and how can I remove it? P
-
Mac Pro (early 2008) cannot startup
Today, I shut down my Mac Pro (early 2008) for about two hours and now it just refuses to startup. This is the symptom: Power-on LED illuminates when power button is pressed and fans spin continuously but there is no boot tone or video Apple Service
-
Need to fetch random rownum from a table
Hi All I need to fetch two random records from a table each time I query it. e.g. my_emp_table if this contains unique employee ids, is there any way to write a query which would give a two random employee records, say for first run 11 and 18 and nex
-
Query to count no.of orders using joins and subqueries
I have 3 tables i want to show the no. of orders when order placed date is equal to Create date(user registered date) order table contains following columns [OrderId] ,[UserId] ,[OrderPlaced] ,[Paid] ,[DatePaid] ,[Paymen