Jithesh Kozhipurath

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

Recent posts by Jithesh Kozhipurath

Hi,

I am running a web application using struts2 (2.2.1.1) and Dojo to implement AJAX capabilities on this site.
The web.xml has this filter configuration,

<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

And the application when deployed in Tomcat is working pretty fine and AJAX features are working well.
But the same when I run in WAS 6.1 (6.1.0.0), it throws some exceptions on the browser end that it can not find some of the DOJO java script files.

These are the errors shown on the Firebug.

missing ; before statement
Error 404: SRVE0190E: File not found: /struts/dojo/struts_dojo.js
missing ; before statement
Error 404: SRVE0190E: File not found: /struts/ajax/dojoRequire.js
missing ; before statement
Error 404: SRVE0190E: File not found: /struts/utils.js
missing ; before statement
Error 404: SRVE0190E: File not found: /struts/xhtml/validation.js
missing ; before statement
Error 404: SRVE0190E: File not found: /struts/css_xhtml/validation.js

The jar files I have on this web app are,
struts.jar
struts2-core-2.2.1.1.jar
struts2-dojo-plugin-2.2.1.1.jar
struts2-tiles-plugin-2.1.6.jar
and some of the other commons jar files, xwork, jstl and few other supporting jar files.

Reading through some of the older posts I tried adding com.ibm.ws.webcontainer.invokefilterscompatibility=true in the Custom Properties of the application server. But that also did'nt work for me.

Kindly provide solution details if someone faced the similar problem before.

Many thanks !!

Regards,
Jithesh
13 years ago
Hi sureshbob,
You can either use JSF along with Struts or only JSF or only Struts.

It can be say, all navigations can be done using struts and bean management can be done using JSF. JSF provide better controller facility and Event based navigation to your web pages. You can use event handling similar to what we do in Swing. And it has got features to create custom components, where you can define your own event handling and display features and provide navigation rules. Using JSF its easy to develop web applications. Many of the components are readly available with different JSF implimentations. So its not just changing the tag from html:Text to <h:inputText value=""/> you can go further by defining your actions and navigations in JSF.

The main philosophy behind JSF is Rapid Application Development(RAD). You can build web applications in minimum effort.

The struts-config is not required if you completly rely on JSF. JSF has similar config file called faces-cofig where you can specify almost all that features struts provides.

Hope this answer your question.

Jithesh
18 years ago
JSF
The JSF can work similar to a Servelet.
You can specify the navigation rules in the faces-cofig.xml
In this xml file you can specify the navigation case and outcome value
and to view id.
Using this outcome value you could navigate to different pages. The value in this outcome field can be a scope variable. This can done using the #{} construct.

I m not very sure that this will satisfy the req. Please try.
18 years ago
JSF
You could try Postgre SQL. Its another open source database which supports transactions, subselects etc.

try,
http://www.postgresql.org/
I would like to know what are the possible advantages we get by using AJAX. Certainly there is a performance benefit. But other than that there are many disadvantages like, security a major threat, then the issue of using back button or using a forward after giving a XML request. Is there any ways in which we can avoid such problems? Then, a JavaScript is always exposed to the clients, so is there any possibility to hide the xml access code from the client. Please clarify if there is any possible solution to overcome these issues.

Thanks in advance,

Regards,
Jithesh
Hi,
I m able to create an XML output for FindBugs tool.Is there any XSL templates available to generate the html output file.

Thanks in advance.
Can anyone please help to solve the problem
20 years ago
Hi,
I m using wlserver ant task to stop-deploy-start weblogic server after my build execution. But when I start weblogic after deployment and when the ant execution is complete the weblogic server autmatically shutdown the server. Why is it not running as a new process. Is there anything to be specificaly given in the ant task to start it as a different process.
My Ant build file is,
<project name="iRes" default="all" basedir=".">

<property name="WL_HOME" value="D:\bea8.1"/>
<property name="DOMAIN_HOME" value="D:\bea8.1\user_projects\domains\mydomain"/>
<property name="JAVA_HOME" value="D:\APPLNS\jdk1.4"/>

<target name="all" depends="stop-server,start-server,connect-server" />

<target name="init">
<taskdef name="wlserver"
classname="weblogic.ant.taskdefs.management.WLServer"/>
</target>

<target name="serverStart" depends="init">
<wlserver dir="D:\bea8.1\user_projects\domains\myClusterDomain"
host="192.168.8.66"
port="7010"
username="system"
password="weblogic"
servername="myManagedServer"
domainname="myClusterDomain"
weblogichome="D:\bea8.1\weblogic81"
beahome="D:\bea8.1"
adminserverurl="http://192.168.8.66:7001"
classpath="D:\bea8.1\jdk141_05\jre\lib\rt.jar; D:\bea8.1\weblogic81\server\lib\weblogic.jar; D:\bea8.1\weblogic81\server\lib\webservices.jar"
action="start"
fork="true"
/>
</target>
</project>

The output that I get while running the ant task is,

Buildfile: build.xml

