Simultaneous Client and Server Form Validation using Custom Tag Library

I am developing a custom tag library for validator tags
which are capable of doing client side validation (Javascript)
and server side (Java). My problem is with the development
of a regular expression based validator. Because of differences
in the way Javascript and Java handle regular expressions
i can not use the same regular expression for both types of
validation. Is there any way to convert a valid regular
expression from the java.util.regex format into the Javascript
format or vice versa? My major problems are with the (or, ||)
statements and the user of backslashes.

If you are speaking of RE syntax flavours, they are basically the same(namely perl5 flavour). Any expression that works in JS should work in j.u.regex too.
Though, their usage is quite different.
So, there is no need for convertion of expressions.
But porting the code may be not so trivial.

Similar Messages

  • Problem using custom tag library in portlet's jsp

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

  • 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>

  • Error using custom tag library

    Hi All,
              I am getting the following error:
              On the browzer page when I invoke the foo.jsp page containing a tag
              library.
              Parsing of JSP File '/jsp/foo.jsp' failed:
              /jsp/foo.jsp(7): Could not parse deployment descriptor:
              org.xml.sax.SAXParseException: Could not parse taglib, starting at
              line 5
              probably occurred due to an error in /jsp/foo.jsp line 7:
              <%@ taglib uri="example-taglib.tld" prefix="eg" %>
              Wed Mar 27 13:17:49 PST 2002
              The configutation is as follows
              Foo.jsp in documentRoot/jsp
              tld file in documentRoot/WEB-INF
              class files in documentRoot/WEB-INF/classes/examples.
              The server is spitting out the following code:
              weblogic.servlet.jsp.JspException: (line 7): Could not parse
              deployment descript
              or: org.xml.sax.SAXParseException: Could not parse taglib, starting at
              line 5
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.lang.RuntimeException.<init>(RuntimeException.java:47)
              at weblogic.servlet.jsp.JspException.<init>(JspException.java:9)
              Can anyone help me with this ?
              Thanks for your help!!
              SundayFunday!
              

    Could anyone please let me know what is going on here?
              SundayFunday!
              [email protected] (SundayFunday) wrote in message news:<[email protected]>...
              > Can anyone help me with this?!!
              >
              > Thanks!
              >
              > Sundayfunday.
              >
              > [email protected] (SundayFunday) wrote in message news:<[email protected]>...
              > > Hi All,
              > >
              > > I am getting the following error:
              > >
              > > On the browzer page when I invoke the foo.jsp page containing a tag
              > > library.
              > >
              > > Parsing of JSP File '/jsp/foo.jsp' failed:
              > > --------------------------------------------------------------------------------
              > > /jsp/foo.jsp(7): Could not parse deployment descriptor:
              > > org.xml.sax.SAXParseException: Could not parse taglib, starting at
              > > line 5
              > > probably occurred due to an error in /jsp/foo.jsp line 7:
              > > <%@ taglib uri="example-taglib.tld" prefix="eg" %>
              > > --------------------------------------------------------------------------------
              > > Wed Mar 27 13:17:49 PST 2002
              > >
              > >
              > >
              > > The configutation is as follows
              > >
              > > Foo.jsp in documentRoot/jsp
              > >
              > > tld file in documentRoot/WEB-INF
              > > class files in documentRoot/WEB-INF/classes/examples.
              > >
              > >
              > >
              > > The server is spitting out the following code:
              > >
              > > weblogic.servlet.jsp.JspException: (line 7): Could not parse
              > > deployment descript
              > > or: org.xml.sax.SAXParseException: Could not parse taglib, starting at
              > > line 5
              > > at java.lang.Throwable.fillInStackTrace(Native Method)
              > > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > > at java.lang.Throwable.<init>(Compiled Code)
              > > at java.lang.Exception.<init>(Compiled Code)
              > > at java.lang.RuntimeException.<init>(RuntimeException.java:47)
              > > at weblogic.servlet.jsp.JspException.<init>(JspException.java:9)
              > >
              > >
              > > Can anyone help me with this ?
              > >
              > > Thanks for your help!!
              > >
              > > SundayFunday!
              

  • Problem in using jsp 1.1 custom tag library in websphere

    I am using was 3.5.2. Everything has been installed properly. I am using jdeveloper 3.2 for building the jsp application using custom tag library. But when I run the jsp file in browser, its gives dr. watson on java.exe. I am using websphere 3.5.2 application server.
    Have any body got this type of prob. ...
    pls respond asap.
    Thanks in Advance
    Yogesh

    Let me explain the problem again
    I am using was(websphere) 3.5.2. Everything has been installed properly. I am using jdeveloper 3.2 for building the jsp application using custom tag library.
    Application works fine in JDeveloper 3.2.
    Application works fine even when deployed on JRun 3.0. ( we are evaluating various web servers).
    How when deployed on WAS and I run the jsp file in browser, its gives dr. watson on java.exe. I am using websphere 3.5.2 application server.
    WAS has typical settings as against JRun and Tomcat and may be I have not set the necessary paths.
    Have any body got this type of prob. ...
    pls respond asap.
    Thanks in Advance
    Yogesh
    null

  • UIX - unable to turn off client and server side field validation

    Hello,
    I've scoured the forums for info on how to turn off client / server side field validation, for the very common case of a Cancel button. Here's the use case:
    User enters a page displaying records of some kind that can be edited, or an option to create a new one. User clicks create, is taken to a new data entry form. Before entering any data, the user decides he isn't interested, and clicks the cancel button.
    The problem I'm having is that I'm getting messages that required fields have no values. I have found several references on this forum that setting the submitButton attribute unvalidated="true" will turn off client side validation. Here's what my submitButton looks like:
    <submitButton text="Cancel" event="success" unvalidated="true"/>
    But I am still getting errors, such as:
    JBO-27014: Attribute ListName in DealerListAppModule.WebDlrListsView1 is required
    Now I have also seen references in the forums to turning off server side validation by overriding the validatModelUpdates method in the DataAction. I have done this too. No luck.
    Any ideas why this isn't working? I have seen other posts in the forums stating that there were improvements in JDev 10.1.2 that caused a create but not insert, where you could just navigate away from the page you were on, without having to worry about rolling back the create of a new record. I am also not seeing this behavior either. I am using 10.1.2, completely updated, but when I execute a create, if I navigate back from the create page to the original one without saving (i had to fool with this to get it to work because of the validation problems above), I am still seeing the blank, created record in my rowset. I originally created my project in 9.0.5.2, but am now using 10.1.2, and having migrated the project.
    So what's the deal? What's the definitive way to turn off both client side and server side validation, and what's the status of this create but not insert functionality?
    Brad

    Haven't worked with this but possibly this method of "deactivation" is not valid in 11gR2? Have you cross checked that with Oracle support?

  • How to create client and server app using node.js in firefox os.

    I want to create a client and server app using node.js for firefox os. Please suggest me how to create a apps.
    I want to send a request from client to server and based on client request, service reply to client.
    If any links available, Please share it.
    Thanks

    Hi sb00349044,
    The SUMO forums focuses on end-user support.
    For questions about developing for Firefox OS, you will find better guidance in MDN, StackOverflow, and mailing lists:
    * [https://developer.mozilla.org/en-US/Firefox_OS MDN - Firefox OS]
    * [http://stackoverflow.com/questions/tagged/firefox-os StackOverflow - Firefox OS]
    * [https://lists.mozilla.org/listinfo Mailing Lists at Mozilla]
    Thanks,
    - Ralph

  • Async tcp client and server. How can I determine that the client or the server is no longer available?

    Hello. I would like to write async tcp client and server. I wrote this code but a have a problem, when I call the disconnect method on client or stop method on server. I can't identify that the client or the server is no longer connected.
    I thought I will get an exception if the client or the server is not available but this is not happening.
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    How can I determine that the client or the server is no longer available?
    Server
    public class Server
    private readonly Dictionary<IPEndPoint, TcpClient> clients = new Dictionary<IPEndPoint, TcpClient>();
    private readonly List<CancellationTokenSource> cancellationTokens = new List<CancellationTokenSource>();
    private TcpListener tcpListener;
    private bool isStarted;
    public event Action<string> NewMessage;
    public async Task Start(int port)
    this.tcpListener = TcpListener.Create(port);
    this.tcpListener.Start();
    this.isStarted = true;
    while (this.isStarted)
    var tcpClient = await this.tcpListener.AcceptTcpClientAsync();
    var cts = new CancellationTokenSource();
    this.cancellationTokens.Add(cts);
    await Task.Factory.StartNew(() => this.Process(cts.Token, tcpClient), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
    public void Stop()
    this.isStarted = false;
    foreach (var cancellationTokenSource in this.cancellationTokens)
    cancellationTokenSource.Cancel();
    foreach (var tcpClient in this.clients.Values)
    tcpClient.GetStream().Close();
    tcpClient.Close();
    this.clients.Clear();
    public async Task SendMessage(string message, IPEndPoint endPoint)
    try
    var tcpClient = this.clients[endPoint];
    await this.Send(tcpClient.GetStream(), Encoding.ASCII.GetBytes(message));
    catch (Exception exception)
    private async Task Process(CancellationToken cancellationToken, TcpClient tcpClient)
    try
    var stream = tcpClient.GetStream();
    this.clients.Add((IPEndPoint)tcpClient.Client.RemoteEndPoint, tcpClient);
    while (!cancellationToken.IsCancellationRequested)
    var data = await this.Receive(stream);
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    private async Task Send(NetworkStream stream, byte[] buf)
    await stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
    await stream.WriteAsync(buf, 0, buf.Length);
    private async Task<byte[]> Receive(NetworkStream stream)
    var lengthBytes = new byte[4];
    await stream.ReadAsync(lengthBytes, 0, 4);
    var length = BitConverter.ToInt32(lengthBytes, 0);
    var buf = new byte[length];
    await stream.ReadAsync(buf, 0, buf.Length);
    return buf;
    Client
    public class Client
    private TcpClient tcpClient;
    private NetworkStream stream;
    public event Action<string> NewMessage;
    public async void Connect(string host, int port)
    try
    this.tcpClient = new TcpClient();
    await this.tcpClient.ConnectAsync(host, port);
    this.stream = this.tcpClient.GetStream();
    this.Process();
    catch (Exception exception)
    public void Disconnect()
    try
    this.stream.Close();
    this.tcpClient.Close();
    catch (Exception exception)
    public async void SendMessage(string message)
    try
    await this.Send(Encoding.ASCII.GetBytes(message));
    catch (Exception exception)
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    private async Task Send(byte[] buf)
    await this.stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
    await this.stream.WriteAsync(buf, 0, buf.Length);
    private async Task<byte[]> Receive()
    var lengthBytes = new byte[4];
    await this.stream.ReadAsync(lengthBytes, 0, 4);
    var length = BitConverter.ToInt32(lengthBytes, 0);
    var buf = new byte[length];
    await this.stream.ReadAsync(buf, 0, buf.Length);
    return buf;

    Hi,
    Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
    According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    Console.WriteLine(exception.Message);
    Unable to read data from the transport connection: An existing   connection was forcibly closed by the remote host.
    By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Socket communication between client and server

    Hi all,
    I am doing an assignment for communication between java client and java server using sockets. This communication is in the form of XML documents. I am facing a problem in this communication.
    Actually at Server side I'm creating an XML document(Document type object) using DocumentBuilderFactory in javax.xml.parsers package and transforming this Document into a stream using StreamResult.
    My code is :
    Transformer xmlTransformer = TransformerFactory.newInstance().newTransformer();
    StreamResult xmlString = new StreamResult(currentClientHandler.getSocketOutputStream());
    DOMSource xmlDocSource = new DOMSource(xmlDocument); // xmlDocument is Document type reference
    xmlTransformer.transform(xmlDocSource, xmlString);
    so, this xmlString(i.e. StreamResult) is passed directly into the output stream. Here I need to close() output stream after transform() call to help SAX parser to know about end of stream.
    Now at Client side, I am parsing this stream using SAX parser. It parses this correctly. But when sending some another data back to Server when client opens output stream, it given Socket closed exception. I know that closing input or output stream closes socket. But in my problem, I have to send data in streams and not by using files or byte[] etc.
    So what is nearest solution to problem ??
    Plz help me. Any kind of help will be greatly appreciated.

    hi
    thanks for ur reply.
    I didnt get any error msg while getting the back the datas.
    Actually i divided my application into two parts.
    My application will act as both server and client.
    server ll get the browser request and send to the client and the client will send that data to the c++ server.
    Im able to do that.and unable to get the data from server.
    Didnt get any error.
    can u tell me how to make an application to act as both client and server.
    I think im wrong in that part.
    thanks a lot

  • Problem deploying and using custom Tags in jar files

    I am trying to create a custom tag library of Java classes, package them in a JAR file, and use them in another web application. Here is the JAR file structure, named mytags.jar:
    META-INF
    META-INF/manifest.mf
    META-INF/taglib.tld
    mytags/FooBar.class
    mytags/Another.class
    ...Here is the taglib.tld file:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <taglib xmlns="http://java.sun.com/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
    version="2.0">
       <tlib-version>1.0</tlib-version>
       <short-name>foo</short-name>
       <uri>fooTags</uri>
       <info>My tags</info>
       <tag>
         <name>fooBar</name>
         <tag-class>mytags.FooBar</tag-class>
         <body-content>empty</body-content>
         <attribute>
           <name>name</name>
           <required>false</required>
           <rtexprvalue>true</rtexprvalue>
         </attribute>
      </tag>
    </taglib>The FooBar class has getName(String) and setName() methods.
    In the web application, I have copied mytags.jar into the WEB-INF/lib directory. I've verified that it lands in the corresponding directory for my appserver (I'm using Tomcat 6.0.10).
    Here's the header for my JSP:
    <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib uri="fooTags" prefix="foo" %>
    <foo:fooBar name="dummy" />
    ...When I access my page, the browser sits there and spins, not able to do anything. I know that some of the content is executed, but it is not able to get to the fooTags. I have tried replacing fooTags with WEB-INF/lib/mytags.jar, to no effect.
    According to the docs, I should not need to include anything in web.xml to reference the fooTags. The tag library classes are valid, since I used them as local tags prior to moving them into a Jar library.
    Any help would be appreciated

    Take the code of the jsp file :
    <%@ page language="java" %>
    <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
    <html>
       <head>
         <title> First Struts Application </title>
       </head>
         <body>
            <table width="500" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td> </td>
            </tr>
            <tr bgcolor="#36566E">
              <td height="68" width="48%">
                <div align="left">
                  <img src="images/hht.gif" width="220" height="74">
                </div>
              </td>
            </tr>
            <tr>
             <td> </td>
            </tr>     
           </table>
           <html:form action="Lookup"
                      name="lookupForm"
                      type="wiley.LookupForm" >
           <table width="45%" border="0">
            <tr>
              <td>Symbol:</td>
              <td><html:text property="symbol" /> </td>
            </tr>
             <tr>       
              <td colspan="2" align="center"><html:submit/> </td>
             </tr>       
            </table>              
          </html:form>
         </body>
    </html>

  • How to handle when Client and server write to the socket at the same time

    Hi all,
    I'm writing a socket communication when client and server may write information the the socket at the same time. I look every where but the samples from the internet only shows example of server replies to client after receiving requests from clients.
    Let's say that:
    Client 1 ->Socket 1 -> Server 1
    Now if there are two threads in the server, one blocked waiting for the input from client on socket 1, the second one write something on the socket to client 1, is it possible?
    And if it's possible, if at the time Server 1 writes information to Client 1, Client 1 writes some information to Server 1 too, will there be any conflict problem or the socket could handle that two ways communication simultaneously?
    It's critical questions for me. Thanks for your help.

    I really use Server Client paradigm. However, beside the request, response mechanism, there is also an additional mechanism called update which server periodically send information update to client without the need for a request from client.
    So you suggest client should initiate 2 sockets, one for request and response, one for receiving update from the server? Will this work?

  • Connection between SDM client and server is broken

    Dear All,
    First of all this is what I have
    -NW04 SPS 17
    -NWDS Version: 7.0.09 Build id: 200608262203
    -using VPN connection
    -telnet on port 57018 is succesfull
    I can login to SDM server (from NWDS and from SDM GUI) I can see the state of SDM(green light), restart it, can navigate through tabs in GUI, but every time I am trying to deploy an ear i have this error:
    Deployment exception : Filetransfer failed: Error received from server: Connection between SDM client and server is broken
    Inner exception was :
    Filetransfer failed: Error received from server: Connection between SDM client and server is broken
    I have already read a lot of topics,blogs,notes but didn't find the solution.
    Can anybody help me?
    Best Regards

    Having same issue. Nothing helped so far... Using NWDS 7.0 SP18.
    I have turned SDM tracing on and this is what I see on client side after sending first data package:
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0280/17 Client: finished sending string part"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0280/0 Client: receive String part from Server"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl.receiveFromServer(NetComm ..): Entering method
    com.sap.bc.cts.tp.net.NetComm.receive(): Entering method
    com.sap.bc.cts.tp.net.NetComm: debug "Method "receive(char[])" could not read all requested bytes. There are still 12 bytes to read"
    com.sap.bc.cts.tp.net.NetComm: debug "Caught IOException during read of header bytes (-1,          43):Connection reset"
    com.sap.bc.cts.tp.net.NetComm: debug "  throwing IOException(net.id_000001)"
    com.sap.bc.cts.tp.net.NetComm.receive(): Exiting method
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: Exiting method
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0281/1 Client: connection was broken"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: Exiting method
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0281/0 Client: finshed sendAndReceive"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: Exiting method
    My connection on server is still active so I have to restart SDM server to reset and try it again.
    Anyone have idea whats happening?
    Edited by: skyrma on Feb 24, 2012 2:46 PM
    Edited by: skyrma on Feb 24, 2012 2:47 PM
    Edited by: skyrma on Feb 24, 2012 2:47 PM

  • Client and Server in one process

    Hi all,
    I am trying to create a process which can act as both Client and Server.
    How can I do this?
    Thanks!

    AH. That's a better definition or explanation. Thanks.
    This smells of a single process with multiple threads, each thread handling the basic needs of your requirements. In other words, have a thread deal with making one or more client type connections (use a main thread - the client controller - to spawn client-connection threads. This assumes you need multiplicity in your client-connection model.
    Then make another thread - the server controller - to handle inbound connections, spawning a new thread for each inbound connection. Your main thread, the one that contains your main method, can watch everything that's going on and log or report what's going on in your client and server threads.
    Going into specifics would be a lot to do here. Maybe someone is up for the challenge. Of course, this being a "New to Java Technology" forum, these concepts may be a bit beyond your skillset.
    This is not the only way to go about solving your problem, but it's the only way I can think of at the moment given your requirements.
    Hope this helps some.

  • Communication between client and server

    I am using sockets for communication between the client and the server. is there any other way that i can use for communication between the client and server???

    Plenty of ways: JMS, SOAP, RMI, a RESTful API, writing-files-to-a-shared-directory-on-the-disk, Sneakernet, ...
    Some of them use sockets (or better TCP/IP) as the underlying protocol.
    But to give you a good answer, you would have to tell us why you want a different way. I hope you're not searching for a different way just for the sake of being different.

  • JSSE  Client and server communication problem .err:untrusted server cert

    Hai all,
    I am trying to communicate JSSE client and server.
    I have created root.cert(CA),root.key,server.cert,server.key , client.cert and client.key. All these certificates are created using openssl.
    I have placed root.cert in default keystore cacerts.
    I have created a keystores(server & client) name mykeystore.
    I have placed root.cert and client.cert in the client keystore.
    I have placed root.cert and server.cert in the server keystore.
    But during the run time i am getting javax.net.ssl.SSLException: untrusted server cert chain.
    please suggest the modifications needs to be done to fix the error.
    please tell me In the client keystore and in the server keystore....what certificates we need to put?
    whether my approach as said above is correct or not?
    In java code how to specify this particular certificate we are referring?
    I have coded in this way ....
    SSLContext ctx;
    KeyManagerFactory kmf;
    KeyStore ks;
    char[] prasad = "prasad".toCharArray();
    ctx = SSLContext.getInstance("SSLv3");
    kmf = KeyManagerFactory.getInstance("SunX509");
    ks = KeyStore.getInstance("jks");
    ks.load(new FileInputStream("mykeystore"), prasad);
    kmf.init(ks, prasad);
    ctx.init(kmf.getKeyManagers(), null, null);
    factory = ctx.getSocketFactory();
    But my doubt is we are specifying only keystore name with that how it will check root.cert(ca) and client.cert and server.cert?
    Is there any modifications need in my code?
    Please tell me some way ...
    Thanks ,
    Prasad.

    Hi prasad,
    There will be a problem with the certificates being received from thr remote server or client. Check that your trust store contains the certificate of the remote machine or the CA that signed it and that the certificate has not expired.
    Also be sure that both machines are using the latest version of the JSSE.
    Hope this will help you.
    Regards,
    Anil.
    Technical Support Engineer.

Maybe you are looking for