Send ip addr to JSP& display it (URGENT..JUST WANNA KNOW IF its POSSIBLE )

emulator sends ipaddress to jsp .(how to send and display it there ?)
jsp should check if it is authorised client .
if(yes) .. it must send the file else it sends "Not authorised user".
I dont want code.JUST TELL ME IF ITS POSSIBLE OR NOT ?
tell me what all r impossible and possible from abv queries.
As i have to put it in slide if its possible.
Please REPLY ur THOUGHTS

Hi
You should look at this post: http://forum.java.sun.com/thread.jspa?threadID=445573&messageID=4022805
Also, you could get the host name by calling the getHost() method of the HttpConnection class.
Another way for validating your users is by having a login screen and send the login information to your jsp.
Mihai

Similar Messages

  • Struts -- LogonView.jsp Displays A Blank Page

    I am using the Struts. My LogonView.jsp displays a blank page. I have no idea why nothing is written while the MessageResources.properties file is found. (I would have gotton HTTP Status 500 if the MessageResources.properties is not found or the value of the corresponding key in the bean:message tag cannot be picked up.)
    Here is my MessageResources.properties file:
    button.submit=Send for Verification
    button.reset=Clear the Form
    logonForm.userId=User Name
    logonForm.password=Password
    logonForm.confirm_password=Confirm Password
    logonForm.emailAddress=E-mail Address
    logonForm.hear_from_us=How did you hear about the StudentScholar.org?
    logonForm.subscriber=Subscribe to the StudentScholar.org newsletter
    logonForm.send_updates=Occassionally send me updates
    logonForm.fname=First Name
    logonForm.lname=Last name
    logonForm.streetAddress=Street Address
    logonForm.city=City
    logonForm.state=State
    logonForm.zip=Zip Code
    logonForm.country=Country
    logonForm.phone=Telephone
    logonForm.degree_type=Degree Type(s)
    logonForm.major=Majoring Field(s)
    logonForm.cumulativeGPA=Cumulative GPA
    logonForm.collegeID=College ID
    logonForm.permissionID=Permission ID
    logonForm.last_logon_date=Last Logon Date
    heading.logon=<H2>Enter your user information</H2>
    title.logon=Logon Screen
    error.invalid.logon=<li>The User ID and/or Password are invalid. Please try again.</li>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    title.mainmenu=Welcome
    heading.mainmenu=<H1>Welcome!</H1>
    label.userType=<H2>You are authorized to use this system as a</H2>
    errors.prefix=<LI>
    errors.suffix=</LI>
    errors.footer=</UL><hr>
    errors.minlength={0} can not be less than {1} characters.
    errors.required={0} is required.
    errors.date={0} is not a date.
    errors.double={0} must be an double.
    errors.email={0} is an invalid e-mail address.Here is my LogonView.jsp:
    <!-- LogonView.jsp -->
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <html>
    <head><title><bean:message key="title.logon" /></title>
    <html:javascript formName="logon" />
    </head>
    <body bgcolor="white">
    <bean:message key="heading.logon" />
    <html:errors />
    <html:form action="/logon" onsubmit="return validateLogon(this)" >
    <table border="0" width="100%">
        <tr>
            <th aligh="right">
               <bean:message key="logonForm.userId" />:
            </th>
            <td align="left">
            <html:text property="userId" size="10" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
               <bean:message key="logonForm.password" />:
            </th>
            <td align="left">
            <html:password property="password" size="10" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
               <bean:message key="logonForm.confirm_password" />:
            </th>
            <td align="left">
            <html:password property="confirm_password" size="10" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.emailAddress" />:
            </th>
            <td align="left">
            <html:text property="emailAddress" size="25" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.hear_about_us" />:
            </th>
            <td align="left">
               <html:text property="hear_about_us" size="25" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
               <bean:message key="logonForm.subscriber" />:
            </th>
            <td align="left">
               <html:checkbox property="subscriber" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.send_updates" />:
            </th>
            <td align="left">
               <html:checkbox property="send_updates" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
               <bean:message key="logonForm.fname" />:
            </th>
            <td align="left">
            <html:text property="fname" size="15" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.lname" />:
            </th>
            <td align="left">
            <html:text property="lname" size="15" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.streetAddress" />:
            </th>
            <td align="left">
            <html:text property="streetAddress" size="50" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.city" />:
            </th>
            <td align="left">
            <html:text property="city" size="15" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.state" />:
            </th>
            <td align="left">
               <html:text property="state" size="25" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.zip" />:
            </th>
            <td align="left">
            <html:text property="zip" size="10" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.country" />:
            </th>
            <td align="left">
            <html:text property="country" size="25" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.phone" />:
            </th>
            <td align="left">
            <html:text property="phone" size="15" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.degree_type" />:
            </th>
            <td align="left">
            <html:textarea property="degree_type" rows="9" cols="90" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.major" />:
            </th>
            <td align="left">
            <html:text property="major" size="15" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.cumulativeGPA" />:
            </th>
            <td align="left">
            <html:text property="cumulativeGPA" size="4" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.collegeID" />:
            </th>
            <td align="left">
            <html:text property="collegeID" size="5" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.permissionID" />:
            </th>
            <td align="left">
            <html:text property="permissionID" size="5" />
         </td>
        </tr>
        <tr>
            <th aligh="right">
            <bean:message key="logonForm.last_logon_date" />:
            </th>
            <td align="left">
            <html:text property="last_logon_date" size="15" />
         </td>
        </tr>
        <tr>
            <td align="right">
                <html:submit>
                    <bean:message key="button.submit" />
                </html:submit>
            </td>
            <td align="right">
                <html:reset>
                    <bean:message key="button.reset" />
                </html:reset>
            </td>
        </tr>
    </table>
    </html:form>
    </body>
    </html>

    Any feedback. Your help would be much appreciated.

  • TRYING TO SEND AN EMAIL VIA JSP not working

    I think what im doing is right but i keep getting errors...therefore...its wrong..
    <form action="mailer.jsp" method="post">
         To :<br>
         <input type="text" name="to" class="std"></input><br>
         From :<br>
         <input type="text" name="from" class="std"></input><br>
         Subject :<br>
         <input type="text" name="subject" class="std"></input><br>
         Message :<br>
         <textarea rows="10" cols="80" name="message"></textarea>
         <br>
         <input type="submit" value="Send"></input>
         </form>Mailer.jsp
    <div class="frame">
         <jsp:useBean id="mailer" class="com.stardeveloper.bean.test.MailerBean">
              <jsp:setProperty name="mailer" property="*"/>
              <% mailer.sendMail(); %>
         </jsp:useBean>
         Email has been sent successfully.
         </div>MailerBean.java
    package com.stardeveloper.bean.test;
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    public final class MailerBean extends Object implements Serializable {
         /* Bean Properties */
         private String to = null;
         private String from = null;
         private String subject = null;
         private String message = null;
         public static Properties props = null;
         public static Session session = null;
         static {
              /*     Setting Properties for STMP host */
              props = System.getProperties();
              props.put("mail.smtp.host", "mail.brunel.ac.uk");
              session = Session.getDefaultInstance(props, null);
         /* Setter Methods */
         public void setTo(String to) {
              this.to = to;
         public void setFrom(String from) {
              this.from = from;
         public void setSubject(String subject) {
              this.subject = subject;
         public void setMessage(String message) {
              this.message = message;
         /* Sends Email */
         public void sendMail() throws Exception {
              if(!this.everythingIsSet())
                   throw new Exception("Could not send email.");
              try {
                   MimeMessage message = new MimeMessage(session);
                   message.setRecipient(Message.RecipientType.TO,
                        new InternetAddress(this.to));
                   message.setFrom(new InternetAddress(this.from));
                   message.setSubject(this.subject);
                   message.setText(this.message);
                   Transport.send(message);
              } catch (MessagingException e) {
                   throw new Exception(e.getMessage());
         /* Checks whether all properties have been set or not */
         private boolean everythingIsSet() {
              if((this.to == null) || (this.from == null) ||
                 (this.subject == null) || (this.message == null))
                   return false;
              if((this.to.indexOf("@") == -1) ||
                   (this.to.indexOf(".") == -1))
                   return false;
              if((this.from.indexOf("@") == -1) ||
                   (this.from.indexOf(".") == -1))
                   return false;
              return true;
    }

    I think what im doing is right but i keep getting
    errors...therefore...its wrong..i don't see any errors posted, so it must not be wrongThe error occurs because the OP did not use BSD-style braces.

  • How to send an email in jsp

    hei evryone!
    can anyone pls help me on how to send an email in jsp. I mean i have a webpage wherein you submit data , upon submission or after the submit button is clicked i need to send an email to a person regarding the data sumitted on the form , i dunno how to do this, can anyone please help me on how to use Javamail, or can anyone post a sample code or site of a tutorial .. thx!

    There are some quite good examples on the use of Javamail on the Sun website. No, we're not going to write your application for you, unless you're willing to pay consultancy fees in real money.
    http://java.sun.com/products/javamail/index.jsp
    http://java.sun.com/products/javamail/FAQ.html
    http://java.sun.com/products/javamail/reference/techart/index.html

  • Sending emails from the JSP application

    hi,
    I am trying to send emails from my jsp application using JavaMail API's.
    I am using my own mailserver.
    Iam able to send emails from my applications to the ids of my own mailserver but not the yahoo,gmail and rediff ids.
    Is it because of blocking of any firewall or somthing else to do within my application?
    Can anyone help me in this?
    Thanks a lot.

    Please read the JavaMail FAQ.
    It's probably due to the configuration of your mail server,
    which is refusing to relay your messages.

  • I urgently need to know how I can connect 8 thunderbolt display, I was thinking with the new mac pro will come out, but I wonder if it is possible to connect an iMac to 4GB of graphics card, but suffers from the imac. thanks

    I urgently need to know how I can connect 8 thunderbolt display, I was thinking with the new mac pro will come out, but I wonder if it is possible to connect an iMac to 4GB of graphics card, but suffers from the imac. thanks

    I tightened all HD screws and it didn't help. With the machine running and side of the case off, I physically stopped both the video card fan and the front case fan with my finger for a couple seconds and the noise continued. I also took all hard drives out one by one and rebooted each time. Again, the noise continued until I took out the Mac HD in Bay 1, rebooted, and I had a very quiet, silent machine. The issue is the hard drive in bay 1 that shipped with the computer, it's without a doubt causing the hum/woosh sound. I still need to know if I can safely swap the Mac HD from bay 1 to bay 4 without any issues to the operating system. I would like to try that to see if it dampens the noise but I also want to make sure this swap won't screw up my machine at all.

  • I've just send to repair my retina display and I'm no very sure that they replace it for a LED one . How I could know which kind of display I got now??

    I've just send to repair my retina display and I'm no very sure that they replace it for a LED one . How I could know which kind of display I got now??

    If you head over to ifixit.com, you can check out their replacement guides for each of the items you feel needs replacing. The cost for the parts is listed there. It would be that cost + labor at an Apple store. I'm not sure if they would replace things that are cracked as that is cosmetic damage and doesn't affect how well (or poorly) the computer works. You would have to bring it to a store and ask.
    ~Lyssa

  • Sending an email through JSP and WML

    I am trying to send an email through jsp in wml, i think i have everything set up properly with regards to tomcat however I keep getting the error
    "Invalid element 'PCDATA' in context of card expected on event ....."
    The line of code in which this occurs is           
    <jsp:setProperty name="mailer" property="*"/>
    I was wondering if anyone would be able to help me with this and be able to tell me why it thinks this is PCDATA and not jsp code.
    Any help would be much appreciated.

    Check out:
    http://jakarta.apache.org/taglibs/index.html

  • Sending Email From a JSP Page

    Hi All,
    Can anybody tell me how to send email from the jsp page. My requirement is to send email to the user when he click on a button on the jsp page.
    thanks and regards
    MSoldier

    You need to install an SMTP server, or access an existing one.
    Contact your network administrator about this, he should be able to help you.
    PLEASE don't go around installing your own mailservers on the internet unless you know very well what you're doing, as most of those are wide open to abuse by spammers and people spreading email virusses as relays (plus it's likely against company or ISP policy).
    And NEVER use someone else's servers without their consent to send email.

  • Probelm in Sending Parameters/Attributes in JSP

    I have the following two file and i want to send parameters for index.jsp to middle.jsp and print them. But when i run the files there print "null" value at <%= request.getAttribute("myparameter")%> in midle.jsp.
    Index.jsp
    <%@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">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>Hi, I am Zaid from Karachi and My hobby is Cricket</h1>
    <h1>Whats Your Name, Hobby and where you belong</h1>
    <form method="GET" action="middle.jsp">
    <input type="text" name="username" size="25">
    <input type="text" name="hobby" size="25"><p></p>
    <input type="text" name="city" size="25"><p></p>
    <input type="submit" value="Submit">
    <input type="reset" value="Reset">
    </form>
    <%
    request.setAttribute("myparameter", "Passion");
    %>
    </body>
    </html>
    middle.jsp
    <%@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">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>Hello World---!</h1>
    <%= request.getAttribute("myparameter")%>
    <%= request.getParameter("username")%>
    </body>
    </html>

    Consider the lifecycle.
    You request page "index.jsp" It runs index.jsp and produces html. It sets the request attribute "myparameter"
    You request page middle.jsp. It runs middle.jsp.
    Note that this progression requires two seperate requests - one for "index.jsp" and then another for "middle.jsp", which sends the request parameters from the form from your browser to middle.jsp.
    Request attributes only last the life of one request - so when you request "middle.jsp" the request attribute set when running "index.jsp" is not available.
    cheers,
    evnafets

  • How to send a message to a pager? URGENT

    Hi everybody
    I wanna know how to send a message (or a caller's number) to a pager from Form.

    Hi,
    if you can find a public Webservice on the Web that provides this functionality, you could use JDeveloper and the Forms Java Importer to call it from Forms.
    JDeveloper is helpful in creating the Java skeletton to communicate with the Webservice. As similar issue is covered in teh Forms9i demos by the example of a currency converter.
    Frank

  • UCCX send entered digits to CAD display

    Hi,
    I'm trying to get a set of numbers (that will be entered by the caller) to show up in the enterprise data fields in CAD.
    Scenario would be that the caller would have to enter their customer number (7 digits) and when the call gets put through to an agent it would show as a data field.
    I've created a new layout list with an extra field "222 Caller Entered Digits". What I'm not sure is how that layout list links to the agent/application/script.
    I've also created a new work flow group as I wanted to just test this on one of our applications.
    I was going to use the Get Digit String to collect the info, but then I'm not sure what to do with this. Do I need to use the Set Enterprise Call Info step?
    An idiots guide would be most appreciated!
    Using UCCX 8.5.
    Thanks, Will

    You are pretty close.
    Yes, you would need to use the Set Enterprise Info Step for two things:
    1) To store the Caller Entered Digits in your newly created Enterprise Field.  Use the name of the field which does not have spaces, and use double quotes.  E.g., If you Enterprise field has a name of "my_new_field" and a display name of "My New Field", then it's "my_new_field" you would use in the script editor.  The display name is just what shows up in CAD.
    2) To pick which layout CAD will use for the call.  You store this in the same place you store the above, only instead of using a field name you defined, you will use the system defined field: "user.layout" and set that equal to your newly created layout name.
    Those two things alone should get you where you need to be.  Also, you didn't need a new workflow group for this, as the workflow group has nothing to do with Enterprise Data.
    The document you would need to reference for this kind of stuff is the Cisco Desktop Administrator Guide:
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/user/guide/cda85ccxug-cm.pdf
    Good luck and happy enterprise data displaying!
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • I want to make an identity card of my dad. he is a government employee. so can you send me whole method to make it using Photoshop CS2 ? please its urgent,

    i want to make an identity card of my dad. he is a government employee. so can you send me whole method to make it using Photoshop CS2 ? please its urgent

    Identity cards are not things individuals typically make.
    You can get yourself into big trouble forging fake IDs.
    -Noel

  • I cannot get my messages/text messages to work om my Hi.  I am sending this thru my iPad.  Respond and let me know you got it.  Fun fun fun.  .  I did go and try to another Apple ID different from my iPhone but it still will not work.  Can anyone help me?

    I cannot get my messages/text messages to work om my Hi.  I am sending this thru my iPad.  Respond and let me know you got it.  Fun fun fun.  .  I did go and try to another Apple ID different from my iPhone but it still will not work.  Can anyone help me?

    chicx wrote:
    This is the third time of writing this on your Apple Support Communities!
    Not with your current user id.
    Far too much uneccesary information in your post, which only confuses things, a vast amount!
    Let's start with iTunes.
    Have you updated iTunes to 11.1.5, because the previous version did appear to have an issue about seeing iPods?
    With iTunes 11.1.5 installed, look in Edit/Preferences/Devices, (or use the ALT key, followed by the E key and then the F key) and make sure that the box named Prevent iPods, iPhones and iPads from syncing automatically does not have a tick in the box.
    Once you have doen those two things, check to see if the iPod is seen by iTunes.
    chicx wrote:
    By the way, what does IOS mean? (I thought IO stood for operating system, but am flummoxed by the S on the end.
    Really?
    OS stands for Operating System. (In computer speak, IO means Input/Output.)
    iOS originally stood for iPhone Operating System, but it now refers to the iPod Touch and iPhone. The iPod Classic, which you have listed in your profile as your iPod, does not use iOS.
    I assume that you have been listening to the Podcast in your iTunes on the computer as you cannot transfer it to your iPod. It's what I'd do.

  • I just got my replacement phone from Warranty. The phone was on for just 2 hours and it crashed. I was told that motorola knows about this "possible" issue. I got a new sim, hard reset, If it can be done I did it. They are now sending me the same phone ag

    I just got my replacement phone from Warranty. The phone was on for just 2 hours and it crashed. I was told that motorola knows about this "possible" issue. I got a new sim, hard reset, If it can be done I did it. They are now sending me the same phone again. Number 3. I would hope this one doesn't crash but I rather have a different phone so I can enjoy using my account. The phone's most recent error was today. " Unfortunately, the process com.motorola.widget.circlewidget3d" has stopped. At least the error message works and it's polite. I told tech this and they could not answer my question or help me other then "let's do a hard reset" My warranty replacement is coming on Monday. Let's hope this one works. Anyone else havinbg the same problem. it says "such and such as stop working" on all sorts of stuff! Help! I want my iPhone Back!

    I just did a google search on this issue. OMG, I got a ton of videos on this or similar issues. Each one says in some way to clear the cache, reset the data, etc. Why in the world would this continue to happen and they not do a fix that resloves this without having to lose or stop what your doing. This is a very long and constant issue it seems with Android phones as there must have been pages and pages of what I now call "Unfortunately"  So I am going to pray that Verizon helps me  out and gets me away from this issue and helps me go back to iPhone or try the Samsung.

Maybe you are looking for

  • SQL Developer locks after splash screen

    I have succesfully installed SQL Developer on 2 machines in our group and it works fine. However on the machine where we really need it (mine) it absolutely refuses to work. It appears to start up, the splash screen appears and the sqldeveloper.exe a

  • Acrobat 9 re-installs when launched

    Sometimes when I launch Acrobat 9 it goes through the install process as if it was a new install which takes several minutes even though I have had it installed on my computer for years.  Oddly, I can open a file and get the program to launch by clic

  • Iphoto wont print book

    Everytime I try to print/order a book i have created in iPhoto, it closes after the 3rd page loads and wont complete. Any ideas on what I can do??? Thanks

  • Displaying image in JTable gets me nothing

    Hi everyone, I created a subclass of JTable which's TableModel is a subclass of AbstractTableModel. My table is supposed to display images in one of the columns but for some reasons I got nothing displayed in that column. I made the column editable s

  • Monitoring Business Process

    Hi, First of all, sorry for my English but I will try to make my best! I'm new to JCAPS. I'm doing a simple BPEL flow in eEnsight. I want monitoring it. I have setted the persistence but into Emanager page i don't see the windows: Business Process In