Protocol Independent Servlets

Hello All,
It is a known fact that the Servlet API is protocol independent and Additional classes like HttpServlet provide facility to use HTTP protocol for communication.
I was just wondering, how to use the protocol independent feature of the Servlet API and use it for my own protocol. Is there any other pratical and simple example where Servlets are used with other protocols other than HTTP. I am really interested to have a look at it.
Thanks in advance!
Regards,
Giridhar Manepalli

Disregard my earler email :-) I somehow managed to
forget few words!
Thanks Steve!
Even before implementing classes which extend
ServletRequestWrapper etc, we need to have certain
protocol specific methods implemented by the web
container.No. The container only cares abuot the general request-response theme. There is the one exception of the HTTP protol. Since the HTTP protocol is the most often used, interfaces for that protocol are defined as part of the J2EE spec (HttpServlet, HttpServletRequest, HttpServletResponse, HttpSession) and implementations provided by the container to fullfill the spec (HttpServlet is a class, no implementation needed. Tomcat uses CoyoteRequest and CoyoteResponse to implement the HttpServletReuest and HttpServletResponse interfaces).
You would be responsible for any protocol except HTTP. But the idea is to follow the same format.
1) Extend GenericServlet to ProtocolServlet.
2) Extend ServletRequest and ServletResponse to ProtocolServletRequest and ProtocolServletResponse
3) Create implementations of the ProtocolServletRequest and ProtocolServletResponse.
-- Best bet is to extend ServletRequestWrapper and ServletResponseWrapper for these classes, since they will need to wrap around the original ServletRequest/ServletResponse.
-- You can follow the basic model provided by the HTTP implementation and never show the name of the implementing classes, just the interfaces ProtocolServletRequest and ProtocolServletResponse
4) Use the ProtocolServlet to read the ServletRequest's input stream and
-- Generate a ProtocolServletRequest and ProtocolServletResponse out of the ServletRequest and ServletResponse provided (along with pertinent information from the request's input stream).
-- Determine the best course of action based on the contents of the input stream
-- Dispatch the ProtocolServletRequest and ProtocolServletResponse to an appropriate method.
I was going through the code of tomcat, I came to
know that CoyoteRequest class which implements
HttpServletRequest, HttpServletResponse interfaces,
is actually the one that is passed to the service
method of the servlet as ServletRequest object.
Now, CoyoteRequest as part of the container contract
implemented HTTP Protocol specific code like "Method
of HTTP Request viz., GET, POST etc" and some more
protocol specific methods.
I think, when J2EE specification says Servlets are
protocol independent, it means that the containers
can implement whatever protocols they want, thereby
the application components deployed in the container
can use that protocol services.It means that the Serlvet container CAN handle any protocol (in theory). The J2EE specs. require a non-specific servlet handling mechanism (GenericServlet, ServletRequest, and ServletResponse). It also requires the container to handle the HTTP protocol because that is the most likely to be used (and is required for JSP. So HttpServlet, HttpServletRequest, and HttpServletResponse, HttpSession).
Servlets can still handle other protocols, but the container will not do it automatically. You will be forced to implement the details which sit on a layer above the generic handling.
You may want to look around the web and see if there is a servlet implementation of the protocol you want to handle. I would be surprised if there is not an FTPServlet suite hanging around. Other protocols are less likely.
If you do have to implement it yourself, make sure you read the specs on the protocl thoroughly. Your implementation will need to flawlessly parse incoming requests and send out responses in a well formed protocol-dependent manner.
>
Any thoughts?
Regards,
Giridhar Manepalli

Similar Messages

  • How to generate protocol independent content by the servlet?

    Hi All,
    How to generate protocol independent content by the servlet?
    Please give some tips..

    Dear All,
    Can anybody explain it with code..Protocol Independent ..
    Not Http Protocol..You can take any of other protocols ...
    Whether I have to use GenericServlet ? If so, then How?Please explain with code?
    Thanks..

  • Web Services are protocols independent?

    Hi Guys,
    I want to know that Web Services are protocol independent? if yes, can i develop a web service in other protocols excepts HTTP and SOAP. Please describe in details.

    Hello,
    I will say it depends how you are qualifying Web Services and related technologies.
    Historically, Web services have been build to use protocol and technologies that will work using Internet technologies and be compliant with Firewall and other internet layers...
    So the network protocols were HTTP/HTTPS.Also, because the service has to be decoupled from the implementation, so we use XML and data representation using Schemas, all define in a wire protocol SOAP.
    So initially Web Services are based on SOAP over HTTP/HTTPS, and the description of the services, the different message types is done in the WSDL, that is itself an XML document. Since the message is an XML document, it is possible to send it using any protocol, the idea being you send the SOAP request to a server the server deal with it and send a response all using SOAP representation. This is why for example in the Oracle Web Service stack in addition to HTTP/HTTPS, you can use JMS as the communication protocol.
    But I also want to add some information about WSIF (Web Services Invocation Framework), where in addition to SOAP, you can use "native" layer to call a Web Service. The idea being that for example if you are building a service where the clients are either hosted on the same server as the service, or remote and outside the firewall... You want in this case to be able to call your java implementation class from the container when you are local, and when a customer wants to call the service from the internet uses the SOAP/HTTP protocol. To learn more about WSIF take a look to this OTN Article: Web Services—Anyhow, Anywhere
    So as you can see Web Services are protocol intependent.
    Regards
    [urlhttp://blog.grallandco.com]Tugdual Grall

  • Genericservlet on a socket

    Hi,
    Is it possible to deploy GenericServlets that would listen on TCP/IP socket messages (without the Http GET line)? I need to write a servlet which listens on Sockets. As am totally new to Sockets am little confused. Can anyone help me on this.
    As in the API doc for GenericServlet:
    Defines a generic, protocol-independent servlet.

    Hi,
    Thanks for the reply.My requirement here is Client sends ASCII messages over TCP/IP. I need to capture this message.
    Here i have two approaches. One is using sockets. But using Sockets means we need to take complete care of Threads. And second method is using Generic Servlet, as Generic servlet can listen on TCP/IP since it is protocal Independent. But am not finding any example as how to start with this approach. Can u help on this. And other method is Use socket to get the TCP/IP messages and forward it to Generic Servlet. But not sure about the advantages and disadvantages of this approach.
    The one i posted was quite misleading i think.. Sorry.. This is the deatailed explanation. Can you please help me with this.

  • GenericServlet on raw socket

    Hi,
              is ist possible to deploy GenericServlets that would listen on raw socket messages (without the Http GET line)?
              As in the API doc for GenericServlet:
              Defines a generic, protocol-independent servlet.
              Thanks,
              Juergen

    That's a pity. No chance of it getting implemented in WLS? I found this paper discussing the problem:
              An Approach Paper for Listener Architecture using Web Server
              http://dev2dev.bea.com/pub/a/2004/06/Approachppr.html

  • Servlets implementing custom protocol in WLS 6.1

              Hi.
              Does WLS 6.1 support other than HTTP/S protocols with servlets? If it does, how
              requests are dispatched to a servlet implementing a custom procotol.
              b r
              juha
              

    No, I don't think it does. You'll have to implement it yourself.
              "Juha Räsänen" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Hi.
              > Does WLS 6.1 support other than HTTP/S protocols with servlets? If it
              does, how
              > requests are dispatched to a servlet implementing a custom procotol.
              >
              > b r
              > juha
              Dimitri
              

  • How to ask for a servlet response into a JSP?

    Hi guys,
    I have the following problem. I developed a servlet able to return a string with some information.
    I would like to see this information from a JSP page. In other words, I would like to encapsule in the jsp page, the info requested to the servlet.
    Is it possible? In this case the servlet returns a piece of HTML text. If there is a way, could it be possible to use the same mechanism for a JSP to ask a servlet to include a picture in the page?
    Many thanks
    /Massimo

    maxqua72 wrote:
    Hi guys,
    I have the following problem. I developed a servlet able to return a string with some information.
    I would like to see this information from a JSP page. In other words, I would like to encapsule in the jsp page, the info requested to the servlet.Just put the result in the request scope and forward the request to the JSP.
    Is it possible? In this case the servlet returns a piece of HTML text. E.g.
    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
        String result = "<b>result</b>";
        request.setAttribute("result", result);
        request.getRequestDispatcher("page.jsp").forward(request, response);
    }page.jsp<p>Result is: ${result}</p>If the servlet actually writes HTML to its response (not so nice) then you can use <jsp:include/> to include it in your JSP page.
    If you want to do it all asynchronously, then indeed consider AJAX.
    If there is a way, could it be possible to use the same mechanism for a JSP to ask a servlet to include a picture in the page?Write an independent servlet for that. You may find this article useful: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • How to use HTTPS with JSSE URLConnection in servlet

    Hi, I have a servlet that calls another servlet using the URLConnection class. This seems to work very well if I am using http. However when trying to call it using https using JSSE I get the following error:
    "javax.net.ssl.SSLHandshakeException: untrusted server cert chain."
    The following is the code that I am using in the servlet:
              java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              System.getProperties().put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
              this.servlet = new URL(servletURL);
              URLConnection conServlet = servlet.openConnection();
    Both of these servlets are under IIS on my machine. I am able to execute each of the servlets from the browser using https directly. Does this sounds like an SSL certifcate problem or is that something in the Java code? Any ideas greatly appreciated.

    Hi,
    Perhaps you can create your own trust manager. I've found this example in another newsgroup: (please note that this example trusts everyone, but you can modify the trust manager as you wish)
    if (putUrl.startsWith("https"))
      //set up to handle SSL if necessary
      System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
      System.setProperty("javax.net.debug", "ssl,handshake,data,trustmanager");
      Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
      //use our own trust manager so we can always trust
      //the URL entered in the configuration.
      X509TrustManager tm = new MyX509TrustManager();
      KeyManager []km = null;
      TrustManager []tma = {tm};
      SSLContext sc = SSLContext.getInstance("ssl");
      sc.init(km,tma,new java.security.SecureRandom());
      SSLSocketFactory sf1 = sc.getSocketFactory();
      HttpsURLConnection.setDefaultSSLSocketFactory (sf1);
    m_url = new URL (putUrl);
    class MyX509TrustManager implements X509TrustManager {
    public boolean isClientTrusted(X509Certificate[] chain) {
      return true;
    public boolean isServerTrusted(X509Certificate[] chain) {
      return true;
    public X509Certificate[] getAcceptedIssuers() {
      return null;
    }Hope this helps,
    Kurt.

  • Non-http servlet engine?

    Hi, I'm new to servlet development and I'm not sure this question has been answered here before. So I apologize if it has.
    Basically I want to have an integrated server that can accept both http and non-http requests. So my initial thought was to write an HttpServlet and a GenericServlet. Then I googled for clues on how to implement that and found from the JavaRanch website http://faq.javaranch.com/java/ServletsFaq#otherProtocols that this task could be a daunting one because that'd imply that I have to write a new servlet engine.
    So my question is, is this true in your expert opinion? And, if the custom non-http protocol has a similar syntax as http (e.g. RTSP), is it possible to just extend the http servlet engine to support it? And would that be doable without much effort?
    Thanks,
    Liang.

    Would you actually need the entire servlet system for the new protocol? For your typical simple request/reply protocol you'd normally:
    Create a server socket.
    When a connection arrives, start a thread to service it.
    In the service thread, read and parse request.
    Send reply.
    Close socket, exit thread.
    A servlet system adds a bunch of stuff to that: a layer that allows you to configure pluggable request handlers; methdod-specific functions (POST -> doPost()); a ServletRequest object; etc. Are those things relevant to the new protocol? Do you have requests with URL-like things in the header, allowing routing requests to different servlets? Do you plan to have lots of servlets for the protocol (one servlet -> no much point in XML-configurable request routing)?
    I'd hope that I wouldn't need to implement a configurable request routing infrastructure. It's a lot of work if it's not really needed. Just write a socket server. If you have an associated web server (e.g. HTML pages from which the user starts RTSP requests) you can even run the socket server inside the servlet container if that helps.

  • Writing a java application which can work in different network protocols

    Hi,
    i am working in an environment where we have different type of system. some systems work on tcp/ip and some systems works on some specific protocols like x.25 etc.,
    so i want to know is it possible to write a protocol independant application in java for solving this problem.( not specifically for x.25 and tcp/ip)
    its urgent!
    regards

    write something independant of its implementation is one of the core principes of Java, simply write to an interface (or abstract interface).
    Then build for each protocol a concrete class which will execute the calls for that specific protocol
    Does this help?

  • Webservice load test through WAPT

    Hi,
    We have developed one webservice in JAVA, and that takes an XML string as input. This webservice we need to load test through WAPT.
    This is very urgent and we are in trouble to proceed. If we are giving the input xml as string it gives the exception like
    no SOAPAction header!
    at org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:1013)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:678)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803).
    We are very much thankful if any of you give us any solution for this.
    Our request XML String is
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header><Interface ChannelIdentifierId="ABC XML 4 OTA DC" Version="2005A" Interface="ABC XML 4 OTA" xmlns="http://www.abcapi.com/Documentation/XML/OTA/4/2005A/"><ComponentInfo Id="37009" User="test" Pwd="test" ComponentType="Hotel" /></Interface></soap-env:Header><soap-env:Body RequestId="200708310425065wZvZr5Ofh" Transaction="HotelAvailRQ"> <OTA_HotelAvailRQ Target="Test" Version="1.003" TimeStamp="2006-08-10T15:28:29+01:00" xmlns="http://www.opentravel.org/OTA/2003/05" BestOnly="false" SummaryOnly="false" SortOrder="A" MaxResponses="100" > <POS> <Source> <RequestorID Type="18" ID="Partner"/> <BookingChannel Type="2" Primary="true"> <CompanyName>Some Company Name</CompanyName> </BookingChannel> </Source> </POS> <AvailRequestSegments> <AvailRequestSegment> <HotelSearchCriteria> <Criterion ImportanceType="Mandatory"> <StayDateRange Start="2008-10-15" Duration="Day" End="2008-10-16"> </StayDateRange> <RateRange RoomStayCandidateRPH="0" MinRate="10.00" MaxRate="50000.00" RateTimeUnit="Day" CurrencyCode="USD" DecimalPlaces="2"> </RateRange> <RatePlanCandidates> <RatePlanCandidate RatePlanCode="*" RPH="1"> <HotelRefs> <HotelRef HotelCode="37009" /> </HotelRefs> <MealsIncluded MealPlanCodes="*"></MealsIncluded> </RatePlanCandidate> </RatePlanCandidates> <RoomStayCandidates> <RoomStayCandidate RoomType="*" RoomTypeCode="*" Quantity="2" RPH="2" RatePlanCandidateRPH="1"> <GuestCounts IsPerRoom="true"> <GuestCount AgeQualifyingCode="1" Count="1"> </GuestCount> <GuestCount AgeQualifyingCode="1" Count="1"> </GuestCount> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> <Profiles> <ProfileInfo> <Profile ProfileType="1"> <Customer> <PersonName> <GivenName>Person A GivenName</GivenName> <Surname>Person A Surname</Surname> <NameTitle>Person A NameTit</NameTitle> </PersonName> <Telephone PhoneTechType="1" PhoneNumber="7709626425"/> <Telephone PhoneTechType="3" PhoneNumber="7709626425123"/> <Email>[email protected]</Email> <Email>[email protected]</Email> <Address> <AddressLine>11545 Wells Road</AddressLine> <CityName>Alpharetta</CityName> <PostalCode>30004</PostalCode> <StateProv StateCode="GA"/> <CountryName Code="US"/> <CompanyName>Person A CompanyName</CompanyName> </Address> <CustLoyalty MembershipID="1234567" ProgramID="some programm id"/> </Customer> </Profile> </ProfileInfo> </Profiles> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ> </soap-env:Body></soap-env:Envelope>
    Thanks in Advance,
    Rajeev

    My company used AppLoader to run tests through NRG Global. We didn’t have a lot of people to dedicate to the testing, so we paid NRG a consulting fee to do it for us (for surprisingly less than we thought!). We had them test a Citrix & .net client/server application (with 300 users) and an Apache web application with Ajax (150 users). AppLoader is protocol independent, so it worked just fine with both. Also, it tests from the front end, so you can watch the GUI replay. They also have password encryption, although we didn’t use it for our tests.
    They were able to run the tests & get the data back to us quickly. We ended up with some failures & errors, but they gave us a detailed report with screenshots, logs & graphs which enabled us to find the problem, get it fixed and get our application up quickly. Turns out we had a memory leak. It was a relief to have the test done so fast, thorough & without the huge price tag. I spoke with the consultant there directly. She was very nice & helpful walking me through the results. Hope that helps. Good luck!

  • Multicast ip-pim-sparse mode

    Hi, my consideration are correct  for the multicast protocol ?
    As for the command "ip pim rp-address 173.17.2.1 VALID_GROUP" which is on the site of Padriciano I did a search and, practically, it automatically creates a tunnel interface.
      This thing, as I said, you need to create / enable multicast. Being something of CCNP R & S do not know the different syntax but "PIM" stands for Protocol-Independent Multicast.
      Because you do not have to do often directly with the multicast explain it to follow but it is as a reality check for me:
      Multicast uses the connectionless protocol UDP for transport (transport layer, Layer 4 - L4) and allows you to send, with just sending the same packet to multiple nodes; since UDP does not guarantee delivery. You can think of as a multicast broadcast changed.
      For example: if you have 6 nodes (node = router), for simplicity called ABCDEF, and the node A has to send a packet only to nodes BCDF (excluding the node E) then, with multicast, the packet is sent only once and is delivered to all hosts BCD F.
      That's the theory but in practice petty commands ip pim NOT know them being the subject of CCNP R & S.
    >> A concrete example of multicast: the election of the DR (Designated Router) and the Des BDR (Backup ignated Router) in multiaccess networks (such as Frame Relay networks) with OSPF.
      All routers in the network that are NOT DR or BDR are Drothers (read as DR-Others). The Drothers can only communicate with the DR (simultaneously with the BDR).
    This feature allows you to NOT flood the LSA (Link State Advertisement) to all routers in the network so that only the Drothers send their LSA to the DR and BDR using the multicast address 224.0.0.6 IPv4 or IPv6 multicast address ff02 :: 6.
      224.0.0.6 and ff02 :: 6 = all routers DR
      When the DR receives packets is responsible for forwarding these LSA to all other routers. The DR uses the multicast address 224.0.0.5 IPv4 or IPv6 multicast address ff02 :: 5. The end result is that there is only one router that does the flooding of all LSA in the multiaccess network.
    >> 224.0.0.5 and ff02 :: 5 = all OSPF routers
    ip multicast-routing
    interface GigabitEthernet0/1.134
     description LAN EDA
     encapsulation dot1Q 134
     ip address 134.1.192.31 255.255.255.240
     no ip redirects
     ip directed-broadcast
     standby 134 ip 134.1.192.33
     standby 134 timers msec 300 msec 950
     standby 134 priority 90
     standby 134 preempt delay reload 10
     no shutdown
    router ospf 1
     network 134.1.192.32 255.255.255.240 area 15    ! LAN PMU
    ! Avalaible Routing Multicast for LAN EDA
    ip multicast-routing
    interface GigabitEthernet0/0
     ip pim sparse-mode
    interface GigabitEthernet0/1.500
     ip pim sparse-mode
    interface Serial0/1/0.36 point-to-point
     ip pim sparse-mode
    interface GigabitEthernet0/1.134
     ip pim sparse-mode
     ip igmp join-group 224.0.224.1
    ip pim rp-address 173.17.2.1 VALID_GROUP
    ip access-list standard VALID_GROUP
     permit 224.0.224.1
    router ospf 1
     network 134.1.192.32 255.255.255.240 area 15    ! LAN PMU
    ! Avalaible Routing Multicast for LAN EDA
    ip multicast-routing
    interface GigabitEthernet0/0
     ip pim sparse-mode
    interface GigabitEthernet0/1.500
     ip pim sparse-mode
    interface Serial0/1/0.39 point-to-point
     ip pim sparse-mode
    interface GigabitEthernet0/1.134
     ip pim sparse-mode
     ip igmp join-group 224.0.224.1
    ip pim rp-address 173.17.2.1 VALID_GROUP
    ip access-list standard VALID_GROUP
     permit 224.0.224.1
    I did some tests simulated and I think I figured out why is assigned an IP address instead of another.
     Given that the interface Tunnel0 is created when you type the command "ip pim rp-address 173.17.2.1 VALID_GROUP", in the tests I've done, I Tunnel0 Bind to the IP address associated with the FastEthernet0/0.
    R-SCTI-PADRICIANO-1#sh ip int b
    >>     Interface                  IP-Address      OK? Method Status             Protocol
    >>     FastEthernet0/0            173.27.200.22   YES manual up                    up
    >>     FastEthernet0/1            unassigned      YES manual up                    up
    >>     FastEthernet0/1.20         172.27.195.118  YES manual up                    up
    >>     FastEthernet0/1.30         172.27.230.100  YES manual up                    up
    >>     FastEthernet0/1.31         173.27.254.118  YES manual up                    up
    >>     FastEthernet0/1.32         173.27.216.28   YES manual up                    up
    >>     FastEthernet0/1.134        134.1.192.33    YES manual up                    up
    >>     FastEthernet0/1.500        172.27.250.37   YES manual up                    up
    >>     Serial1/0                  unassigned      YES unset  administratively down down
    >>     Serial1/1                  unassigned      YES unset  administratively down down
    >>     Serial1/2                  unassigned      YES unset  administratively down down
    >>     Serial1/3                  unassigned      YES unset  administratively down down
    >>     Loopback0                  172.27.254.10   YES manual up                    up
    >>     Tunnel0                    173.27.200.22   YES unset  up                    down
    R-SCTI-PADRICIANO-1#conf t
    >>     R-SCTI-PADRICIANO-1(config)#int f0/0
    >>     R-SCTI-PADRICIANO-1(config-if)#sh
    >>     *Feb  6 16:09:31.439 CET: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
    >>     *Feb  6 16:09:32.439 CET: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
    >>     R-SCTI-PADRICIANO-1(config-if)#do sh ip int b
    >>     Interface                  IP-Address      OK? Method Status                Protocol
    >>     FastEthernet0/0            173.27.200.22   YES manual administratively down down
    >>     FastEthernet0/1            unassigned      YES manual up                    up
    >>     FastEthernet0/1.20         172.27.195.118  YES manual up                    up
    >>     FastEthernet0/1.30         172.27.230.100  YES manual up                    up
    >>     FastEthernet0/1.31         173.27.254.118  YES manual up                    up
    >>     FastEthernet0/1.32         173.27.216.28   YES manual up                    up
    >>     FastEthernet0/1.134        134.1.192.33    YES manual up                    up
    >>     FastEthernet0/1.500        172.27.250.37   YES manual up                    up
    >>     Serial1/0                  unassigned      YES unset  administratively down down
    >>     Serial1/1                  unassigned      YES unset  administratively down down
    >>     Serial1/2                  unassigned      YES unset  administratively down down
    >>     Serial1/3                  unassigned      YES unset  administratively down down
    >>     Loopback0                  172.27.254.10   YES manual up                    up
    >>     Tunnel0                    172.27.250.37   YES unset  up                    down
    >> 
    >> IP address Tunnel0 = IP address FastEthernet0/1.500

    Well, this is all looks like it is has to be. What confuses you?
    Tun0 created by pim process to decapsulate multicast traffic coming to RP from source router. It doesn't matter what ip used inside of this interface.

  • Cannot use i2c and custom fpga logic at the same time

    I am driving a OV7670 camera sensor with my myRio. Configuring the camera's registers is done via I2C (or they call it the SCCB interface, but it's practically the same thing). The sensors has to be given an external clock input which I do through the FPGA (I run it with an 8MHz signal). I can then do a parallel read (8-bits) from the chip into the FPGA on each clock in order to read off the pixel information, place it in a buffer and let the real-time side read it and manipulate it. The whole idea is to let the FPGA do the image acquisition while the processor does the image manipulation.
    The only problem is, when I have my FPGA configuration loaded, the I2C bus seems to stop working. I know that the I2C is actually handled throught the FPGA as opposed to the processor. Is there anyway to run those two functions simultaneously on the FPGA? If not, can I somehow implement the I2C protocol independently of the FPGA?
    Thanks in advance

    Hey quickbacon,
    I take it you're talking about using the built in I2C API for the myRIO. The myRIO comes preconfigured with a default FPGA personality, and the myRIO API is built off of that default personality - the default personality needs to be in place in order for it to function. By customizing the FPGA on your own, you've overwritten the personality, which is why the myRIO I2C VIs have broken.
    If you want to use both the myRIO I2C VIs and customize the FPGA you can do so, but you need to modify the FPGA VI for the default personality instead of creating a new FPGA VI from scratch. To expose the FPGA VI that defines the default personality in a project, create a new project in LabVIEW and select the "myRIO Custom FPGA Project Template." Once you've created a project from that template, expand the FPGA target - the FPGA VI that's present under the target is the FPGA VI that defines the default personality. To add your own custom FPGA functionality, simply open that VI and add your functionality in parallel to the existing code. As long as you leave the code pertinent to the I2C VIs in place (it should be clearly labelled in the FPGA VI), the I2C VIs should still function. If you run into resource utilization problems, you can delete sections of code from the personality that deal with myRIO functions that you aren't using - just leave the code pertinent to I2C intact.
    Regards,
    Ryan K.

  • Could you tell me what's the meaning of the logfile-path and log-level?

    we are running an productive xml database. but it is not stable now. Sometime it would report resource conflict error while you access xmldb via http protocol. I read the database logs and listener logs, but no abnormal message could be found. So, I want to find more information from the xmldb logs. While I run select DBMS_XDB.cfg_get().getclobval() from dual, I found that there are several logfile-path and log-level tags and I guess that these would be xmldb logs. Does anyone know what's the meaning of these tags?

    I wondered about that one often too. I didn't have a chance yet to investigate (but maybe Mark will elaborate a little here), my guess is that it / or will be a possibility to enable tracing regarding the protocols or servlets.
    Though It look like if you enable it it will trace to the XML file defined in the xdbconfig.xml. I also guess that (because there is also a XSD counterpart) that one could create an resource that streams the errors into a XDB ftp or http or ... xmltype table based on these settings.
    This would be great because it would mature the protocol server regarding functionality. You could enable the tracing and see what happens. Until now the documentation doesn't give much extra insight...
    <!-- FTP specific -->
    <element name="ftpconfig">
    <complexType><sequence>
    <element name="ftp-port" type="unsignedShort" default="2100"/>
    <element name="ftp-listener" type="string"/>
    <element name="ftp-protocol" type="string"/>
    <element name="logfile-path" type="string" default="/sys/log/ftplog.xml"/>
    <element name="log-level" type="unsignedInt" default="0"/>
    <element name="session-timeout" type="unsignedInt" default="6000"/>
    <element name="buffer-size" default="8192">
    <simpleType>
    <restriction base="unsignedInt">
    <minInclusive value="1024"/> <!-- 1KB -->
    <maxInclusive value="1048496"/> <!-- 1MB -->
    </restriction>
    </simpleType>
    </element>
    <element name="ftp-welcome-message" type="string" minOccurs="0"
    maxOccurs="1"/>
    </sequence></complexType>
    </element>
    <!-- HTTP specific -->
    <element name="httpconfig">
    <complexType><sequence>
    <element name="http-port" type="unsignedShort" default="8080"/>
    <element name="http-listener" type="string"/>
    <element name="http-protocol" type="string"/>
    <element name="max-http-headers" type="unsignedInt" default="64"/>
    <element name="max-header-size" type="unsignedInt" default="4096"/>
    <element name="max-request-body" type="unsignedInt" default="2000000000"
    minOccurs="1"/>
    <element name="session-timeout" type="unsignedInt" default="6000"/>
    <element name="server-name" type="string"/>
    <element name="logfile-path" type="string"
    default="/sys/log/httplog.xml"/>
    <element name="log-level" type="unsignedInt" default="0"/>
    <element name="servlet-realm" type="string" minOccurs="0"/>
    ...etc...

  • Terminate Portal User Login with JSessionID or MYSAPSSO2 Cookie

    Dear All,
    I know using Visual Administrator , we can terminate the session.
    Is it possible for the administrator to terminate a logged in portal user with his/her  JsessionID or MYSAPSSO2 cookie value or User Id programmatically.?
    Is it possible for portal admin to forcibly exit (logoutl) an active user login  without logging onto visual administrator?
    Regards,
    Eben Joyson

    The only complete mitigation for session hijacking is to run the entire site as SSL. This is Oracle's recommendation if you need a complete mitigation solution. And example of an ATG site running in full SSL is Dennis Kirk (denniskirk.com).
    The problem with doing so is that SSL (a) takes more processing power in the system running the client's browser and (2) incurs latency that degrades the perceived page performance. This is particularly true for consumers running Internet Explorer, where speed-up measures like SPDY are either incomplete or don't work. And for a hard core eComemrce site, slower page performance means that you make less money.
    Most sites, including those that you mention, use a mixture of SSL and non-SSL pages to overcome this. They use non-SSL for those areas of the site where penetration does not have a material negative impact. Browsing catalog pages as an anonymous user, for example. If someone hijacks my session and I'm browsing the catalog anonymously, they're welcome to it. There's nothing private in my session. Even robots can access that content.
    Once I login or go to pages where private information is being exchanged, then you have to secure the session. That's where the protocol switcher servlet comes in. As you authenticate, you switch the user to SSL.
    I've tried a number of additional mitigation steps. Unfortunately I can't discuss them here at this time.
    And none of the servlets that you mention have any benefit with mitigating session hijacking.