serverStart:
[wlserver] <Aug 6, 2004 9:38:13 AM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.0-b92 from Sun Microsystems Inc.>
[wlserver] <Aug 6, 2004 9:38:14 AM IST> <Info> <Management> <BEA-141140> <The managed server is going to contact the admin server at http://192.168.8.66:7001 to check if there exists a running admin
server at this URL.>
[wlserver] <Aug 6, 2004 9:38:15 AM IST> <Info> <Configuration Management> <BEA-150017> <This server is being started as a dependent managed server.>
[wlserver] <Aug 6, 2004 9:38:15 AM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284
[wlserver] WebLogic XMLX Module 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284 >
[wlserver] <Aug 6, 2004 9:38:15 AM IST> <Info> <Configuration Management> <BEA-150015> <Connecting to the administration server http://192.168.8.66:7001 to retrieve the initial configuration.>
[wlserver] <Aug 6, 2004 9:38:20 AM IST> <Notice> <Log Management> <BEA-170019> <The server log file D:\bea8.1\user_projects\domains\myClusterDomain\myManagedServer\myManagedServer.log is opened. All
server side log events will be written to this file.>
[wlserver] <Aug 6, 2004 9:38:50 AM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
[wlserver] <Aug 6, 2004 9:38:51 AM IST> <Notice> <WebLogicServer> <BEA-000328> <Starting WebLogic Managed Server "myManagedServer" for domain "myClusterDomain">
[wlserver] <Aug 6, 2004 9:39:02 AM IST> <Warning> <HTTP> <BEA-101296> <Unable to load the default compiler class "com.sun.tools.javac.Main". Using the default javac compiler to compile JSPs.>
[wlserver] <Aug 6, 2004 9:39:04 AM IST> <Notice> <Cluster> <BEA-000138> <Listening for announcements from cluster myCluster on 237.0.0.1:7020.>
[wlserver] <Aug 6, 2004 9:39:04 AM IST> <Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of myCluster.>
[wlserver] <Aug 6, 2004 9:39:40 AM IST> <Notice> <Cluster> <BEA-000102> <Joining cluster myCluster on 237.0.0.1:7020>
[wlserver] <Aug 6, 2004 9:39:40 AM IST> <Notice> <WebLogicServer> <BEA-000332> <Started WebLogic Managed Server "myManagedServer" for domain "myClusterDomain" running in Development Mode>
[wlserver] <Aug 6, 2004 9:39:40 AM IST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
[wlserver] <Aug 6, 2004 9:39:56 AM IST> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7010, ip address 192.168.8.66>

BUILD SUCCESSFUL
Total time: 1 minute 55 seconds
[wlserver] <Aug 6, 2004 9:40:15 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to SUSPENDING>
[wlserver] <Aug 6, 2004 9:40:15 AM IST> <Notice> <HTTP> <BEA-101278> <There are no active sessions. The Web service is ready to suspend.>
[wlserver] <Aug 6, 2004 9:40:15 AM IST> <Error> <Cluster> <BEA-000103> <Disconnecting from cluster myCluster>
[wlserver] <Aug 6, 2004 9:40:15 AM IST> <Alert> <WebLogicServer> <BEA-000228> <The disabling of server logins has been requested by <WLS Kernel>>
[wlserver] <Aug 6, 2004 9:40:15 AM IST> <Alert> <WebLogicServer> <BEA-000229> <Server logins have been disabled.>
[wlserver] <Aug 6, 2004 9:40:16 AM IST> <Notice> <WebLogicServer> <BEA-000353> <Thread "ListenThread.Default" stopped listening on port 7010, ip address 192.168.8.66>
[wlserver] <Aug 6, 2004 9:40:16 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
[wlserver] <Aug 6, 2004 9:40:16 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to SHUTTING_DOWN>
Press any key to continue . . .

Thanks in advance
20 years ago
Hi,
I m using crystal reports 10 in my Java web application. Is it possible to design the crystal report from the Java web page. My rqmt is that the user should be able to select the columns which he want to list and then generate the reports based on that. And from the web page user should be able to create custom columns like sum,avg etc. Is these facilities are provided by crystal report 10. Is there any other solution for this. Is it possible to port the report to my swing application.

Thanks in advance.
Jithesh
20 years ago
Hi,
Is it possible to call business objects 5.1 reports from Java application. Is there any API avaiable for that. Please let me know how to use it.

thanks in advance.
Jithesh
21 years ago
Hi,
I want to list out all the softwares installed in a machine with all the versions it has. Is there any possibility to read the registry content so that I can retrive the installed software details. If there is any, can I read these details in another machine in my network.

