Monday, July 2, 2007

Build with Clean Up

Problem: When I did hotdeployment of my web application module.. I noticed that my class files in the output folder are not getting updated / changed.And I am not sure y. Tried many different cases.. restart server, redeploy app.. etc.. nothing worked.. then I called Vipul.. who magically did just one thing..

yes CLEAN UP

how do you clean up :

From the menu in ur eclipse on the top.. project --> clean up--> select teh apt proj to clean up.

Now when u clean up the porj it will clear all ur .class files.. so you will have to build them again..

project --> build

Hot Deployment

Hot deploying a web application module in My Eclipse..

Rt click on the Web application folder -- > MY Eclipse --> add or remove deployment--> select server name --> you are done..

but when I deploy it for the first time.. and restart the server, it doesnt get started well, so will have to got server console

webapplications --> its where you would see the upload directory to upload the war file..

there select applications -->




other screen too..

Sunday, July 1, 2007

Finding J2EE Applications Context

What is context:

A word used to access your application in the URL you use

ex: http://localhost:7001/srgt/actions/dashboard.do

Here srgt is ur application's context

Now how do change the contxt to srgt-arc..?

In weblogic.xml file.. here is how the context root is:

srgt

also actions from my standalone are not working..

problem is : in my web.xm;/ I have both my struts configs defined in on parameter and mistakenly I have also added the new app ctxt as a new parameter..so all my new appls are working..but when I call existing actions from v1.0 grrr they are not working.. the resolution is not take off the other parameter and keep the two of them in..
here is the snippet..


action

org.apache.struts.action.ActionServlet


config
/WEB-INF/struts-config.xml,/WEB-INF/srgt-arc-struts-config.xml


debug
3

Wednesday, June 20, 2007

Making an EAR with Ant Build Script

I got an error saying that ejb compiler was unable to load or its something like bytecode found but unable to find class.

Was due to the fact that my class files(which I got from svn) are compled with a different version of java than the version I am using in my local

resolution: deleted all class files got from svn and made my ant comple and create them again.

Boom: it started working. then hit by another error.

I am getting all sorts of compilation errors for all references in ejb file to the class file.

so the resolution is to inlucde the jar file created from the reference proj in class path. Here is how it looks like:










and it compiled yay..!!!

Tuesday, June 12, 2007

Java Script popup window

window.open("/srgt-arc/actions/validateResult.do", "ValidationResult", "width=700,height=400,SCROLLBARS");

and also

function viewFacPrevGR(submitType,proposalElementId)
{
// alert("Inside dgPopUp");
document.forms[0].action.value=submitType;
window.open("about:blank", "viewFacPrevGR", "width=900,height=600,SCROLLBARS,dependent,resizable");
//window.open("about:blank", "sArcViewPreviouGR", "location=0,toolbar=0,menubar=0,resizable=1,modal=yes");

document.forms[0].target = "viewFacPrevGR";
document.forms[0].selectedProposalElementId.value = proposalElementId;
document.forms[0].submit();
}

pop up windows in JS

WOrking with popup windows in JS

function submitMenu(submitType,proposalElementId,clientGradingStatus,proposalType){

if(submitType == "viewFacPrevGR"){
dgPopUp(submitType,proposalElementId);
}
}


//POPUP FUNCTION

function dgPopUp(submitType,proposalElementId)
{
// alert("Inside dgPopUp");
document.forms[0].action.value=submitType;
window.open("about:blank", "viewFacPrevGR", "width=900,height=600,SCROLLBARS,dependent,resizable");
//window.open("about:blank", "sArcViewPreviouGR", "location=0,toolbar=0,menubar=0,resizable=1,modal=yes");

document.forms[0].target = "viewFacPrevGR";
document.forms[0].selectedProposalElementId.value = proposalElementId;
document.forms[0].submit();
}


window.open("/srgt-arc/actions/validateResult.do", "ValidationResult", "width=700,height=400,SCROLLBARS");

Itsy bitsy ava Script

Working with PopUp windows.. :)

hey first time I ever created a popup window today.. I am so happy .. yay!!!

here is the code to create one..

function submitMenu(submitType,proposalElementId,clientGradingStatus,proposalType){

if(submitType == "viewFacPrevGR"){
dgPopUp(submitType,proposalElementId);
}

}


function dgPopUp(submitType,proposalElementId)
{
alert("Inside dgPopUp");
document.forms[0].action.value=submitType;
window.open("about:blank", "viewFacPrevGR", "width=900,height=600,SCROLLBARS,dependent,resizable");

document.forms[0].target = "viewFacPrevGR";
document.forms[0].selectedProposalElementId.value = proposalElementId;
document.forms[0].submit();
}



or you can directly call it from your JS as:


window.open("/srgt-arc/actions/validateResult.do", "ValidationResult", "width=700,height=400,SCROLLBARS");


learning is fun :)