Maybe you are looking for

  • Dual monitor with Vista

    I picked up the DVI to Video adaptor for my Macbook Pro today, so that I could use my TV as a second monitor for the sake of videos and (mainly) music visualizers. Everything worked automatically and easily with OSX, however when I load up Vista with

  • Upgrading Early 2009 Mac Pro to Yosemite

    I need an upgrading for dummies tutorial   I want to upgrade some applications that I use and can not do that with Mountain Lion which is currently on my Early 2009 Mac Pro. (Processor 2.66 GHz Quad-Core Intel Xeon - Memory 12 GB - Graphics NVIDIA Ge

  • Problem in process chain running for 3 days

    Hi Experts, Please help me We have process chain like below 1.     delete index 2.     full loads going 3 cubes (16 infopacs) 3.     loading to ods and then update to cube 4.     delete overlapping requests (16 infopac) 5.     create index 6.     agg

  • User settings changed automatically

    Hello, I have one user who had his desktop wallpaper changed back to the HP default and all his icons disappeared. I suspect it is a corrupt profile.  I am unable to install Symantec Endpoint or run Trend Micro Housecall, however, I am able to run Bi

  • Creating a new table next to an existing one

    I have attached the table I created...(I'm a beginner....forgive me for being simplistic in design). I want to create a separate table for "Friday" right next to the existing table. How do i get the new table to align to the right of the existing tab