Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Sending XML via http post, using servlet

Sending XML via http post, using servlet

2006-03-14       - By Vishnu

 Back
Reply:     1     2  

Hey,

I Hope response.sendRedirect() calls the doGet() method of the servlet.

Instead Try Calling the doPost Method of the servlet where you are trying to
send the xml stream.

protected void doPost(HttpServletRequest request, HttpServletResponse response){
   
   servletInstance.doPost(request,response);
}

-- -- Original Message -- --
 From: Corey Crandell
 To: SERVLET-INTEREST@(protected)
 Sent: Tuesday, March 14, 2006 1:56 AM
 Subject: Sending XML via http post, using servlet


 Hey I am hopeing someone may be able to help. I am trying to send and xml
stream via http post. I am using a servlet using goPost. The server I am
sending the request to will return with a response as long as the stream is
sent via http post, as of right now I am getting an error from the remote
server saying im not sending the xml stream via post.

 my imports are :

 import java.io.*;
 import java.net.*;

 import javax.servlet.*;
 import javax.servlet.http.*;

 throws:

 throws ServletException, IOException {

 and using goPost:

 protected void doPost(HttpServletRequest request, HttpServletResponse
response)

 whats included in the xml stream is a simple domain search, when a client
types in a domain search on my website the servlet grabs that info and sends it
to the remote server via sendRedirect basically temp files.. here is where the
xml doc is being sent to:

 response.sendRedirect("http://pirin.names4ever.com/TestXAPI/Pirin2Test.exe?"
+test);

 Maybe somewhere there I need make another POST call.. not sure..

 Can someone send me in the right direction please, I would certainly
appriciate it. If you need more info let me know.

 Corey C
 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
To unsubscribe, send email to listserv@(protected) and include in the body of
the message "signoff SERVLET-INTEREST".
 Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html



__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2>Hey,</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2>I Hope&nbsp;</FONT><FONT
face="Trebuchet MS" color=#0000ff size=2>response.sendRedirect() calls the
doGet() method of the servlet.</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2>Instead Try Calling the
doPost Method of the servlet where you are trying to send the xml
stream.</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT><FONT
face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><FONT face=Arial
color=#ff0000>protected void doPost(HttpServletRequest request,
HttpServletResponse response){</FONT></FONT></DIV>
<DIV><FONT face=Arial color=#ff0000 size=2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2>&nbsp;&nbsp;&nbsp;
servletInstance.doPost(request,response);</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><FONT face=Arial
color=#ff0000>}<BR><BR></FONT></FONT>-- -- Original Message -- -- </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT:
#0000ff 2px solid; MARGIN-RIGHT: 0px">
 <DIV
 style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
 <A title=kermitus@(protected) href="mailto:kermitus@(protected)">Corey
 Crandell</A> </DIV>
 <DIV style="FONT: 10pt arial"><B>To:</B> <A
 title=SERVLET-INTEREST@(protected)
 href="mailto:SERVLET-INTEREST@(protected)">SERVLET-INTEREST@(protected)</A>
 </DIV>
 <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, March 14, 2006 1:56
 AM</DIV>
 <DIV style="FONT: 10pt arial"><B>Subject:</B> Sending XML via http post,
using
 servlet</DIV>
 <DIV><BR></DIV>
 <DIV><FONT face=Arial size=2><SPAN class=spnMessageText id=msg>Hey I am
 hopeing someone may be able to help. I am trying to send and xml stream via
 http post. I am using a servlet using goPost. The server I am sending the
 request to will return with a response as long as the stream is sent via http
 post, as of right now I am getting an error from the remote server saying im
 not sending the xml stream via post.<BR><BR>my imports are :<BR><BR><FONT
 color=red>import java.io.*;<BR>import java.net.*;<BR><BR>import
 javax.servlet.*;<BR>import
 javax.servlet.http.*;</FONT><BR><BR>throws:<BR><BR><FONT color=red>throws
 ServletException, IOException {</FONT><BR><BR>and using goPost:<BR><BR><FONT
 color=red>protected void doPost(HttpServletRequest request,
 HttpServletResponse response)</FONT><BR><BR>whats included in the xml stream
 is a simple domain search, when a client types in a domain search on my
 website the servlet grabs that info and sends it to the remote server via
 sendRedirect basically temp files.. here is where the xml doc is being sent
 to:<BR><BR><FONT color=red>response.sendRedirect("<A
 href="http://pirin.names4ever.com/TestXAPI/Pirin2Test.exe?"
 target=_blank><FONT
 color=#000000>http://pirin.names4ever.com/TestXAPI/Pirin2Test.exe?</FONT></A>
"+test);</FONT><BR><BR>Maybe
 somewhere there I need make another POST call.. not sure..<BR><BR>Can someone
 send me in the right direction please, I would certainly appriciate it. If
you
 need more info let me know.</SPAN></FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV align=left><SPAN
 style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font
-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi
-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><STRONG
>Corey
 C
 </STRONG></SPAN></DIV>__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
__ ____ ____ ____ __
 To unsubscribe, send email to listserv@(protected) and include in the body
of
 the message "signoff SERVLET-INTEREST".
 <P>Archives: http://archives.java.sun.com/archives/servlet-interest.html
 Resources: http://java.sun.com/products/servlet/external-resources.html
 LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
 <P></P></BLOCKQUOTE></BODY></HTML>
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff SERVLET-INTEREST".
<p>
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
<p>

©2008 junlu.com - Jax Systems, LLC, U.S.A.