DHCP client\server request validation?

Is there a way to have for example a client send a variable with it's BOOTP request that matches a DHCP server side variable to complete a trust relationship between client\server before handing out an address to the client?
Basically the client would have an option set say "wagon21" and the server would have to have that value present. Then any clients that do not have the "wagon21" in their request would not be given a DHCP address.

Hi,
According to your description, my understanding is that you want to implement the function: DHCP server assign IP address to specific DHCP-enabled client.
In general, a DHCP server is willing to assign IP address to all reachable DHCP enabled client that sends DHCPDISCOVER message. For Windows Server 2008 R2 and later version, DHCP Server can distribute DHCP leases based on MAC address by setting
Filters – Allow/Deny. Detailed introduction and configuration steps, you may reference:
https://technet.microsoft.com/en-us/library/dd759190.aspx
Note that:
1. If allow list is enabled, the DHCP server provides DHCP services only to clients whose MAC addresses are in the allow list
2. If deny list is enabled, the DHCP server denies DHCP services only to clients whose MAC addresses are in the deny list.
3. If both allow and deny lists enabled, the block list has precedence over the allow list. This means that the DHCP server provides DHCP services only to clients whose MAC addresses are in the allow list, provided that no corresponding matches are in the deny
list. If a MAC address has been denied, the address is always blocked even if the address is on the allow list.
Besides, you may configure DHCP user class, detailed information reference:
https://support.microsoft.com/kb/240247/?wa=wsignin1.0
Best Regards,
Eve Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • Client/server program validation - is it possible?

    I've been mulling over this problem for a few days, and am starting to wonder if it's theoretically possible to find a solution. I'm not looking for specific code, this probably won't even be implemented in Java, I'm just wondering if there is a theoretical program model that would work in this situation.
    The short version:
    Validate the data generated by a client program, without knowing the original data.
    The long version:
    This is a "profiling" system for a MMOG (Massively Multiplayer Online Game). The MMOG is an internet based client/server graphical program where each client connects to the server and they interact with each other and the virtual world. They pay a monthly fee for access to the game. My program is not affiliated with the MMOG or its makers. I have no connections inside the company and cannot expect any cooperation from them.
    The "profiling" system is also a client/server model. The client program runs in the background while the MMOG client is active. It accesses the memory of the MMOG client to retrieve information about the player's character. Then, possibly on request or maybe immediately, it sends the character data to our server.
    What I want to validate is that the character data being sent is unmodified and actually comes from the MMOG program.
    I can reasonably expect that with mild encryption and some sort of checksum or digest, the vast majority of problems can be avoided. However, I am not sure it's possible to completely secure the system.
    I assume that the user has access to and knowledge of the profiler client and the MMOG client, their assembly code, and the ability to modify them or create new programs, leveraging that knowledge. I also assume that the user does not have access to or knowledge of either of the server applications - the MMOG server or mine.
    In a worst-case scenario, there are several ways they could circumvent any security I have yet been able to think of. For instance, they could set up a fake MMOG client that had the data they wanted in memory, and let the profiler access that instead of the real thing. Or, they could rewrite the profiler to use the data they wanted and still encrypt it using whatever format I had specified.
    I have been considering using some kind of buffer overflow vulnerability or remote execution technique that would allow me to run specific parts of the client program on command, or get information by request, something that could not be anticipated prior to execution and thus could not be faked. But this seems not only insecure for the client but also not quite solid enough, depending on how it was implemented.
    Perhaps a series of apparently random validation codes, where the client does not know which one actually is doing the validation, so it must honor them all. Again, this is very conceptual and I'm sure that I'm not explaining them very well. I'm open to ideas.
    If I don't come up with anything better, I would consider relying on human error and the fact that the user will not know, at first, the relevance of some of the data being passed between client and server. In this case, I would include some kind of "security handshake" that looks like garbage to the client but actually is validated on the server end. A modified program or data file would result in an invalid handshake, alerting the server (and me) that this client was a potential problem. The client would have no idea anything had gone wrong, because they would not know what data the server was expecting to receive.
    I hope I have not confused anyone too much. I know I've confused myself....

    Yes, that is the general model for all MMOGs these days - no data that can actually affect the game is safe if loaded from the client's computer. All character and world data is sent from server to client and stored in memory. Any information that is saved to the client's computer is for reference only and not used by the game engine to determine the results of actions/events etc.
    My program accesses the MMOG client's memory while the game is running, and takes the character information from there. It does not have direct access to the MMOG server, and does not attempt to modify the data or the memory. Instead, it just encrypts it and sends it to our server, where the information is loaded into a database.
    The security issue comes into play because our database is used for ranking purposes, and if someone were to hack my program, they could send invalid data to our servers and affect the rankings unfairly.
    I'm just trying to think of a way to prevent that from happening.

  • Disable ADF Client and Server side validation during drop down changes

    In my ADF Faces there is PanelFormLayout containing dropdown with country code value. Changing the dropdown value should change the layout to different country.
    If the data is proper in the form the Layout changes perfectly but if the data is not proper it gives client validation & the layout doesn't get changed.
    I want to disable the client/server side validation while changing the dropdown.

    Hi Just framing the Question once again -
    In my ADF Faces there is PanelFormLayout containing dropdown with country code value. Changing the dropdown value should change the layout to different country.
    If the data is proper in the form, the Layout changes perfectly but if the data is not proper it gives client validation & the layout doesn't get changed.
    I want to disable the client side validation just for that page or panelformLayout
    Issue -
    If the data is incorrect on the form, user is able to change the countrycode from the dropdown but the layout doesn't changes because client validation is stopping.
    Below is the code -
    1) Changing the drop down cause the switcher to call the code - defaultFacet="#{backingBeanScope.AddressComp.displayType}" which changes the layout.
    2) But if the data is not correct the country value is getting change with the new Country but the Layout is unable to get change. ADF start showing client validation.
    <af:panelGroupLayout id="pglA1" partialTriggers="plcol1:table1 *usCountryId caCountryId*">
         <af:switcher binding="#{backingBeanScope.AddressComp.switcherComp}" defaultFacet="*#{backingBeanScope.AddressComp.displayType}*">
              <f:facet name="US">
                   <af:panelFormLayout>
                        <af:selectOneChoice value="#{bindings.CntryCd.inputValue}" label="#{bindings.CntryCd.label}" required="#{bindings.CntryCd.hints.mandatory}"
         id="usCountryId" autoSubmit="*true*">
                        <f:selectItems value="#{bindings.CntryCd.items}" id="si14"/>
                   </af:selectOneChoice>
                   </af:panelFormLayout>
              </f:facet>
              <f:facet name="CA">
                        <af:panelFormLayout>
                        <af:selectOneChoice value="#{bindings.CntryCd.inputValue}" label="#{bindings.CntryCd.label}" required="#{bindings.CntryCd.hints.mandatory}"
         id="caCountryId" autoSubmit="true">
                        <f:selectItems value="#{bindings.CntryCd.items}" id="si14"/>
                   </af:selectOneChoice>
              </af:panelFormLayout>
              </f:facet>
         </af:switcher>
    </af:panelGroupLayout>

  • DHCP client fails to get an valid IP address from DHCP server. windows 8.1

    I have a win 8.1 Pro  64 bit pc in my office .I'm trying to connect it to my wireless cisco router with either wireless or hardwired connection but I get an error in the event viewer with discription DHCP error 1007. and Ip address showing
    169.254.93.17 but our dhcp range is 192.168.1.x
    Log Name:      Microsoft-Windows-Dhcp-
    Source:        Microsoft-Windows-Dhcp-Client
    Date:          23/Jun/2014 12:03:21 PM
    Event ID:      1001
    Task Category: Address Configuration State Event
    Level:         Error
    Keywords:      (1)
    User:          LOCAL SERVICE
    Computer:      sanddeplap.vts.com
    Description:
    Your computer was not assigned an address from the network (by the DHCP Server) for the Network Card with network address 0xF4B7E22D8721.  The following error occurred: 0x79. Your computer will continue to try and obtain an address on its
    own from the network address (DHCP) server.
    Event Xml:
    <Event xmlns="http://schemas.">
      <System>
        <Provider Name="Microsoft-Windows-Dhcp-
        <EventID>1001</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>3</Task>
        <Opcode>75</Opcode>
        <Keywords>0x4000000000000001</
        <TimeCreated SystemTime="2014-06-23T08:03:
        <EventRecordID>363</
        <Correlation />
        <Execution ProcessID="988" ThreadID="7932" />
        <Channel>Microsoft-Windows-
        <Computer>sanddeplap.vts.com</
        <Security UserID="S-1-5-19" />
      </System>
      <EventData>
        <Data Name="HWLength">6</Data>
        <Data Name="HWAddress">F4B7E22D8721<
        <Data Name="StatusCode">121</Data>
      </EventData>
    </Event>
    I tried to track issue with microsoft network monitor I'm attaching the capture file also please help me to sort out this issue
    capture report https://onedrive.live.com/redir?resid=AFE3D0245A92F6F8%21183

    The issue is that your machine is not being assigned an IP address / was unable to reach the DHCP server to receive one. The 169.254.x.x IP your machine is showing isn't assigned from DHCP, it's assigned by the local machine and is referred to as an APIPA
    address.
    So something is preventing your machine from reaching your DHCP server, which could one of a number of things. In the first instance I'd suggest having a look at
    http://epan36.blogspot.co.uk/2012/09/eventid-1001-dhcp-your-computer-was-not.html which lists several of things that could cause this error and things you can try in order to resolve it.
    If none of those work, can you confirm whether you have any other machines connecting via the same method on the network, which might indicate whether this is an issue at the machine end or somewhere between the machine and DHCP server?

  • Any way to bypass server certificate validation in AIR client?

    Is there any way to bypass certificate validation and server identification for secure Channels or ChannelSets? I am aware of the existing workaround to import my own certificate into the user's CA chain, but I feel that having greater control on the client-side is preferred.
    If there is not a way to bypass client-side certificate validation I will be filing this as a feature request at http://bugs.adobe.com
    Thanks,
    Karl
    When producing a client-server solution it is occasionally useful to override the default behavior of HTTPS certificate validation and server identification. I would like to request the ability to override these systems in the AIR environment for applications installed with the "UNRESTRICTED" system access option.
    Simply allowing the use of self-signed certificates without verification (perhaps signified by a secure protocol identifier other than "https") would provide adequate functionality, but some users may desire finer control.
    This issue is partly addressed by bugs FP-711 and FP-214 but I feel it is important that any enhancement include the BlazeDS Channel in the case that the AIR application has unrestricted system access.
    When deploying an AIR client application which is securely connected to a network appliance which is controlled by the same developer it is desirable to bypass the overhead of acquiring a PKI issued certificate for every customer. Independent, open-source, and not-for-profit developers could see increased ability to adopt the AIR platform with this improvement.
    When deploying a network appliance to be used with an AIR application the requirement for a PKI issued certificate complicates the deployment of the network appliance by requiring DNS access, and thereby requiring Internet connectivity. Some customer sites require network isolation.
    It is possible to generate a developer-specific certificate and import that certificate into the AIR client host's Trusted Root Certification Authorities list. This workaround deteriorates PKI best practices and complicates the installation of AIR software. It is not possible to depend solely on the ".air" packaging for installation with the added requirement to install a new CA on the user's host.
    Java provides the requested functionality by allowing developers to provide their own implementations of javax.net.ssl.TrustManager for verification and javax.net.ssl.HostnameVerifier for identification. We have used this technique to communicate over the SDEE protocol with Cisco IDS devices which do not usually have PKI issued certificates.

    Hi Robert,
    No specific option to controle TOP/First features use.
    However other options exist to control IQ resources.
    Eg. Query_temp_sopace_limit, Query_Time, Max_IQ_Threads_Per_Connection, Max_Cartesian_Result.
    Regards,
    Tayeb.

  • OIM 11gR2 Request Validator Plugin and Axis based Web Service Client

    Hi,
    I am trying call a web service client generated using axis2 from a request validator plugin in OIM 11gR2 and I have all the axis related jar files under the plugin lib folder but it fails due to the axis reference issues.
    I tried putting the jar files under different locations like thirdparty folder, server lib etc. But it is giving issues every where. Please let me know if you have some solution.
    Thanks in advance,

    Haven't worked on this, but have you tried by putting the axis libraries inside the plugin lib folder when you are building up the plugin? Also you need to check asix2 compatibility with weblogic version with R2.
    -Bikash

  • How to setup default gateway in a DHCP client. The default gateway will be the Ip address of the server that has RRAS installed, hence routing cabalities.

    How to setup default gateway in a DHCP client. The default gateway will be the Ip address of the server that has RRAS installed, hence routing cabalities.

    Hi Bill,
    Thank you for replying back...Yes, I was actually asking how do you set the default gateway address on the DHCP server?,
    I believe I got the answer below:
    To configure the DHCP default gateway option Click Start, point to Administrative Tools and then click DHCP. In the console tree, expand the applicable DHCP server, expand IPv4, and then right-click Scope Options Click Configure Options, check 003
    Router, type the applicable Server name and IP address, and then click OK.
    Thank you

  • How get the RVS4000's DHCP server to assign another IP address other than its own as the default gateway to its DHCP clients?

    Hi,
    I have a RVS4000 router with DHCP enabled and in router mode. 
    The LAN is 192.168.2.x.  The RVS4000 static IP address is 192.168.2.8
    The router is not the RVS4000 and is at 192.168.2.1
    The RVS4000 dhcp is assigning it's clients a default gateway of 192.168.2.8 instead of what I want 192.168.2.1.
    How can I get the RVS4000's DHCP server to assign another IP address other than its own as the default gateway to its DHCP clients?
    Thanks

    Hi Gail, you cannot do this. The router, as the DHCP server will only assign a default gateway of what IP interface the DHCP server runs on. If you have the default IP, the gateway is 192.168.1.1. If you create a second vlan, by default it would be 192.168.2.1.
    There are not configuration options for the built-in DHCP server. If you'd like to expand this functionality, you would need an external dhcp server.
    -Tom
    Please mark answered for helpful posts

  • Why doesn't my airport express router issue proper DNS server address to DHCP clients?

    I have an Airport express router (version 7.6.4).  It was configured to connect to internet via a cable modem, acting as a router with NAT. This means it obtians WAN address from cable modem, and in LAN it assumes IP address 10.0.1.1 as a gateway, and issue IP address to my 4-5 wireless clients (MBA, iPads, PCs) vi DHCP.
    However I recently encounter an issue, that the router no longer issues DNS server address obtained from Cable Modem(206.x.x.x) but instead tell every DHCP client to use router ip address (10.0.1.1) as DNS server. I was pretty sure before Dec 2013 it is issueing (206.x.x.x) to all DHCP clients.
    Apparently now the Airport express is acting as a DNS server or as a DNS cache. This works sporadically and very often result in long DNS look up or DNS look up failure.
    Is this a bug or is it supposed to do so?  Any configuration can turn it off so Airport express will issue Cable modem obtained DNS server to DHCP clients?
    My network otherwise works fine. for some of the Clients (e.g. one MBA) I configured DNS for it mannually and it's internet is working very smoothly.

    But this will be a problem for my ipad and iphone that uses wifi.
    These devices either allow full DHCP. If you need to mannually enter DNS server, you will need to turn entire IP configuration to mannual and that will be a problem for me.

  • Client server null response for some requests!

    Hi, I have a client server application. When run on my local machine it runs fine. However when is put on the unix server some requests come back with null responses. I have logging implemented and the response in the logs is fine but it doesnt get sent back to the client. There is no timeout set either! any ideas?

    If you get an empty reponse (note that you cannot get a null response) then your server is probably encountering an error that is subsequently being caught before any response is written. Check your server code for "catch" staments that throw away the exception.
    If the server does not suffer this problem then your client does.
    matfud

  • Can an Axis client receive a server request ?

    Hi,
    I wish my question won't be stupid but I'm a newbie about Web Services.
    According to the Axis architecture guide, the classic communication schema between the client and the server is :
    Axis Client ----HTTP request----> Server
    Axis Client <----HTTP response---- Server
    But can I do this ?
    Axis Client <----HTTP request---- Server
    Axis Client ----HTTP response----> Server
    and this ?
    Axis Client ----HTTP request----> Server
    Axis Client <----HTTP response---- Server
    Axis Client <----HTTP request---- Server
    Axis Client ----HTTP response----> Server
    Thanks for your answers.

    At the first time, thanks for your help.
    It can be usefull to a remote management server to configure a parameter of a router.
    The remote management server get the list of parameters of the router and test if the concerned value is the good one.
    Axis Client <----HTTP request---- Server : getParameterValues
    Axis Client ----HTTP response----> Server : getParameterValuesResponse
    It is not the good value so the server set it.
    Axis Client <----HTTP request---- Server : setParameterValues
    Axis Client ----HTTP response----> Server : setParameterValuesResponse
    Globaly it is the client (the router) which send requests to the server but in this particular case, it is the server.
    Did I make a mistake ? What I want to do is it possible ?
    Thanks.

  • WRT54G dhcp clients table missing linux boxes - only windows listed

    I've searched the forum and similar messages and other routers mention that a firmware update will fix the problem where not all dhcp connections show up in the status/local networks/dhcp clients table.
    I have WRT54G hardware version 6, firmware v 1.00.06.
    I've looked at the firmware updates and no mention of this problem appears. I don't want to needlessly update my firmware.
    Does anyone know if this problem has been fixed in the latest firmware?

    More info:
    It seems that the linux box (ubuntu 7.04) is using the bootp protocol, not full dhcp. From some reading of the rfc's it seems that dhcp is an enhancement to bootp, and it is valid for clients to request an ip address from a dhcp server (the protocols use the same ports etc.).
    However, bootp does not deal with a lease and since the dhcp client tables list a lease time, I am guessing that this different way of getting an ip address is what is messing with the router.
    On the one hand, it could be said that since it's not a full dhcp client, the router would be technically correct to not show it in the client list.
    But, it does make for a bit of a messy situation as some clients can appear invisible to the network configuration manager. This could be a security issue.

  • Win7 dhcp client: sending options

    I am trying to change dhcp option 60 and 43 on my Windows 7 Cleint PC.
    The standard option 60 - vendor class identifier is set to "MSFT 5.0" and I would like to change it to a different value of "Siemens". Similarly I want to send a Vendor Specific ID using option 43.
    I have tried to add:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCP\Parameters\Options\DhcpSendOptions
    "60"=hex:3c,07,53,69,65,6d,65,6e,73
    but try as I will, it will not send anything modified in the DHCP client request to the server.
    Do I need to put the registry entry somewhere else or in a different format?
    Thanks.

    Hi,
    After research, I found this registry key was supported by Windows CE and may not be supported in Windows 7. Otherwise, I have not found any documents that mentioned this.
    Juke Chou
    TechNet Community Support

  • DHCP client does not work poperly after systemd and Gnome 3.6 upgrade

    Upgraded my system today from Gnome 3.4 to 3.6 (and systemd was updated as well), and since then acquiring an IP address using DHCP does not work anymore.
    I am using IPv4 only internally, but neither dhclient or dhcpcd manages to get an IPv4 address.
    It seems like IPv6 is priority one, and beacuse there is no IPv6 DHCP server available NetworkManager aborts the whole setup process.
    To make sure that IPv6 should not be considered, I have changed "method" in NetworkManager to "Ignore" for IPv6.
    I have also tried to downgrade NM to 0.9.6.0 from 0.9.6.4 (since that version works on another, not upgraded, machine), without any result.
    Also switched dhclient to dhcpcd, without any result.
    The machine is a "pure" systemd machine.
    DHCP works for other devices in the network.
    Versions:
    systemd 195-2
    NetworkManager 0.9.6.4
    isc-dhclient-4.2.3-P2
    I have no issues on a system where following versions are running:
    systemd 189-4
    NetworkManager 0.9.6.0
    dhcpcd 5.6.2
    Log: http://pastebin.com/2wMC0JLe

    Think I have identified the issue now.
    Neither dhcpcd or dhclient is sending the host name properly to the DHCP server anymore. I had an IP address reserved in the DHCP server for my host and after deleting this reservation my host is able to acquire an IP (dynamic) address. The reserved static address could never be acquired.
    Conclusion: dhclient and dhcpcd is not sending the host name as before, causing the DHCP server to get stuck (while waiting for the host name) whenever a NIC with a reserved IP address is requesting an IP address.
    Downgrading the dhcp clients has not yet worked, so there might be some underlying component that is causing the problem. ath5k? systemd?

  • Server side validation

    Hi I am trying to validate two forms the first form allows a customer to register if it is correctly validated then it proceeds to address form as these two tables are linked by foreign key so when u create account in one need to do it at the same time for both. I tried client side JavaScript to validate the forms which works but don t prevent the accounts from being created if wrong. This method I tried to implement:
    ackage projectshowbeans;
    import java.sql.*;
    import java.util.*;
    import java.util.HashMap;
    public class customer2 {
         private String bnDbDriver = "org.gjt.mm.mysql.Driver";
         private String bnDbId = "jdbc:mysql://localhost/c99nrdb";
         private String bnDbUser = "c99nr_web";
         private String bnDbPassword = "Thank=88";
         private String custId;
         private String bnTitle="";
         private String bnFirstName="";
         private String bnLastName="";
         private String bnType_Of_Occupation="";
         private String bnemail="";
         private String bnpassword="";
         private String bnpassword2="";
         private String bnType="";
         private String bnNumber="";
         private String bnExp_Date="";
         private String bnCardholder_Name="";
         private String bnemail2="";
         private String mostRecentDeletion = "Nothing has been deleted";
         private int validate = 0;
         private String custid="";
         private int validatem = 0;
         private HashMap validationerrors = new HashMap();
         //StringTokenizer is used to check for empty spaces as in prevents user from submitting a empty form
         //countTokens count the number of empty spaces between the words if no words no token it would be empty and validate to 0
         //otherwise it would equal 1 and the message output shall appears on the screen. To be exact as long as it count the number of whitespaces this means
         //if it is more then 1 it can be then there must be text present in the text field and thus tokens can be made.
         /*public String getIsEmpty()
              String output = "nothing";
              StringTokenizer Email = new StringTokenizer(getBnEmail());
              StringTokenizer Title = new StringTokenizer(getBnTitle());
              StringTokenizer FirstName = new StringTokenizer(getBnFirstName());
              StringTokenizer LastName = new StringTokenizer(getBnLastName());
              StringTokenizer Occupation = new StringTokenizer(getBnType_Of_Occupation());
              StringTokenizer Password = new StringTokenizer(getBnpassword() );
              StringTokenizer confirmpass = new StringTokenizer(getBnpassword2());
              StringTokenizer Numbers = new StringTokenizer(getBnNumber());
              StringTokenizer Date1 = new StringTokenizer(getBnExp_Date());
              StringTokenizer Type = new StringTokenizer(getBnType() );
              StringTokenizer cardholder = new StringTokenizer(getBnCardholder_Name());
              if (Email.countTokens() < 1 || Title.countTokens() < 1 || FirstName.countTokens() < 1 || LastName.countTokens() < 1 || Occupation.countTokens() < 1 || Password.countTokens() < 1 || confirmpass.countTokens() < 1 || Numbers.countTokens() < 1 || Date1.countTokens() < 1 || Type.countTokens() < 1 || cardholder.countTokens() < 1)
                   output = "Please fill in all fields. Thank you.";
                   System.out.println("this is empty at first attempt and then second time nothing typed");
                   validatem = 0;
                   output = "To fill in your address details proceed to this page by <a href=\"../jsp/NewAddress.jsp\"> clicking here</a>";
                   validatem = 1;
              return output ;
         public boolean isValidUserData() {
                   System.out.println(bnFirstName);     
                   return (( bnFirstName !=null) && (bnFirstName.length() >0) &&
                        (bnpassword !=null) && (bnpassword.length() != 8) &&
                        (bnpassword2 !=null) && (bnpassword2.length() != 8)&&
                        (bnemail !=null) && (bnTitle !=null) &&
                        (bnLastName != null) && (bnLastName.length() >0) &&
                        (bnType !=null) && (bnNumber !=null) &&
                        (bnExp_Date !=null) && (bnCardholder_Name != null) &&
                        (bnType_Of_Occupation !=null));
         public String getFieldError(String fieldname) {
              return ((String) validationerrors.get(fieldname));
         public void addFieldError(String fieldname, String error) {
              validationerrors.put(fieldname, error);
         public boolean validateCustomer() {
              validationerrors.clear();
              boolean valid = true;
              if ((bnemail == null) ||
                   (bnemail.length() == 0)) {
                   addFieldError("frmemail", "email address is required.");
                   valid = false;
              } else {
                   if (bnemail.indexOf("@")== -1) {
                        addFieldError("email", "please supply a valid address");
                        valid =false;
              if ((bnpassword == null) ||
                   (bnpassword.length() != 8)) {
                   addFieldError("frmpassword", "Password is required.");
              return valid;
    if(form1.frmpassword.value.length != 8 )
                        //alert(form1.frmpassword);
                        alert("Password must be eightt characters long");
                        form1.frmpassword.focus();
                        form1.frmpassword.select();
                        return(false);
                   else
                        if(form1.frmpassword2.value != form1.frmpassword.value)
                             alert("The confirmation password does not match the original password");
                             form1.frmpassword2.focus();
                             form1.frmpassword2.select();
                             return(false);
              </SCRIPT>
              <% if (request.getParameter("SUBMITTED") != null) {
                   try {
                        if (newcust.validateCustomer()) {
                             newcust.createcustomer();
                             response.sendRedirect("NewSuccess1.jsp");
                   } catch (Exception e){
                        //System.out.println("customer2.JSP:" + e);
                        newcust.addFieldError("frmemail", "email already in use");
              if (newcust.getBnEmail() == null) {
                   newcust.setBnEmail(" ");
              if (newcust.getBnpassword() == null) {
                   newcust.setBnpassword("");
              %>
              <TITLE>
                   Create New Customer Account
              </TITLE>
         </HEAD>
         <BODY>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu 2.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
                             <Form method="post" action="NewSuccess1.jsp" id="form1" name="form1" return onsubmit="validation()"> <%--post prevents the variable being passed in the url--%>
                                  <input type="Hidden" name="SUBMITTED" Value="T">
                                  <table border ="1">
                                       <tr>
                                            <%--/*if (newcust.getFieldError("frmemail") != null) {%>
                                            <%//newcust.getFieldError("frmemail")%></font><br></td>*\--%>
    Java methods aree fine but when I try to access these ion the JSP page it fucks up I can t see how to resolve the issues can anyone help ?

    Hi the code that I showed you was on two separate pages one in the java file where I have tried numerous methods at server side validation
    e.g.
    private int validate = 0;
    //StringTokenizer is used to check for empty spaces as in prevents user from submitting a empty form
         //countTokens count the number of empty spaces between the words if no words no token it would be empty and validate to 0
         //otherwise it would equal 1 and the message output shall appears on the screen. To be exact as long as it count the number of whitespaces this means
         //if it is more then 1 it can be then there must be text present in the text field and thus tokens can be made.
         /*public String getIsEmpty()
              String output = "nothing";
              StringTokenizer Email = new StringTokenizer(getBnEmail());
              StringTokenizer Title = new StringTokenizer(getBnTitle());
              StringTokenizer FirstName = new StringTokenizer(getBnFirstName());
              StringTokenizer LastName = new StringTokenizer(getBnLastName());
              StringTokenizer Occupation = new StringTokenizer(getBnType_Of_Occupation());
              StringTokenizer Password = new StringTokenizer(getBnpassword() );
              StringTokenizer confirmpass = new StringTokenizer(getBnpassword2());
              StringTokenizer Numbers = new StringTokenizer(getBnNumber());
              StringTokenizer Date1 = new StringTokenizer(getBnExp_Date());
              StringTokenizer Type = new StringTokenizer(getBnType() );
              StringTokenizer cardholder = new StringTokenizer(getBnCardholder_Name());
              if (Email.countTokens() < 1 || Title.countTokens() < 1 || FirstName.countTokens() < 1 || LastName.countTokens() < 1 || Occupation.countTokens() < 1 || Password.countTokens() < 1 || confirmpass.countTokens() < 1 || Numbers.countTokens() < 1 || Date1.countTokens() < 1 || Type.countTokens() < 1 || cardholder.countTokens() < 1)
                   output = "Please fill in all fields. Thank you.";
                   System.out.println("this is empty at first attempt and then second time nothing typed");
                   validatem = 0;
                   output = "To fill in your address details proceed to this page by <a href=\"../jsp/NewAddress.jsp\"> clicking here</a>";
                   validatem = 1;
              return output ;
    This method works it counts the empty spaces and if any it does not allow the user to proceed to same page but if correct it goes to the same page but show all their answers filled using jsp:get Property and then the link above to the other form to fill in the code. However no indivdual messages can be passed to the user which is crap as the people keeps pressing he won t know what is wrong.
    The method that I am currently using is this one:
         public boolean isValidUserData() {
                   System.out.println(bnFirstName);     
                   return (( bnFirstName !=null) && (bnFirstName.length() >0) &&
                        (bnpassword !=null) && (bnpassword.length() != 8) &&
                        (bnpassword2 !=null) && (bnpassword2.length() != 8)&&
                        (bnemail !=null) && (bnTitle !=null) &&
                        (bnLastName != null) && (bnLastName.length() >0) &&
                        (bnType !=null) && (bnNumber !=null) &&
                        (bnExp_Date !=null) && (bnCardholder_Name != null) &&
                        (bnType_Of_Occupation !=null));
    again this method is held in the Java file. This works the best as it checks for empty spaces however the password verification it does not do check whether password 1 matches password 2 nor the fact that password should be 8 characters only or check whether the user is typing in an integer or not etc. I can do this in JavaScript the integer one I am not sure. I then use JSP page which is this below:
    <jsp:useBean
         id="newcust"
         scope="session"
         class="projectshowbeans.customer2"
         />
    <!--
    <jsp:useBean
         id="newaddress"
         scope="page"
         class="projectshowbeans.Address"
         />
    <jsp:setProperty
         name="newaddress"
         property="bnemail"
         param="frmemail"
         />
    -->
    <jsp:setProperty
         name="newcust"
         property="bnEmail"
         param="frmemail"
         />
    <jsp:setProperty
         name="newcust"
         property="bnFirstName"
         param="frmFirstname"
         />
    <jsp:setProperty
         name="newcust"
         property="bnLastName"
         param="frmLastname"
         />
    <jsp:setProperty
         name="newcust"
         property="bnType"
         param="frmtype"
         />
    <jsp:setProperty
         name="newcust"
         property="bnTitle"
         param="frmtitle"
         />
    <jsp:setProperty
         name="newcust"
         property="bnCardholder_Name"
         param="frmcard"
         />
    <jsp:setProperty
         name="newcust"
         property="bnExp_Date"
         param="frmDate"
         />
    <jsp:setProperty
         name="newcust"
         property="bnNumber"
         param="frmnumber"
         />
    <jsp:setProperty
         name="newcust"
         property="bnExp_Date"
         param="frmDate"
         />
    <jsp:setProperty
         name="newcust"
         property="bnpassword2"
         param="frmpassword2"
         />
    <jsp:setProperty
         name="newcust"
         property="bnpassword"
         param="frmpassword"
         />
    <jsp:setProperty
         name="newcust"
         property="bnType_Of_Occupation"
         param="frmoccupation"
         />
    <html>
         <HEAD>
              <SCRIPT language="JavaScript" type="text/javascript">
              /*function validation() {
                        if(form1.frmnumber.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the number field. Thank you");
                             form1.frmnumber.focus();
                             return(false);
                        if(form1.frmemail.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the email field. Thank you");
                             form1.frmemail.focus();
                             return(false);
                        if(form1.frmtitle.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the title field. Thank you");
                             form1.frmtitle.focus();
                             return(false);
                        if(form1.frmFirstname.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the First Name field. Thank you");
                             form1.frmFirstname.focus();
                             return(false);
                        if(form1.frmLastname.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the Last Name field. Thank you");
                             form1.frmLastname.focus();
                             return(false);
                        if(form1.frmDate.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the Exp Date field. Thank you");
                             form1.frmDate.focus();
                             return(false);
                        if(form1.frmcard.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the CardholderName field. Thank you");
                             form1.frmcard.focus();
                             return(false);
                        if(form1.frmpassword.value.length != 8 )
                             //alert(form1.frmpassword);
                             alert("Password must be eightt characters long");
                             form1.frmpassword.focus();
                             form1.frmpassword.select();
                             return(false);
                        else
                             if(form1.frmpassword2.value != form1.frmpassword.value)
                                  alert("The confirmation password does not match the original password");
                                  form1.frmpassword2.focus();
                                  form1.frmpassword2.select();
                                  return(false);
              </SCRIPT>
              <TITLE>
                   Create New Customer Account
              </TITLE>
         </HEAD>
         <BODY>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu3.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
              <Form method="post" action="NewSuccess.jsp"> <%--post prevents the variable being passed in the url--%>
                                  <table border="0">
                                       <tr>
                                       <td><p>Please ensure you fill in all fields below in the form. Once everything is successfully validated you will be taken to another form to fill in your address details.</p></td>
                                       </tr>
                                  <table border ="1">     
                        <tr>
                             <td>email address:</td> <td><Input Name="frmemail" Type="Text" Size="50" value='<jsp:getProperty name="newcust" property="bnEmail" />' >
    </td>
                        </tr>
                        <tr>               
                   <td>Password:</td>
                             <td><Input Name="frmpassword" Type="password" Size="50">
    </td><%--this form simply shows password and studentid type password allows it to be encoded--%>
                        </tr>
                        <tr>
                        <td>Password(Verification):</td>
                        <td><Input Name="frmpassword2" Type="password" Size="50">
    </td><%--this form simply shows password and studentid type password allows it to be encoded--%>
                   </tr>
                        <tr>
                   <td> Title:</td>
                             <td><input name="frmtitle" type="text" size="10" value='<jsp:getProperty name="newcust" property="bnTitle"/>'>
    </td>
                        </tr>
                        <tr>
                   <td>First Name:</td>
                             <td><input name="frmFirstname" type="text" size="30"value='<jsp:getProperty name="newcust" property="bnFirstName"/>'>
    </td>
                        </tr>
                        <tr>
                             <td>Surname:</td>
                             <td><input name="frmLastname" type="text" size="30" value='<jsp:getProperty name="newcust" property="bnLastName"/>'>
    </td>
                        </tr>
                        <tr>
                             <td>Occupation:</td>
                             <td><select name="frmoccupation">
                                       <option> student </option>
                                       <option> doctor </option>
                                       <option> businesman/woman </option>
                                       <option> teacher </option>
                                       <option> other </option>
                                  <jsp:getProperty name="newcust" property="bnType_Of_Occupation"/>>
                                  </select>
                             </td>
                        </tr>
                        <tr>
                             <td>Number:</td>
                             <td><input name="frmnumber" type="text" size="20" value='<jsp:getProperty name="newcust" property="bnNumber"/>'>
    </td>
                        </tr>
                        <tr>
                             <td>Type:</td>
                             <td><select name="frmtype" '<jsp:getProperty name="newcust" property="bnType"/>'>
                                  <option> Mastercard</option>
                                  <option> Visa </option>
                                  <option> Switch </option>     
                                  </select>
                             </td>
                        </tr>
                        <tr>
                             <td>exp date(DD/MM/YY):</td>
                             <td><input name="frmDate" type="text" value='<jsp:getProperty name="newcust" property="bnExp_Date"/>'>                                   
                        </tr>
                        <tr>
                             <td>cardholder name:</td>
                             <td><input name="frmcard" type="text" size="10"value='<jsp:getProperty name="newcust" property="bnCardholder_Name"/>'>
    </td>
                        </tr>
                   <tr>
                             <td><input type="submit" value="submit"></td>
                        </tr>
              </form>
              </table>
              <%
              //newcust.createcustomer();
              //newcust.getIsEmpty();
              %>
              <%--
              newaddress.createaddress();
              newaddress.createcustomerID();
              --%>          
         </Body>
    </html>
    I have cancelled the JavaScript as it does not work well with it the NewSucess page is the process page and states if all validation rules are correct carried out on the form by the boolean isValidUserData method then it will create the record in the customer table and provide a link to the following Address form. Otherwise if is false it goes to error page the code is below:
    <html>
         <HEAD>
              <TITLE>
                   Cuystomer Successfully Added
              </TITLE>
         </HEAD>
    <jsp:useBean
         id="newcust"
         scope="session"
         class="projectshowbeans.customer2"
         />
         <jsp:setProperty
              name="newcust"
              property="bnpassword"
              param="frmpassword"
              />
         <jsp:setProperty
              name="newcust"
              property="bnFirstName"
              param="frmFirstname"
    />
         <jsp:setProperty
              name="newcust"
              property="bnpassword2"
              param="frmpassword2"
              />
         <jsp:setProperty
              name="newcust"
              property="bnType_Of_Occupation"
              param="frmoccupation"
              />
         <jsp:setProperty
              name="newcust"
              property="bnNumber"
              param="frmnumber"
              />
         <jsp:setProperty
              name="newcust"
              property="bnExp_Date"
              param="frmDate"
              />
         <jsp:setProperty
              name="newcust"
              property="bnEmail"
              param="frmemail"
              />
         <jsp:setProperty
              name="newcust"
              property="bnFirstName"
              param="frmFirstname"
              />
         <jsp:setProperty
              name="newcust"
              property="bnLastName"
              param="frmLastname"
              />
         <jsp:setProperty
              name="newcust"
              property="bnType"
              param="frmtype"
              />
         <jsp:setProperty
              name="newcust"
              property="bnTitle"
              param="frmtitle"
              />
         <jsp:setProperty
              name="newcust"
              property="bnCardholder_Name"
              param="frmcard"
              />
    <BODY bgcolor="#BDC6DE">
              <%
              if (newcust.isValidUserData()) {
                   newcust.createcustomer();
              %>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu3.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
                        </table>
         <H1> Validating user data </H1>
         <H2> user data validated </h2>
              <p> To fill in your address details proceed to this page by clicking here</p>
              <% } else {
              %>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu3.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
                        </table>
                   <H1> Validating user data </H1>
              <h2> validation failed you have some missing fields</h2>
              <%}%>
    </Body>
    </html>
    Hopefully you have followed that. Ultimately if I can have it working in JavaScript that would excellent it does all form validation the previous code use saw the first JSP page however to then say only create record once I need to say function validation is validated = true then proceed to the next form else false appear with the message to the user and allow them to re - enter their answer I can t do that. I tried just putting the      
    newcust.createcustomer(); and the link to address on a separate page with String email request.getParameter("frmemail") for all of them but did not work. Hopefully you understand my dilemna more clearly now
    and can help me uinforunately I ain t got too long I need to have it done by tuesday its my final year project for my degree. Any help much appreciated.

Maybe you are looking for

  • Preloader for flash presentations?

    Hi all, I need (badly) to add a preloader to a flash presentation. But googling around I didn't found a solution to this. I can't believe that you can't do this in an easy way. I can't re-create the slide presentation from scratch using the flash tim

  • How to get the; popular tag: back in safari. Deleted it.

    How to get the POPULAR tab back in safari after deleting it. Thanks for the help.

  • Object Oriented ALV

    Hi All, I want to know the advantages of using OOPS ALV over the normal ALV function modules and how should we decide whether we need to use Object oriented ALV or normal ALV. Regards, S.Subasree

  • Can't load any files

    Hi there, I just got Logic and Mainstage and installed them on my MacBook. Loading up Logic works fine but when Mainstage loaded it picked up the Halion Orchestral plugin (Cubase 5 is also installed on the MacBook) and as I didn't have the copy prote

  • WRT54GS Router and speedtouch

    Hi, I have just got a new modem (Speedtouch 516) from Primus (Canada) and I tried to connect it to my wireless router (WRT54GS) but I have no internet either by wired (ethernet) or wireless connection. The modem works when it's connected directly to