Auttapol Pipatpatama

Greenhorn
+ Follow
since May 31, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Auttapol Pipatpatama

SQL(2 tables a and b)
where b.xxx = 'xxx'
and (a.yyy = 'yyy' or b.zzz = 'zzz')

how to use criteria to map this SQL

criteria1 = hbSession.createCriteria(B.class); <-- table a
criteria2 = criteria1.createCriteria("relation"); <-- table b
.
.
.
When I test inside app it fine but when I call by request it's not work.
Solution
Servlet ===================================================
InputStream xmlStream = req.getInputStream();
APIRCRInterface apicrInterface = new APIRCRInterface();
String xmlRet = apicrInterface.process(xmlStream);

Java App (Use DOM4J)=======================================
in class APIRCRInterface
String xmlIn = getStreamStr(ips);
Document doc = DocumentHelper.parseText(xmlIn);

Method getStreamStr use transform inputstream to string.
When I call DocumentHelper.parseText(xmlIn); I get error
org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.

I print xmlIn "<?xml version="1.0" encoding="UTF-8"?><request id="0000000001" command="RECONNECT"><msisdn>865634408</msisdn></request>"

How I resolve this problem?
I download cvsnt and setup it. but I found problem when I share project with cvs. it's show message

"CVSNT repository' server:BMSMIS0D\Administrator@localhost:/repository'
is configured to use a repository prefix. However, CVS does not always
properly comunicate resource paths in this mode resulting in the fuilure of some specialized Eclipse CVS operations. The use of repository prefix should be disable if the full functionality of the Eclipse CVS is desired"
19 years ago
Can I use CVSNT for WebSphere?
Or you have other program to recommend me?
[ October 12, 2004: Message edited by: Auttapol Pipatpatama ]
19 years ago
|---jsp
....|---Test.jsp
|---WEB-INF
....|---classes
....|---lib
........|---util.jar
............|---MTHelper (in jar file)
............|---javax.mail.* (in jar file)
............|---com.sun.mail.util.* (in jar file)


=== Test.jsp =================================================
<HTML>
<HEAD>
<%@page import="MTHelper" %>
<%@page import="javax.mail.*" %>
<TITLE>Test.jsp</TITLE>
</HEAD>
<BODY>
<P>Place content here.</P>
<%
String s = MTHelper.formatStringToPrint("122");
System.out.println("Value " + s);
%>
</BODY>
</HTML>

=== Screen Result ============================================
Error 500: Unable to compile class for JSP D:\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\IngeniumEar\Test.war\jsp\_Test.java:3: '.' expected import MTHelper; ^ An error occurred between lines: 9 and 12 in the jsp file: /jsp/Test.jsp Generated servlet error: D:\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\IngeniumEar\Test.war\jsp\_Test.java:80: cannot resolve symbol symbol : variable MTHelper location: class org.apache.jsp._Test String s = MTHelper.formatStringToPrint("122"); ^ 2 errors

=== Console Result ============================================
[10/11/04 14:14:56:484 ICT] 59cd11e7 WebGroup E SRVE0026E: [Servlet Error]-[Unable to compile class for JSP
D:\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\IngeniumEar\Test.war\jsp\_Test.java:3: '.' expected
import MTHelper;
^


An error occurred between lines: 9 and 12 in the jsp file: /jsp/Test.jsp

Generated servlet error:
D:\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\IngeniumEar\Test.war\jsp\_Test.java:80: cannot resolve symbol
symbol : variable MTHelper
location: class org.apache.jsp._Test
String s = MTHelper.formatStringToPrint("122");
^
2 errors
]: org.apache.jasper.JasperException: Unable to compile class for JSP
D:\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\IngeniumEar\Test.war\jsp\_Test.java:3: '.' expected
import MTHelper;
^


An error occurred between lines: 9 and 12 in the jsp file: /jsp/Test.jsp

Generated servlet error:
D:\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\IngeniumEar\Test.war\jsp\_Test.java:80: cannot resolve symbol
symbol : variable MTHelper
location: class org.apache.jsp._Test
String s = MTHelper.formatStringToPrint("122");
^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:129)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:941)

----------------------------------------------
How can I run it work? I use websphere 5.1.2
[ October 12, 2004: Message edited by: Auttapol Pipatpatama ]
19 years ago
How to create CVS for Websphere5.1.2 or eClipse?
19 years ago
How to create server on WSAD 5.1.2?
or have document to teach me setup it?
19 years ago
How many amount of exam in new topic for version 1.4?
Such as EL..
Where? I can find exam for SCWCD1.3 for free.