Tom Tang

Ranch Hand
+ Follow
since Dec 24, 2000
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 Tom Tang

Hi, Frank:
Thank you for taking the time to reply my post.
By 'runtime', I mean 'request time'. The file name to include won't be known until request time. Therefore only <jsp include> is possible. I solved my problem by rewriting my footer to be a full-blown JSP which can compile by itself. I believe that's the only way out. <%@include> can't be used in my case because it is done at compile time.
18 years ago
JSP
I have a situation where I need to include a certain footer into all the jsp in my application. But the footer's file name is dynamically generated at runtime. Therefore I can't use <%@include file=...> directive because it doesn't support the syntax like <%@include file = <%= footername%>....
The alternative is to use the xml tags <jsp:include page="<%=footername%>"; flush = "true"> But the problem with this tag is that it is executed at request time, instead of the raw include (at interpretation time) like <%@include>. My footer.jsp is using some of the variables in the outer jsp, and it won't compile by itself. Therefore, I will need the raw include <%@include> provides.
Does anyone have a solution for my problem? Thanks in advance.
[ January 07, 2004: Message edited by: Tom Tang ]
18 years ago
JSP
If it is not confusting enough. sometimes you see static elements even without static keyword: all the interfaces variables are inherently static.
[ November 17, 2003: Message edited by: Tom Tang ]
I have no problem installing tomcat4.0(Catalina) at my home computer. But when I tried to start tomcat on my company computer, i got the following error:
Catalina.start: LifecycleException: Error creating server socket: java.net.Bin
dException: Address in use: JVM_Bind
LifecycleException: Error creating server socket: java.net.BindException: Addr
ess in use: JVM_Bind
at org.apache.catalina.connector.warp.WarpConnector.initialize(Unknown S
ource)
at org.apache.catalina.core.StandardService.initialize(Unknown Source)
at org.apache.catalina.core.StandardServer.initialize(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
----- Root Cause -----
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
at java.net.ServerSocket.<init>(ServerSocket.java:170)
at java.net.ServerSocket.<init>(ServerSocket.java:121)
at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Unkno
wn Source)
at org.apache.catalina.connector.warp.WarpConnector.initialize(Unknown S
ource)
at org.apache.catalina.core.StandardService.initialize(Unknown Source)
at org.apache.catalina.core.StandardServer.initialize(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
The only difference is that I have IBM HTTP server and Web Sphere server installed on my work computer(both shut down when I started tomcat). The error looks like the port 8080 has already been used(or bound). But it's not working either when I changed to any funky port number in server.xml. Anybody got some idea?
Thanks
20 years ago
Can someone tell me where and how to find the JSP engine slef-generated servlet codes? I think they are very useful for debugging.
20 years ago
JSP
Thank you both. JRun seems to be what I'm looking for. but I'm having trouble using its debugger. When I start debugging, it always says"An error occurred contacting RDS server(localhost HostName: localhost): 9) Unable to connect to server"
I configured the "remote development setting" to localhost.
All help will be appreciated.
20 years ago
JSP
I'm new to JSP. What editor would you recommend to create JSP? Use html editor like HTMLKit or Java editor like Kawa or JCreator?
Another question is how to debug JSP. Is there a compiler for that?
20 years ago
JSP
Thanks a lot. That's very helpful.
20 years ago
What do you mean by HTML object? You can either run a servlet by directly calling it in the URL, or indirectly calling it from a hypertext link inside an HTMl file.
To compile a servlet, try to copy the servlet.jar from the J2EE folder or from any web server package to your JDK lib directory and then set classpath to the jar file.
20 years ago
I read in a book that most servers automatically reload a servlet after its class file is recompiled. However, it seems not true with Tomcat. I have to restart the server each time I change something in a servlet. Is there a way out to speed up the development-test cycle for Tomcat?
20 years ago
Thank you for the help. I think another way is just redirect dos prompt to the file directly. Something like
java Myclass > debug.txt
20 years ago
Thanks a lot for the help.
There are many potential run-time error-generating codes in different files inside the project. Is it possible to set the System.err to the text file just once instead of doing it everytime when an error might happen?
20 years ago
Unlike Win2000, Win98 doesn't have scroll bar for DOS window. This makes debugging Java run-time error extremely hard. Does anyone has a way out?
20 years ago
Hi, Jeff:
Just wondering if these positions are still available. I'm a SCJP(passed with 91%) and have two years work experience with JAVA. I'm currently living in Vancouver but don't mind relocating to Alberta. Please contact me by weiyetang@yahoo.com.
Thanks.
Tom
20 years ago
I heard that in order to make J2EE components( like servlet and EJB) work with JDK1.3, we need to copy all the jar files from lib folders under J2ee to lib\ext folder under JDK1.3. Is that true? But I didn't find servlet.jar in the J2ee folder. (Both tomcat and JRun have that file)
20 years ago