Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP Tag Lib HELP!!

912907Jan 24 2012 — edited Jan 24 2012
I'm in the process of upgrading a massive struts 1.3 application to the newest version of Weblogic 10.3.5. I have successfully migrated everything except these JSP tags. I have to admit I'm not a front-end developer for the most part.

Here is the problem:

I have a <HTML:RADIO> tag that looks like :

<html:radio property="role" value="<%=srtId%>" tabindex="1" onclick="form.submit();" />

This is the error:

LoginRole.jsp:33:60: The method setValue(String) in the type RadioTag is not applicable for the arguments (Object)
<html:radio property="role" value="<%=srtId%>" tabindex="1" onclick="form.submit();" />
^-^

.. I KNOW what the error is saying and I can easliy correct the call if I download the source, change the class and recompile, but I can't do that. I have dozens of these tags, both from the regular taglibs but also a number of custom tags, over 400 JSPs, some of which are 1000 lines long.

If I change all these calls to EL they work fine... also the post to the server is just the string ="<%=srtId%>" instead of the integer value... Why did this notation stop functioning? I know this is an old app but this shoud be backwards compatible one would think.

Thank you in advance,
Eric

Comments

802908
Hi

concerning the parallel port i found the following link

http://www.supportnet.de/listthread/172182

concerning other connections: do you have the possibility of using a serial (RS232) communication?

friendly greetings

BB
807580
That link was not in english, but even the google-translated version was not of much help. I already know about the comm API and how it works. Unfortunately I do not have the option of using a serial port. The device that is sending the data is a Jet Direct and only has parallel output.
Melssj5
Well, the comm API has all you need.

With the comm api you can read and send through paralel port and you can also use the comm api to get and send data through USB. Sending it just to the com port in which the usb is!
802908
I just thought the link might be useful because i had the impression that the posted code was also intended for reading data from a parallel port.
Not just for writing. Am i mistaken there?!
807580
I haven't read anywhere that the comm api can be adapted for usb communication. Is this really the case?

You should be able to read data from a parallel port, but Java has problems with XP, and since it discontinued support for windows, the issue has not been fixed.
Melssj5
of course, USB is just a serial comunication. Universal Serial Bus, you just have to send the data to the specified COM port of the usb and thats all. I dont know about any problems about java and XP!
807580
The problem with XP i was talking about is only with the comm 2.0 api... see this link

Can you give me any sort of example of how i can capture USB communication via a COM port? When i list all available com ports, i dont see any "extra" for USB, so which one would i grab?
802908
Hi

i once had a device (a flowmeter for measuring the gas flow) which was connected via USB to the PC, but this USB port has also been mapped to a COM port. In this case i could control the device via COM port. But i dont know whether this is generally like that.

Other devices which i know and which are connected via USB dont have this mapping to COM. These have their own USB drivers (but these are not written in Java as far as i know).

I guess it depends on the device, but im no expert in these issues...

regards

BB
807580
Other devices which i know and which are connected via USB dont have this mapping to COM. These have their own USB drivers (but these are not written in Java as far as i know).
The USB->COM mapping happens when device implements CDC (CommunicationDeviceClass) USB class. Both Linux and XP do have built-in driver for them which maps it to COM port. As far as I know this is the easiest (and possibly - only not involving writing windows driver or installing dedicated semi-universal driver like winusb.sys ) way to talk to USB device.

For accesing COM port you will need rxtx.org gnu.io.comm java library since javax.comm api for Windows was abadoned by Sun.

The main trouble with CDC is : "how to explain user which damn com port he/she should select when connecting to you fabulous USB device".

regards,
Tomasz Sztejka
807580
Hi,

Im trying to connect 2 computers using USB or Parallell port. On one computer I want to install a printer (regular windows printer) that prints through either USB or the Parallell port. On the other computer I want to listen on the Parallell port/USB port and receive the input and write it to a file.

Does anyone have a some sample code to do this? I've tried the following code (rxtx) but it cant find more than 2 ports (one parallel and one serial - no USBs even though I have 5 USB ports). Since I could only find the USB I tried to listen on the Parallell port. Problem is that I dont receive any data.

<---THE CODE--->

Enumeration port_list = gnu.io.CommPortIdentifier.getPortIdentifiers();
while (port_list.hasMoreElements ()) {
CommPortIdentifier port_id = (CommPortIdentifier)port_list.nextElement ();

if(port_id.getPortType () == CommPortIdentifier.PORT_PARALLEL) {
System.out.println("Found port "+port_id.getName()+ "id "+port_id);
CommPort commPort = port_id.open("",2000);

InputStream is = commPort.getInputStream();

byte buffert[]=new byte[1024];
int len;
System.out.println(">>>>>>>>len "+is.read(buffert));
while((len=is.read(buffert))==-1)
{
Thread.sleep(500);
is = commPort.getInputStream();
System.out.println(">>>>>>>>len "+len);
}

}
}
807580
USB java API for Windows:

http://javausbapi.blogspot.com/
and
https://sourceforge.net/projects/javausbapiforwi/
dcminter
Locking zombie thread.
1 - 12
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 21 2012
Added on Jan 24 2012
3 comments
503 views