Win a copy of Securing DevOps this week in the Security forum!

Idly Vada

Ranch Hand
+ Follow
since Sep 02, 2003
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 Idly Vada

You can make use of Singleton design pattern to keep the references to these threads.

For example use a class ThreadController as the controller to keep track of references to these threads. Get the reference to a thread by

ThreadController.getInstance().getThread(String threadName)

Originally posted by swati jain:

surround
AlarmBeanLocal l = finder query();
with try - catch construct and catch FinderException

Originally posted by N Padma:
Hi,
I need to develop some GUI now. I used AWT some time back. later came this swing. now people talk about SWT. I dont understand which one should I prefer for my current development. I donno the pros and cons of either. can you guys out there help me in choosing?
Regards,
Padma.



Swing�The reference GUI toolkit for J2SE.
SWT�This library has been developed by IBM as a part of the Eclipse platform.
SWT provides native widget functionality. It's analogous to AWT/Swing, but uses native OS widgets. AWT/Swing cannot do that because then programs wouldn't be portable in the strict Sun sense. If you use SWT you'll have to provide some OS-dependent files with your program, basically a thin JNI-interface. But you'll get a Java program that looks and feels like other programs on the OS they run on.

for more info:
http://www.developer.com/java/other/print.php/2179061
14 years ago

Originally posted by Sangeetha Vasantha:
can any one tell me y we have the getstatus method.What is the purpose of it?.


getStatus() method of which class or interface? Can you rephrase the question more precisely?
[ January 16, 2004: Message edited by: Murthy Narasimha ]
14 years ago
I don't think a seperate package is necessary to provide proxy authentication support to your app.
You can use any base64 encoder to encode proxy username and password.And put this value for Proxy-authorization request property.There are lot of base64 encoders available. sun VM has one in sun.misc package.

Originally posted by Meena Natarajan:

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
/opt/jakarta/tomcat/work/Standalone/localhost/intra/dates/date_jsp.java:101: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable)
if (pageContext != null) pageContext.handlePageException(t);
^
1 error


I think the problem is with the compilation of JSP. Have you looked at the tomcat generated servlet source code(date_jsp.java)? Why don't you post the JSP code here.
14 years ago
JSP

Originally posted by jyotsana dang:
but isn't jsp a better option for making logins..and what is an LDAP server.. i have made the database..


JSPs are used for display purpose ONLY. LDAP stands for Lightweight Directory Access Protocol. LDAP servers may contain org hierarchy and authentication information.
for more info on LDAP:
http://raleigh.pm.org/ldap-talk.html
14 years ago
JSP
The problem you are getting is probably due to thread synchronization. The servlet container creates a new thread for each servlet request unless the sevlet uses SingleThreadModel.But SingleThreadModel is deprecated and causes performance degradation.
servlet specification says"Multipe servlets executing request threads may hae active access to a single sesin object at the same time. The developer has the responsibility for synchronizing access to session resources as appropriate"
Coming to your problem, put the code which you don't want to be accessed by multiple instances in a synchronized block.You may follow other approaches as well.

Originally posted by jyotsana dang:
hi all..
iam working on an intranet site for my department..i am making a login page where users will need to sign up and get access to their profiles...something like a mail account.
can anyone please guide me as to what are the steps required..(using jsp for this purpose)..
please, just a vague idea
thanks


You can store usernames,passwords and authentication info in a database and use them from login servlet. Otherwise you can connect to an LDAP server and perform the authentication.
14 years ago
JSP

Originally posted by Nilesh Srivastava:
Hi All,,
How does an Applet communicates with Servlet.


First the servlet to which you want to send parameters should be on the same server where applet is present.
Coming to passing parameters to the servlet , you can do this in two ways
i) Construct url manually. In this approach you should take care of parameter encoding.This can be tricky.
for eg:
to invoke DetailsServlet with parameters name and age
use DetailsServlet?name=abc&age=22
ii)Make use of URLEncoder and URLDecoder classes.
14 years ago
I got it guys, it's problem with port binding.Even though i specified 9127 port for JMS binding, Oracle 9ias is using default port.
Very small problem but frustrated alot!
I'm getting connection refused error while adding a topic to the JMS server of Oracle 9iAS.
Can any one tell me the possible reason?
error message:
500 Internal Server Error
javax.jms.JMSException: Unable to connect to JMSServer (127.0.0.1/127.0.0.1:9127): Connection refused: connect
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.jms.PointcastTopicConnection.connect(PointcastTopicConnection.java:136)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.jms.PointcastTopicConnection.start(PointcastTopicConnection.java:33)
at _message._jspService(_message.java:51)
[SRC:/message.jsp:6]
at com.orionserver[Oracle9iAS (9.0.3.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
14 years ago
I've tried the sample JMS application given by OTN

I'm getting Unable to connect to JMSServer exception.
error message:
500 Internal Server Error
javax.jms.JMSException: Unable to connect to JMSServer (127.0.0.1/127.0.0.1:9127): Connection refused: connect
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.jms.PointcastTopicConnection.connect(PointcastTopicConnection.java:136)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.jms.PointcastTopicConnection.start(PointcastTopicConnection.java:33)
at _logmessage._jspService(_logmessage.java:50)
[SRC:/logmessage.jsp:5]
at com.orionserver[Oracle9iAS (9.0.3.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
Can anyone help?
Hi all!
Can any one tell me how to create a new Queue Connection Factory in Oracle 9iAS?
14 years ago
Just use
meenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke('E', java.awt.event.KeyEvent.CTRL_MASK | java.awt.event.KeyEvent.SHIFT_MASK, false));
I think accelerator will have the same font as the menu item.
14 years ago