Thanks in advance.
Jithesh
21 years ago
I have written a sign certificate for the program and registered.
But still it generates the same exception.
This is what I used to sign the applet
--------------------------------------
jar cvf SignedApplet.jar *.class
keytool -genkey -alias signFiles -keystore susanstore -keypass kpi135 -dname "cn=jones" -storepass ab987c
jarsigner -keystore susanstore -storepass ab987c -keypass kpi135 -signedjar Smapplet.jar SignedApplet.jar signFiles
keytool -export -keystore susanstore -storepass ab987c -alias signFiles -file SusanJones.cer
Thanx in advance.
21 years ago
While connecting with JMS through an Applet, the following error is taking place. But when we connected through JAVA application its working fine. The code is attached.
javax.naming.NamingException: Couldn't connect to any host. Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnection.java:562)
at com.sun.corba.se.internal.iiop.BufferManagerWriteGrow.sendMessage(BufferManagerWriteGrow.java:55)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.finishSendingMessage(IIOPOutputStream.java:159)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStream.java:117)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:76)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:229)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:271)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1016)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:687)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1085)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:978)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2422)
at weblogic.corba.j2ee.naming.ORBHelper.getORBReferenceWithRetry(ORBHelper.java:476)
at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:455)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:97)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:42)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at AsyncTopicReceiver.initialise(AsyncTopicReceiver.java:35)
at AsyncTopicReceiver.main(AsyncTopicReceiver.java:112)
Caught an unexpected exceptionjavax.naming.NamingException: Couldn't connect to any host [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code : 203 completed: No]

The Code:
AppletEx.java
--------------

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.net.*;
import javax.swing.JTable;
import javax.swing.JScrollPane;
/*
<APPLET code="AppletEx.class" WIDTH="200" HEIGHT="300" >
</APPLET>
*/
public class AppletEx extends Applet {
public void init()
{
}
public void start()
{

AsyncTopicReceiver asyncTopicReceiver = new AsyncTopicReceiver();
System.out.println("AsyncTopicReceiver Started");
asyncTopicReceiver.startEx();
System.out.println("AsyncTopicReceiver Ends");
}
}
------------------------
AsyncTopicReceiver.java
------------------------
import javax.naming.Context;
import javax.naming.InitialContext;

import javax.jms.*;
import javax.jms.TopicConnectionFactory;
import javax.jms.TopicConnection;
import javax.jms.MessageListener;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
import javax.jms.Topic;
import javax.jms.Message;
import javax.jms.TextMessage;
import javax.jms.ObjectMessage;
import javax.jms.JMSException;
import java.util.Properties;
public class AsyncTopicReceiver implements MessageListener
{
TopicConnectionFactory topicConnectionFactory;
TopicConnection topicConnection;
TopicSession topicSession;
TopicSubscriber topicSubscriber;
Topic topic;
boolean finished = false;
String msg;
public void initialise(){
try{

System.out.println("Starting Main");
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, "t3://localhost:7001");
Context initial = new InitialContext(h);
topicConnectionFactory = (TopicConnectionFactory)initial.lookup("TestJMSConnectionFactory");
topicConnection = topicConnectionFactory.createTopicConnection();
topicSession = topicConnection.createTopicSession(false,javax.jms.TopicSession.AUTO_ACKNOWLEDGE);

topic = (Topic)initial.lookup("TestJMSTopic");
topicSubscriber = topicSession.createSubscriber(topic);
topicSubscriber.setMessageListener(this);
topicConnection.start();
}
catch (Exception e){
e.printStackTrace();
System.out.println("Caught an unexpected exception" + e);
}
}
public void onMessage(Message message){

System.out.println("This is onMessage method");
try{
if(message instanceof TextMessage){

TextMessage txtMsg = (TextMessage) message;
System.out.println("Message received : " + txtMsg.getText());
System.in.read();
}
if(message instanceof ObjectMessage){
ObjectMessage objMsg = (ObjectMessage) message;
System.out.println("Message received : " + objMsg.getObject());
msg= objMsg.getObject().toString();
System.in.read();
}
}
catch (Exception e){
e.printStackTrace();
System.out.println("Exception in onMessage" + e);
}
}
public void close() throws JMSException{
try{
topicSubscriber.close();
topicSession.close();
topicConnection.close();
}
catch(Exception e){
System.out.println("Exception " + e);
}
}
public void startEx(){
try{
AsyncTopicReceiver test = new AsyncTopicReceiver();
test.initialise();
System.out.println("ready to receive messages");
synchronized(test){
while (!test.finished){
try{
test.wait();
}
catch(InterruptedException ex){
}
}
test.close();
}
}
catch(JMSException ex){
System.out.println("JMSException : " + ex);
}
}
public static void main(String[] args){
try{
AsyncTopicReceiver test = new AsyncTopicReceiver();
test.initialise();
System.out.println("ready to receive messages");
synchronized(test){
while (!test.finished){
try{
test.wait();
}
catch(InterruptedException ex){
}
}
test.close();
}
}
catch(JMSException ex){
System.out.println("JMSException : " + ex);
}
}
/**
* @return
*/
public String getMsg() {
return msg;
}
/**
* @param string
*/
public void setMsg(String string) {
msg = string;
}
}
21 years ago
I need a scanner which works in the same way of a keyboard. Whatever I scan should be displayed on the currently focused application. The h/w vendor didnt give any APIs for connectivity with JAVA. And my requirement is specific to my application.
Please let me know how to access the scanner output.
Thanx
21 years ago
Hi friends,
How can I Interface a direcly connected bar code scanner with my java application. I want to read the barcode and get the result string to my application variable. Please help me, Urgent.
Thanx in advance,
21 years ago