<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7405259872367533772</id><updated>2011-11-27T19:41:33.714-05:00</updated><category term='grails'/><category term='POST'/><category term='HttpServletResponse'/><category term='SOAPACTION'/><category term='mysql'/><category term='grails mysql long-blob'/><category term='IP Address'/><category term='gorm binary data'/><category term='Resource Injection'/><category term='HttpServletRequest'/><category term='SOAPMESSAGE'/><category term='Java'/><category term='gorm'/><category term='API'/><category term='Servlet'/><category term='grails saving file as binary data'/><category term='Host name'/><title type='text'>`</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://integratedlayers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Coveted</name><uri>http://www.blogger.com/profile/12413445652209470397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-5291440265231128656</id><published>2010-01-18T18:49:00.008-05:00</published><updated>2010-01-19T01:34:53.747-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grails saving file as binary data'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='gorm'/><category scheme='http://www.blogger.com/atom/ns#' term='grails mysql long-blob'/><category scheme='http://www.blogger.com/atom/ns#' term='grails'/><category scheme='http://www.blogger.com/atom/ns#' term='gorm binary data'/><title type='text'>Reading a file from the local file system and saving it as binary data, using Grails</title><content type='html'>I'm relatively new to Grails and recently ran into some difficulty when attempting to save a file, read in from the local file system, as a long-blob to MySQL. Most of the documentation I found dealt with saving of single files, uploaded by users of the website front-end. My situation was a little different. My application needed to accept jar file uploads through the front-end, requiring that I extract and recreate the entire jar's directory structure onto the server's local file system, before further processing and validation. The original data contained in these files would ultimately have to be saved to the database. One of these file types were java class files and needed to be stored into a MySQL database long_blob field as binary data.&lt;br /&gt;&lt;br /&gt;Below is the way I created the domain class for these class files. I've omitted some fields for the sake of simplicity. Our class files' binary data will be stored into the 'byteCode' field. The code in the mapping closure is needed to make this work.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;package org.netbeans.portals.admin&lt;br /&gt;&lt;br /&gt;import java.sql.Blob;&lt;br /&gt;&lt;br /&gt;class FileClass {&lt;br /&gt;String fileName;&lt;br /&gt;Blob byteCode;&lt;br /&gt;Date createdAt = new Date();&lt;br /&gt;&lt;br /&gt;static constraints = {&lt;br /&gt;fileName(unique: true, nullable: false)&lt;br /&gt;byteCode(nullable: false)&lt;br /&gt;createdAt(nullable: false)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;static mapping = {&lt;br /&gt;columns {&lt;br /&gt;byteCode type: "blob"&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Below, is some simple code that returns a java.sql.Blob object, provided the path to a file, as a String. It converts the file into byte array, using the 'getBytesFromFile' method listed beneath it. using Hibernate's 'createBlob' method gives us the required sql blob which we can simple assign to our FileClass object's byteCode field.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;    def getSqlBlobFromFile(String path) {&lt;br /&gt;file = new File(path)&lt;br /&gt;bytes = this.getBytesFromFile(file)&lt;br /&gt;java.sql.Blob sqlBlob = null&lt;br /&gt;if (bytes) {&lt;br /&gt;sqlBlob = org.hibernate.Hibernate.createBlob(bytes)&lt;br /&gt;}&lt;br /&gt;return sqlBlob&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;***DISCLAIMER: I did not write the code, below.*** &lt;br /&gt;This is one of countless examples of converting a file to a byte array that can be found throughout the web. Unfortunately, I do not recall where I found it.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;    private static byte[] getBytesFromFile(File file) throws IOException {&lt;br /&gt;InputStream is = new FileInputStream(file);&lt;br /&gt;// Get the size of the file&lt;br /&gt;long length = file.length();&lt;br /&gt;if (length &amp;gt; Integer.MAX_VALUE) {&lt;br /&gt;// File is too large&lt;br /&gt;return null&lt;br /&gt;}&lt;br /&gt;// Create the byte array to hold the data&lt;br /&gt;byte[] bytes = new byte[(int)length];&lt;br /&gt;// Read in the bytes&lt;br /&gt;int offset = 0;&lt;br /&gt;int numRead = 0;&lt;br /&gt;while (offset &amp;lt; bytes.length&lt;br /&gt;&amp;amp;&amp;amp; (numRead=is.read(bytes, offset, bytes.length-offset)) &amp;gt;= 0) {&lt;br /&gt;offset += numRead;&lt;br /&gt;}&lt;br /&gt;// Ensure all the bytes have been read in&lt;br /&gt;if (offset &amp;lt; bytes.length) {&lt;br /&gt;throw new IOException(&amp;quot;Could not completely read file &amp;quot;+file.getName());&lt;br /&gt;}&lt;br /&gt;// Close the input stream and return bytes&lt;br /&gt;is.close();&lt;br /&gt;return bytes;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I hope this helps&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-5291440265231128656?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/5291440265231128656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/5291440265231128656'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2010/01/reading-file-from-local-file-system-and.html' title='Reading a file from the local file system and saving it as binary data, using Grails'/><author><name>Alex P.</name><uri>http://www.blogger.com/profile/15670101260608619016</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-2087523748978183347</id><published>2010-01-12T11:31:00.006-05:00</published><updated>2010-01-12T12:10:41.062-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='Resource Injection'/><title type='text'>Java Resource Injection</title><content type='html'>If you are creating an API it may be necessary to provide resources to the API client. Many APIs use XML configuration files, resource files, or additional helper classes / methods to provide access to resources. All of which increase the learning curve required to utilize your code. Ideally your API should simplify resource provisioning and consumption. My personal preference is to follow the current trend towards annotations as an API convention.&lt;br /&gt;&lt;br /&gt;In this post I will cover the convention of resource utilization via annotation and I will cover how to inject the resource by utilizing Java reflection. To clarify the convention, the client needs to annotate one or more fields and the fields must be of the proper Java type. If the client meets the conditions, the API container will automatically assign an appropriate resource to the client's field member even of the field is not public.&lt;br /&gt;&lt;br /&gt;To demonstrate how this is done I will create a simple client:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package sample;&lt;br /&gt;&lt;br /&gt;import java.sql.Connection;&lt;br /&gt;import java.sql.SQLException;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;&lt;br /&gt;public class InjectionClient {&lt;br /&gt;//field to be injected with required jndi name property&lt;br /&gt;@ResourceProvider(jndiName="jdbc/MyPool")&lt;br /&gt;private ConnectionProvider provider;&lt;br /&gt;&lt;br /&gt;public void foo(String sql)&lt;br /&gt;throws NamingException, SQLException {&lt;br /&gt;Connection con = null;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;// provider already set by container&lt;br /&gt;con = provider.getConnection();&lt;br /&gt;&lt;br /&gt;// ... do something useful&lt;br /&gt;} finally {&lt;br /&gt;try { &lt;br /&gt;if (con != null) con.close(); &lt;br /&gt;} catch (SQLException ex) {}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Notice how simple and clean the code is for the client to consume the resource. Simply define a member of the correct type and annotate accordingly. Next lets look at the annotation being used by the client:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package sample;&lt;br /&gt;&lt;br /&gt;import java.lang.annotation.ElementType;&lt;br /&gt;import java.lang.annotation.Retention;&lt;br /&gt;import java.lang.annotation.RetentionPolicy;&lt;br /&gt;import java.lang.annotation.Target;&lt;br /&gt;&lt;br /&gt;// Annotation to be used for field declarations&lt;br /&gt;@Target(ElementType.FIELD)&lt;br /&gt;// Record annotation in the class file and make it available at run time&lt;br /&gt;@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;public @interface ResourceProvider {&lt;br /&gt;String jndiName();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this case the annotation tells the client that a jndi name is require. It also tells the client that the annotation is used for field declarations which will be recorded in the class file and will be accessible during runtime. The nice part of the annotation as part of an API is that most Java IDE's will help validate the proper usage of the annotation.&lt;br /&gt;&lt;br /&gt;Finally lets take a look at the injection code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package sample;&lt;br /&gt;&lt;br /&gt;import java.lang.reflect.Field;&lt;br /&gt;&lt;br /&gt;public class Injector {&lt;br /&gt;public static void injectConnectionResource(Object o)&lt;br /&gt;throws IllegalArgumentException, IllegalAccessException {&lt;br /&gt;ResourceProvider a;&lt;br /&gt;&lt;br /&gt;// iterate threw the fields&lt;br /&gt;for (Field field : o.getClass().getDeclaredFields()) {&lt;br /&gt;// set accessibility just in case the field is private&lt;br /&gt;field.setAccessible(true);&lt;br /&gt;&lt;br /&gt;// get the required annotation&lt;br /&gt;a = field.getAnnotation(ResourceProvider.class);&lt;br /&gt;&lt;br /&gt;// validate type and annotation&lt;br /&gt;if (a != null &amp;amp;&amp;amp; field.getType().isAssignableFrom(ConnectionProvider.class)) {&lt;br /&gt;// inject&lt;br /&gt;field.set(o, new ConnectionProvider(a.jndiName()));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To complete the example below is the code for the actual resource provider:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package sample;&lt;br /&gt;&lt;br /&gt;import java.sql.Connection;&lt;br /&gt;import java.sql.SQLException;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;import javax.sql.DataSource;&lt;br /&gt;&lt;br /&gt;public class ConnectionProvider {&lt;br /&gt;private String jndiName;&lt;br /&gt;&lt;br /&gt;public ConnectionProvider(String jndiName) {&lt;br /&gt;this.jndiName = jndiName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Connection getConnection() throws NamingException, SQLException {&lt;br /&gt;InitialContext context = new InitialContext();&lt;br /&gt;DataSource dataSource = (DataSource) context.lookup(jndiName);&lt;br /&gt;Connection con = dataSource.getConnection();&lt;br /&gt;&lt;br /&gt;return con;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There are 2 gotchas with this approach:&lt;br /&gt;&lt;br /&gt;1)If the field is set to anything other than public you may have an issue. Refection allows you to suppress Java language access checking but this only works if the no security manager is present. If a security manager is present then the “suppressAccessChecks” reflection permission must not be flagged as true.&lt;br /&gt;&lt;br /&gt;2)Reflection is slow, painfully slow.&lt;br /&gt;&lt;br /&gt;Gotcha's aside, resource injection via reflection based on annotation convention is a great approach to simplify an API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-2087523748978183347?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://integratedlayers.blogspot.com/feeds/2087523748978183347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://integratedlayers.blogspot.com/2010/01/java-resource-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/2087523748978183347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/2087523748978183347'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2010/01/java-resource-injection.html' title='Java Resource Injection'/><author><name>Ralph Tavarez</name><uri>http://www.blogger.com/profile/04311958490983160724</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-5562662503491646751</id><published>2010-01-11T11:15:00.006-05:00</published><updated>2010-01-12T11:41:32.768-05:00</updated><title type='text'>JAXB  Part .1 - Marshall a String to an Object / unMarshall an Object to a String</title><content type='html'>When i first started using JAXB in my integration projects. Examples are what helped me the most in understanding how to properly use JAXB in my projects. What i discovered during my searches is the fact that there aren't many good examples to cover all aspects of the process. So i figured I'd add to the library of online examples. So this is part 1 of various installments i'll be doing to cover JAXB.&lt;br /&gt;&lt;br /&gt;First up, let's explore the JAVA packages we'll need to import into the class that will be handling the JAXB calls. In this example we'll demonstrate how to use JAXB to unmarshall a String that contains XML that corresponds to a validate XSD Schema that has a JAXB class associated with it. &lt;br /&gt;&lt;br /&gt;For this exmaple we'll use this Schema:&lt;br /&gt;&lt;br /&gt;&amp;lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;targetNamespace="http://xml.netbeans.org/schema/SimpleString"&lt;br /&gt;xmlns:tns="http://xml.netbeans.org/schema/SimpleString"&lt;br /&gt;elementFormDefault="qualified"&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="simple"&amp;gt;&lt;br /&gt;&amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;&amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="stringOne" minOccurs="1" maxOccurs="1"/&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="stringTwo" minOccurs="1" maxOccurs="1"/&amp;gt;&lt;br /&gt;&amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;&amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;&amp;lt;/xsd:element&amp;gt;&lt;br /&gt;&amp;lt;/xsd:schema&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once a JAXB Binding as been generated within you project using the above XSD. Classes will be generated to be used to access the XML tree elements. The targetNamespace defined within the .XSD will be used to define the package name unless otherwise provided when creating the JAXB binding.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;org.netbeans.xml.schema.simplestring.simple;&lt;br /&gt;org.netbeans.xml.schema.simplestring.ObjectFactory;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In this case we will be using "org.netbeans.xml.schema.simplestring.simple" for this example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. javax.xml.bind.JAXBContext : This is the class needed to do any marshalling or unmarshalling of Objects and Strings. A JAXBContext will be used to create an instance for handling the class.&lt;br /&gt;&lt;br /&gt;Example Code: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;import org.netbeans.xml.schema.simplestring.simple;&lt;br /&gt;JAXBContext jbc = JAXBContext.newInstance("simple");&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;2. Now we will create an unMarshaller instance.&lt;br /&gt;&lt;code&gt;Unmarshaller unmarshaller = jbc.createUnmarshaller();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;too be continued...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-5562662503491646751?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://integratedlayers.blogspot.com/feeds/5562662503491646751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://integratedlayers.blogspot.com/2010/01/jaxb-part-1-marshall-string-to-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/5562662503491646751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/5562662503491646751'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2010/01/jaxb-part-1-marshall-string-to-object.html' title='JAXB  Part .1 - Marshall a String to an Object / unMarshall an Object to a String'/><author><name>Coveted</name><uri>http://www.blogger.com/profile/12413445652209470397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-7977374401660332859</id><published>2010-01-11T10:50:00.000-05:00</published><updated>2010-01-11T10:50:13.321-05:00</updated><title type='text'>CFML on Glassfish with SMITH open source CFML engine. Part 1</title><content type='html'>i was wondering weather SMITH could run correctly on Glassfish… Well so far so good, all it takes is a .WAR file of the application. Deploy it as a Web application with the correct context root, and that’s all she needs to get up and running… Screen shots and detailed instructions will come soon…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-7977374401660332859?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/7977374401660332859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/7977374401660332859'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2010/01/cfml-on-glassfish-with-smith-open.html' title='CFML on Glassfish with SMITH open source CFML engine. Part 1'/><author><name>Coveted</name><uri>http://www.blogger.com/profile/12413445652209470397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-5038367938652510710</id><published>2009-12-22T17:00:00.009-05:00</published><updated>2009-12-22T17:10:39.322-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpServletResponse'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpServletRequest'/><title type='text'>JAVA SERVLET - Requested URI</title><content type='html'>I recently had an issue dealing with a Java Servlet. The  Java Servlet was configured to handle errors via the web.xml file using the Error Pages configuration XML elements. This worked just fine as I've been able to handle a variety of errors. From 404 errors to 503, allowing me to serve up any message i want as the response to the request. Weather it be a web browser or server application.&lt;br /&gt;But the one problem i had was trying to obtain the correct value of the URI that was requested. You would think that calling the method "getRequestURI()" of the HttpServletRequest would do the trick... But not so....&lt;br /&gt;&lt;div style="width:500px;overflow:auto;"&gt;&lt;code&gt;&lt;br /&gt;//Using the full class name for reference only, &lt;br /&gt;//the parameter name should be used instead&lt;br /&gt;String uri = HttpServletRequest.getRequestURI();&lt;br /&gt;System.out.println("URI: " + uri);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;Since the Java Servlet was set to deploy to the context root of the server. The above code resulted in this output: URI: /myServletExceptionHandler&lt;br /&gt;&lt;br /&gt;This would be great if i made a request to "http://www.mydomain.com/myServletExceptionHandler"&lt;br /&gt;But my test request was made to "http://www.mydomain.com/build/table" and that's what i was expecting to see once i printed the value of "getRequestURI()" But that wasn't the case.&lt;br /&gt;So after some heavy digging around, i stumbled apon a solution that was embedded within the attributes of the request.&lt;br /&gt;&lt;div style="width:500px;overflow:auto"&gt;&lt;code&gt;String uri = null;&lt;br /&gt;uri = HttpServletRequest.getAttribute("javax.servlet.error.request_uri");&lt;br /&gt;System.out.println("URI: " + uri);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The above code resulted in this output: URI: /build/table&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This was great, since i had made my request to "http://www.mydomain.com/build/table" the code was outputting the correct results. But there's a catch here.... This only worked when there was an error thrown and handled by the Servlet, but if no error was thrown, the output was: URI: (blank no output shown). The value remained null, and would throw an error if processed further. So here comes an if statement and the use of the "getRequestedURI()" method.&lt;br /&gt;&lt;br /&gt;&lt;div style="width:500px;overflow:auto"&gt;&lt;code&gt;String uri = null;&lt;br /&gt;uri = HttpServletRequest.getAttribute("javax.servlet.error.request_uri");&lt;br /&gt;if (uri == null) {&lt;br /&gt;//in case there's no URI given&lt;br /&gt;uri = HttpServletRequest.getRequestURI();&lt;br /&gt;}&lt;br /&gt;System.out.println("URI: " + uri);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;This did the trick, if an error was thrown the Original requested URI would be pulled from the attributes of the HttpServletRequest class, extracting the "javax.servlet.error.request_uri" value. If the String Object remains null, and attempt is made to retrive a value from the "getRequestedURI()" method of the HttpServletRequest class... And were done....&lt;/p&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=integrat-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0596000405&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;" align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-5038367938652510710?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://integratedlayers.blogspot.com/feeds/5038367938652510710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://integratedlayers.blogspot.com/2009/12/java-servlet-requested-uri.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/5038367938652510710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/5038367938652510710'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2009/12/java-servlet-requested-uri.html' title='JAVA SERVLET - Requested URI'/><author><name>Coveted</name><uri>http://www.blogger.com/profile/12413445652209470397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-570488968785020824</id><published>2009-12-22T12:55:00.001-05:00</published><updated>2009-12-23T11:24:51.483-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='SOAPMESSAGE'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='POST'/><category scheme='http://www.blogger.com/atom/ns#' term='SOAPACTION'/><title type='text'>JAVA SERVLET - Getting the SOAPACTION from a SOAPMESSAGE posted to a Java servlet.</title><content type='html'>&lt;p&gt;I've been working on a project that utilizes a Java servlet to accept POST via the doPost method of a class that extends the HttpServlet class.&lt;/p&gt;&lt;br /&gt;In order to get the SOAPACTION from a SOAPMESSAGE POST, you will need to parse the MimeHeaders of the request (HttpServletRequest).&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;NOTE&lt;/span&gt;: I purposely left out some imports and other methods not need for this post to shorten the content length. Error handling and such forth is being left out for simplicity of the post.&lt;br /&gt;First you will need a MimeHeaders Object to store the Request.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import saaj.SaajUtils&lt;br /&gt;import javax.xml.soap.MimeHeader;&lt;br /&gt;import import javax.xml.soap.MimeHeaders;&lt;br /&gt;import java.util.Enumeration;&lt;br /&gt;import java.util.Iterator;&lt;br /&gt;import java.util.logging.Level;&lt;br /&gt;import java.util.logging.Logger;&lt;br /&gt;&lt;br /&gt;protected void &lt;br /&gt;doPost(HttpServletRequest req, &lt;br /&gt;HttpServletResponse resp) throws ServletException, IOException {&lt;br /&gt;try&lt;br /&gt;MimeHeader mh = SaajUtils.getHeaders(req);&lt;br /&gt;&lt;br /&gt;}catch (Exception ex) {&lt;br /&gt;Logger.getLogger("Exception").log(Level.SEVERE, null, ex);&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;//Return a server error if things go wrong to simplify things for the post&lt;/span&gt;&lt;br /&gt;resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;p&gt;I used the SaajUtils class, which included methods to parse MimeHeaders, i will include that class later in this post.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Next we will use a method to parse the MimeHeader returned and extract the SOAPACTION from the MimeHeaders. This method will accept an Iterator Object to loop over. In order to get the Iterator Object, you will need to call the "getAllHeaders()" of the MimeHeader returned by the SaajUtils class method call.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;private String getSoapAction(Iterator allHeaders) {&lt;br /&gt;String soapAction = null;&lt;br /&gt;while (allHeaders.hasNext()) {&lt;br /&gt;MimeHeader header = (MimeHeader) allHeaders.next();&lt;br /&gt;if (header.getName().equalsIgnoreCase("soapaction")) {&lt;br /&gt;soapAction = header.getValue().replaceAll("\"", "");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return soapAction;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//Now add these lines&lt;br /&gt;Iterator iterator = mh.getAllHeaders();&lt;br /&gt;String soapAction = getSoapAction(iterator);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//Here's our SaajUtils class used&lt;br /&gt;&lt;br /&gt;package saaj;&lt;br /&gt;&lt;br /&gt;import java.io.ByteArrayInputStream;&lt;br /&gt;import java.net.MalformedURLException;&lt;br /&gt;import java.net.URL;&lt;br /&gt;import java.util.Enumeration;&lt;br /&gt;import java.util.Iterator;&lt;br /&gt;import java.util.StringTokenizer;&lt;br /&gt;import javax.activation.DataHandler;&lt;br /&gt;import javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;br /&gt;import javax.servlet.http.HttpServletResponse;&lt;br /&gt;import javax.xml.soap.AttachmentPart;&lt;br /&gt;import javax.xml.soap.MimeHeader;&lt;br /&gt;import javax.xml.soap.MimeHeaders;&lt;br /&gt;import javax.xml.soap.SOAPException;&lt;br /&gt;import javax.xml.soap.SOAPMessage;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author Aalford&lt;br /&gt;*/&lt;br /&gt;public class SaajUtils {&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* extract the MIME header information from within the HTTP Request&lt;br /&gt;* @param req the http request&lt;br /&gt;* @return MimeHeaders as defined within the SAAJ API&lt;br /&gt;*/&lt;br /&gt;public static MimeHeaders getHeaders(HttpServletRequest req) {&lt;br /&gt;Enumeration enumeration = req.getHeaderNames();&lt;br /&gt;MimeHeaders headers = new MimeHeaders();&lt;br /&gt;&lt;br /&gt;while( enumeration.hasMoreElements() ) {&lt;br /&gt;String headerName = (String) enumeration.nextElement();&lt;br /&gt;String headerValue = req.getHeader( headerName );&lt;br /&gt;&lt;br /&gt;StringTokenizer values = new StringTokenizer( headerValue, ",");&lt;br /&gt;while (values.hasMoreTokens()) {&lt;br /&gt;headers.addHeader(headerName, values.nextToken().trim());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return headers;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* stuff the MIME headers into the HTTP response&lt;br /&gt;* @param headers the SAAJ MIME headers&lt;br /&gt;* @param res the Http servlet response&lt;br /&gt;*/&lt;br /&gt;public static void putHeaders(MimeHeaders headers, HttpServletResponse res) {&lt;br /&gt;for (Iterator it = headers.getAllHeaders(); it.hasNext();) {&lt;br /&gt;MimeHeader header = (MimeHeader) it.next();&lt;br /&gt;String[] values = headers.getHeader(header.getName());&lt;br /&gt;if (values.length == 1) {&lt;br /&gt;res.setHeader(header.getName(), header.getValue());&lt;br /&gt;} else {&lt;br /&gt;StringBuffer concat = new StringBuffer();&lt;br /&gt;for (int i = 0; i &lt; values.length; i++) {if (i != 0) {concat.append(',');}concat.append(values[i]);}res.setHeader(header.getName(), concat.toString());}}}public static void attachBytes(SOAPMessage soapMessage, byte[] theBytes, String contentType)throws SOAPException {AttachmentPart attachment = soapMessage.createAttachmentPart();attachment.setContent(new ByteArrayInputStream(theBytes), contentType);soapMessage.addAttachmentPart(attachment);}public static void attachUrlContents(SOAPMessage soapMessage, String urlLocation, String contentType)throws SOAPException, MalformedURLException {URL url = new URL(urlLocation);AttachmentPart attachment = soapMessage.createAttachmentPart(new DataHandler(url));attachment.setContentType(contentType);soapMessage.addAttachmentPart(attachment);}public static String getAttachmentReport(SOAPMessage soapMessage) throws SOAPException {int numOfAttachments = soapMessage.countAttachments();Iterator attachments = soapMessage.getAttachments();StringBuffer buf = new StringBuffer("Number of attachments: ");buf.append(numOfAttachments);while (attachments.hasNext()) {buf.append("\n--------------------------------------------\n");AttachmentPart attachment = (AttachmentPart) attachments.next();buf.append("\nContent Location: " + attachment.getContentLocation());buf.append("\nContent Id: " + attachment.getContentId());buf.append("\nContent Size: " + attachment.getSize());buf.append("\nContent Type: " + attachment.getContentType());}return buf.toString();}}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And that sum's it up&lt;/p&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import saaj.SaajUtils&lt;br /&gt;import javax.xml.soap.MimeHeader;&lt;br /&gt;import import javax.xml.soap.MimeHeaders;&lt;br /&gt;import java.util.Enumeration;&lt;br /&gt;import java.util.Iterator;&lt;br /&gt;import java.util.logging.Level;&lt;br /&gt;import java.util.logging.Logger;&lt;br /&gt;&lt;br /&gt;protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;MimeHeader mh = SaajUtils.getHeaders(req);&lt;br /&gt;Iterator iterator = mh.getAllHeaders();&lt;br /&gt;String soapAction = getSoapAction(iterator);&lt;br /&gt;String message = "SOAPACTION: " + soapAction;&lt;br /&gt;//Set the return status to SuccessFul HTTP/1.1 200 OK&lt;br /&gt;resp.setContentType("text/xml");&lt;br /&gt;&lt;br /&gt;//Using a method of the "HttpServletResponse" class&lt;br /&gt;resp.setStatus(resp.SC_OK);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Finally output the information to the browser&lt;br /&gt;&lt;br /&gt;out.println("");&lt;br /&gt;out.println(message);&lt;br /&gt;out.println("");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}catch (Exception ex) {&lt;br /&gt;Logger.getLogger("Exception").log(Level.SEVERE, null, ex);&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;//Return a server error if things go wrong to simplify things for the post&lt;/span&gt;&lt;br /&gt;resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private String getSoapAction(Iterator allHeaders) {&lt;br /&gt;String soapAction = null;&lt;br /&gt;while (allHeaders.hasNext()) {&lt;br /&gt;MimeHeader header = (MimeHeader) allHeaders.next();&lt;br /&gt;if (header.getName().equalsIgnoreCase("soapaction")) {&lt;br /&gt;soapAction = header.getValue().replaceAll("\"", "");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;return soapAction;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=integrat-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0596000405&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;" align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=integrat-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0130092290&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;" align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-570488968785020824?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://integratedlayers.blogspot.com/feeds/570488968785020824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://integratedlayers.blogspot.com/2009/12/java-servlet-getting-soapaction-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/570488968785020824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/570488968785020824'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2009/12/java-servlet-getting-soapaction-from.html' title='JAVA SERVLET - Getting the SOAPACTION from a SOAPMESSAGE posted to a Java servlet.'/><author><name>Coveted</name><uri>http://www.blogger.com/profile/12413445652209470397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7405259872367533772.post-7372742304135213938</id><published>2009-12-22T12:25:00.000-05:00</published><updated>2009-12-22T14:26:29.280-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='IP Address'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpServletResponse'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpServletRequest'/><category scheme='http://www.blogger.com/atom/ns#' term='Host name'/><title type='text'>JAVA SERVLET - Getting the Client Requestor IP Address and or Host name</title><content type='html'>&lt;p&gt;&lt;br /&gt;This is fairly simple to do, yet few know how easy it is.&lt;br /&gt;&lt;br /&gt;The "&lt;span style="color: rgb(0, 102, 0);"&gt;HttpServletRequest&lt;/span&gt;" class has two methods that work to your advantage, as they do exactly what they specify by name.&lt;br /&gt;&lt;br /&gt;1.  &lt;span style="color: rgb(0, 0, 153);"&gt;getRemoteAddr()&lt;/span&gt; - Returns a String Object of the requesting server IP Address&lt;br /&gt;2.  &lt;span style="color: rgb(0, 0, 153);"&gt;getRemoteHost()&lt;/span&gt; - Returns a String Object of the requesting server HOST NAME&lt;br /&gt;&lt;br /&gt;for example, the method below responds to POST made against the HOST server. If i wanted to print the IP Address and Host name of the requester. The code would be such.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;protected void doPost(HttpServletRequest &lt;span style="color: rgb(0, 102, 0);"&gt;req&lt;/span&gt;, HttpServletResponse &lt;span style="color: rgb(153, 51, 0);"&gt;resp&lt;/span&gt;) throws IOException {&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;//We will need a PrintWriter in-order to print information back to the browser without flushing an OutputStream.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;PrintWriter &lt;span style="color: rgb(255, 102, 0);"&gt;out&lt;/span&gt; = resp.getWriter();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;//Let's set the message String object variable with information to output.&lt;/span&gt;&lt;br /&gt;String &lt;span style="color: rgb(51, 204, 0);"&gt;message&lt;/span&gt; = "The Requestor IP: " + &lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;req&lt;/span&gt;.getRemoteAddr()&lt;/span&gt; + " Requestor Host name: " + &lt;span style="color: rgb(0, 102, 0);"&gt;req&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 153);"&gt;getRemoteHost()&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;&lt;br /&gt;&lt;br /&gt;//Set the return status to SuccessFul HTTP/1.1 200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;resp&lt;/span&gt;.setContentType("text/xml");&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;//Using a method of the "&lt;span style="color: rgb(153, 51, 0);"&gt;HttpServletResponse&lt;/span&gt;" class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;resp&lt;/span&gt;.setStatus(&lt;span style="color: rgb(153, 51, 0);"&gt;resp&lt;/span&gt;.SC_OK);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;//Finally output the information to the browser&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;out&lt;/span&gt;.println("");&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;out&lt;/span&gt;.println(&lt;span style="color: rgb(51, 204, 0);"&gt;message&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;out&lt;/span&gt;.println("");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;Simple and Clean&lt;/p&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=integrat-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0136135161&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;" align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=integrat-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0596520727&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;" align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7405259872367533772-7372742304135213938?l=integratedlayers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://integratedlayers.blogspot.com/feeds/7372742304135213938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://integratedlayers.blogspot.com/2009/12/java-servlet-getting-client-requestor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/7372742304135213938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7405259872367533772/posts/default/7372742304135213938'/><link rel='alternate' type='text/html' href='http://integratedlayers.blogspot.com/2009/12/java-servlet-getting-client-requestor.html' title='JAVA SERVLET - Getting the Client Requestor IP Address and or Host name'/><author><name>Coveted</name><uri>http://www.blogger.com/profile/12413445652209470397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
