28 Apr 2010 @ 12:19 PM 

This works in GlassFish v2, but I’m sure it should work in any Java app server

@Path("")
public class terminal {
    @Context private javax.servlet.http.HttpServletRequest hsr;
.
.
.
    @GET
    @Path("get_time")
    @Produces("text/plain")
    public String get_time(@QueryParam("license_code") String license_code)
    {
        Connection con = null;
        try
        {
            String ip = hsr.getRemoteAddr();
Posted By: Zayin
Last Edit: 28 Apr 2010 @ 12:19 PM

EmailPermalink
Tags
Tags:
Categories: glassfish, java


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 38
  • Comments » 61
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Links



    No Child Pages.

Portfolio



    No Child Pages.