This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.

Dan Parsons

Ranch Hand
+ Follow
since May 30, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dan Parsons

I have done browser sniffer using servlet in the past.
Now I want to detect OS using Servlet but I keep getting OS of the Web Server that is hosting my Tomcat container:


Anyway I can detect the client OS using server side Java instead of client side JavaScript?
14 years ago
I have my local Tomcat 6.0.20 container JNDI Connection Pool working in local TomcatHome\conf\context.xml:


I want to use the Connection Pool with JNDI on the server but dont have permissions to edit the context.xml on the server. Anyway I can put the above JNDI somewhere in my webapp?
I am connecting to Oracle 10g RAC using JDBC in Tomcat 6.0.20.
It works around 50% of the time. When it doesnt work it shows this error message:
IO exception: The Network Adapter could not establish the connection.

Here is my JDBC String:
The above Description parameters I use in my tnsnames.ora and can successfully connect to the Oracle RAC using SQL Plus with no issues. I can also successfully ping to the IP addresses with no issues.
I also played around with the JDBC string and added (FAILOVER=ON) but still have same issues.

Please advise.
I am using Servlet as a controller for my form entries.

If I send them to the Servlet with or without sessions it wont show anything after the servlet forwards to a JSP. I am encoding with sun.misc.BASE64Encoder in another Servlet and it seems to be effecting all my Servlets for this webapp. If I take out the sun.misc.BASE64Encoder in the other servlet, the form entries will work in my servlet and show up in the forwarded jsp. I was hoping to somehow clear or eliminate any threads that were created from another Servlet in my webapp that has the sun.misc.BASE64Encoder.
14 years ago
I would like to initialize a Servlet when it is called.
Will this clear any sessions and threads?
14 years ago
I am attempting to create my first custom tag in Tomcat 6.0.20.
I get the following error:


abc.tld located in projectOne\WEB-INF


MyFunctions.java located in WEB-INF\classes


web.xml


main.jsp



Please advise what I need to change to get this to work?
14 years ago
JSP

Keith Flo wrote:Dan,

No .. it doesn't look correct ... a couple questions ...

1. What does MovieListing.getList() return? a java.util.ArrayList of Strings, a java.util.ArrayList of MovieBeans or something else?
2. It looks like your JSP code places an ArrayList of MovieBean into scope and the toString() method of MovieBean prints what you want when you iterate using forEach. Is this what you want?
3. What do you want the Java code to do?



Its not working and seems to print all the records per array.
Its suppose to print a Java java.util.ArrayList of MovieBeans.
14 years ago
JSP
I have a JSTL forEach example that I would like to implement in a Java class instead of JSP.
Example:


Is the below attempt the right way?




14 years ago
JSP
Thanks, As a client I need to get information from a Web Service where I will use an XML tag (CityRequest) to fetch a specific city and get the city information as an XML output.

I need to create an XML object:


Then call the City Web Service URL: http://cityService/URLConnector
I would then get the XML response with Boston information.
14 years ago
I am getting NetBeans 6.7 and will use that for consuming a web service. I will be building the client side on Tomcat 6.0.20 to fetch somebody elses web service that is located on another server.
Do I need to get Axis or other extra software on my Tomcat to consume a web service that is located on a another server?
14 years ago
I am getting closed exception messages with my below jdbc connection to Oracle 9i from Tomcat 6 container:
java.sql.SQLException: Closed Statement
and
java.sql.SQLException: Closed Statement: next



Please advise what I can modify to eliminate the exception messages?



Servlet controller handling of list:
I am connecting to Oracle 9i using JDBC in my JSP/Servlets web pages with Tomcat 6.0.20 container. I am closing all my connections in Finally blocks. Everything works great during the day with JDBC and Oracle where only 2 people are using the web site with about 300 small records in the Oracle database.
But after a Web crawler runs through our web server at 3 AM the next morning a v$session check shows several lines of JDBC Thin Client inactive status marked at 3 AM. Any way to find exactly what sql statement or program that could be causing the JDBC Thin Client to show up?

I need a web.xml context value to work in a plain Java Class that is not a Servlet.


For a servlet I can fetch the value like this:
config.getInitParameter("myValue")


Anyway to get a web.xml param or something similiar to work in a Java class?
15 years ago

Bear Bibeault wrote:This has nothing to do with the JSTL -- this is an EL question.

And the answer is that the EL can't call general methods by design -- it is intended to work only with bean properties. Method calls with parameters are not valid bean properties and hence cannot be invoked.

Beans should be designed as beans, and not be general classes masquerading as beans.

If you really need to call a general method, you can explore defining custom tags or EL functions.



Thanks, I will google and read on how to define custom tag or EL function and decide which is best for my situation.
15 years ago
JSP

I have the following in Tomcat 6.1.20 working in my JSP and now want to eliminate the Scriptlet and use JSTL:


My attempt didnt work because it doesnt like my JSTL part:


Please advise how I can get this to work using JSTL instead of Scriptlet.
15 years ago
JSP