Moha Shaf

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

Recent posts by Moha Shaf

Gregg Bolinger wrote:
I had heard there was a lot of work going on regarding their tool suite. I just haven't had time to look into it. Glad to hear they are making some progress.



I downloaded Eclipse Helios and Galileo in both Ubuntu and Windows and tried updating Grails Plugin from SpringSource from Local Site and then from the repository directly. But it failed.
Then I installed STS version 2.5.2 in Ubuntu and tried installing Grails and Groovy Plugins exactly as described in the link http://grails.org/STS+Integration . I was able to update Grails but it failed because of conflicting dependency when I tried updating Grails and Groovy Support through STS.
All this because I am used to and like working in Eclipse. Now I am giving up and downloading NetBeans in Ubuntu.

Anybody had luck with Eclipse / STS + Groovy,Grails plug in? If yes can you please help me out.

I wonder why such installation guides are published on sites without proper testing.
13 years ago
I use RAD 7.5. When i do a static include of JSP, the variables declared / directives in the including JSPs are not resolved in the included JSPs.
I believe this is be taken care during translation but is there a way to prevent the IDE from complaining?
14 years ago
Thanks everyone for the inputs.


I did something like below and it works:

<html>

<head>
<scrfieldt type="text/javascrfieldt">
var globalvariable;

function onBodyLoad()
{

globalvariable = document.getElementById('test').cloneNode(true);

}

function UnMask(field){

var NewField=globalvariable.cloneNode(true);

if( field.type == 'password')
{
NewField.type = 'text';
NewField.value = field.value;
field.parentNode.replaceChild(NewField,field);

}

}

function Mask(field){


var NewField=globalvariable.cloneNode(true);

if(NewField.type == 'text')
{

NewField.type='password';
NewField.value = field.value;

field.parentNode.replaceChild(NewField,field);

}


}

</scrfieldt>
</head>

<body onLoad="onBodyLoad()">


<input id="test" type="text" onBlur = "Mask(this);" onFocus = "Unmask(this);" >
<input id="test1" type="text" >
</body>
</html>



a requirement for secret question field.
I have to implement a javascript function which would mask the content of a textbox (just as in a password field) when the cursor is
outside of the textbox but display the content when the cursor is within the textbox.
Any pointer to where such problem is solved or approach to implement this would be greatly appreciated.

Is there any forum / community which is popular and entirely devoted to javascript?

Thanks in advance.
Thank you very much. Doing as you suggested fixed the problem.

Mark E Hansen wrote:Can you please explain what you mean by "unable to create projects"?



When i try creating a new Dynamic Web project or a Java project using the New project Wizard, it hangs at that point ( i.e. i am not taken to the next step though I am able to cancel it) or sometimes it takes me to the next step in which i create a Target runtime for the project (Tomcat Installation Directory) and it hangs there.

Peter Johnson wrote:Are you always using sudo to run eclipse? If so, don't - you should run Eclipse with your account, not with root.



I tried both running with my User ID as well as root. it does not work either way.

Peter Johnson wrote:How did you install Eclipse? Via the Ubuntu software repository (apt-get or similar)? If so, I recommend that you instead download Eclipse from the Eclipse web site. Installation is simple - unpack the tar.gz file. I unpacked mine at /opt/eclipse.



I downloaded eclipse and unpacked into /opt/eclipse
I installed Eclipse Ganymede 3.4 on Ubuntu 9.10 Karmic. I have set my JAVA_HOME to point to Sun JDK at /usr/lib/jvm/java-6-sun .
I am able to launch Eclipse but unable to create projects (Simple Java / Web Applications) in it and unable to point to a Target Server. I tried starting the eclipse as root with increased heap size (sudo eclipse -vmargs -Xms512m -Xmx1024m) . Despite this I am unable to create new projects and start working in Eclipse on ubuntu.
When i do all this the memory taken by eclipse goes to 20% and CPU utilisation 2% . I still have 50 MB free memory and 2 GB swap space free.

Has anyone faced a problem similar to this? Would appreciate some help on this.

Thanks.
Hi All,
I am involved with a project which requires working with Business Rules. I am aware that there are Frameworks for working with Business Rules. Does any of the Rules Framework provide feature for semantic validation of rules ( example if two or more rules in a set of rules conflict with each other ) ?

Any pointers would be appreciated.
Could someone tell if there is any equivalent API in Xerces Java to Traverse through the XSD and access different segments of the XSD in a logical way.
Any help would be appreciated.

Thanks

I understand that an XSD can be parsed as a normal XML but I do not wish to do that. I believe that there is an object representation of the XSD which the Xerces uses to validate an XML. Is there a way to get handle to that object and get information of the schema in a logical way using its methods or some other way.
I found a sample for the C++ version of xerces but not able to find the source of this sample --> http://xerces.apache.org/xerces-c/scmprint-3.html
Also I do not wish to generate all possible XMLs conforming to schema, I only want to generate the XMLs with boundary values for all the constraints in the schema.

Any help/ pointer would be appreciated.

Thanks.
I need to parse a generic XSD and create sample XMLs conforming to the XSD. I am using Xerces for Java.

Does Xerces provide support for parsing XSD or do i have to parse it as a regular XML ? If theres support in Xerces, how do i do it?
Also could someone point to way/technique by which i can create all possible XMLs conforming to an XSD.

Thanks.
I am learning web applications design using Servlets/ JSP and Struts. Though there are good books like Head First Servlets and JSP, I feel that it would be great if there is any moderately complex java web application which is open source so that i can go through the code to appreciate the following :
The design of application (OO)
Usage of JNDI
Various features of Servlets and JSP and how they are put to use practically
Database design. JDBC, Data Access Layer
Usage of important design patterns
Messaging and JMS
XML and its usage

If someone could point out any such application which is moderately complex, open source and which is illustrative of the above features, it would be of great help to me. Or if there are any books that has a sample application with the above features that would be good as well.

Thanks in davance.
15 years ago
I tried out a modified code sample of HeadFirst Servlets and JSP Chapter three Beer Application. Below is the code snippet for the doPost method :

public void doPost (HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException

{
String c = request.getParameter("color");
BeerExpert be = new BeerExpert();
List result = be.getBrands(c);

response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println(" Beer Selection Advice
");
out.println("
try : New Tummy Mummy Beer");

request.setAttribute("styles", result);

RequestDispatcher view = request.getRequestDispatcher("result.jsp");
view.forward(request,response);

}


This code prints out the content of whats in the result.jsp and does not render the content that has been written to PrintWriter object got from the HttpServletResponse. Can someone explain this behavior?