jhon masco

Ranch Hand
+ Follow
since May 13, 2010
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jhon masco

Hi Again Tim.
I solve the problem but in a diferent way.
First all: I used the netbeans wizard again but this time i just generate the
"Model class" (model in JPA and Netbeans is map the database table for be use with JPA), after that the
"Facade class" (it is something like DAO - the conection to the database)
Then i create by myself the controller (the wizard can do it but i decided do it myself) , then when i was building the view and i put the page in tabview i saw again the same mistakes Cannot find component for expression etc etc but this time i was able to manage these thanks you before explanations about forms. But...when finally the appllication run the app ,the tabview specifically the tab containing the page dont show me nothing!!! Thats was frustrating for me!
Tired of this situation i decided the make the Tabview with Bootstrap NavBar and put my page inside it, it work fine for me! Sincerely i would want be able to use primefaces tab although i am not sure if with bootstrap will be much better for me.

Thanks so much!
7 years ago
Hi Tim, Thanks for quick reply.
Yes i dont have many experience in JSF also i forget to say that i am using JPA. Netbeans have a wizard for JPA that generate "model" , "beans", "controllers" and views , i like use it because i save a lot of time.
Anyway i tried deleting the extra form from one of the view but nothing happen, also changed the actiolistener for action and the same thing.
I definitively will begin rewriting the code again but without wizard then i could to have more control and see specifically where the mistakes are.
Thank so much again.
7 years ago
HI, I create some views from entity classes with the netbeans wizard. I create these inside a folder structure like this:
(i am using Primefaces 5.2)

if open list.xhtml directly it work fine, but in terrytory.xhtml i have a tabview and i need to show list.xhtml inside one of the tabs but i getting this error :

Cannot find component for expression ":PaisCreateForm" referenced from territory:j_idt43:PaisListForm:datalist:createButton".

PaisCreatForm is the ID of my form in list.xhtml What is happening??? i tried putting territory.xhtml inside country folder but i get the same error.

Here my list.xhtml and territory.xhtml codes:



Please what is happening?
Thank you
7 years ago
Hi, I received this exception:

File "/home/jhon/PYTHON/pssh.py", line 6, in <module>
if not s.login ('', 'usuario', 'mi_password', auto_prompt_reset=False):
File "/usr/lib/python2.7/dist-packages/pexpect/pxssh.py", line 315, in login
raise ExceptionPxssh ('could not synchronize with original prompt')
pexpect.pxssh.ExceptionPxssh: could not synchronize with original prompt

The prompt that i need to set is ">" and "<" below an output example:

WO 63 03015103 AD-638 TIME 150128 0856 PAGE 1


I figure that there is a stranger character before the prompt but i am not sure if it relevant.
The documentation in the login meth section explain how set diferent prompt but its not working for me.

7 years ago
I am using pxssh for SSH connection in Python. [here the example http://www.pythonforbeginners.com/code-snippets-source-code/ssh-connection-with-python
It work fine for me when i connect to a remote Unix machine with prompt "$". My problem is that now i need to connect a server with different prompt, specifically it use 2 prompts. I want to send the prompt manually but nothing work.
I read the documentation and explain some ways to do something similar but its not working for me.! They don't have an example. For example in the next code:

I did the these changes:

What is wrong?
Also i modify the "pxssh.py" the lines:

In modified "original_prompt=r"[#$]" for "original_prompt=r"[><#$]"
self.UNIQUE_PROMPT = "\[PEXPECT\][\$\#] " for self.UNIQUE_PROMPT = "\[PEXPECT\][\<\>\$\#] "

7 years ago

Richard Tookey wrote:The only thing I can think of is that it should be
P.S. Having now revealed it maybe you should now change your password!

Thanks for the suggestion, but it did not work!
Thank you very much.

P.S. The password is not revealed , i did put "xxxx" for hide the other characters!
10 years ago

And what about the promptComplete message? Does the case matter? If so then you have shown "TRAFICO2" with both upper and lower case. Which is correct?

Inmediately after i send "2" then will appear the promptComplete variable (is to say, the prompt "c:\winnt\profiles\TRAFICO>" ). I had tested the word "trafico" with uppercase and lowercase. But nothing happen.
I can see the output in the netbeans console :

The promptComplete variable appear but never send the "dir" command after that. The promtp is waiting for command, but the command never is send.!
I hope you understand me.
10 years ago

Richard Tookey wrote:Sounds to me like "Please choose(1-5):" is not being sent by the server.

Hi Richard
Yes, the string "Please choose(1-5):" is working fine and i send option "2" then after that appear the prompt "c:\winnt\profiles\TRAFICO>" .
I had execute these command manually many times and these work fine in the server.
10 years ago
Hi everybody
I using apache common net library for telnet conexion. I am doing this example . This work fine for me when i use it in Linux systems but i trying to use in Windows NT and i am having problems.
The main problem i think is with the prompt. in my system the prompt is c:\winnt\profiles\TRAFICO>
i have in my code the next:

It work fine untill the "dir" command! Is to say, he stop when must execute DIR command in other words , it stop when appear the "c:\winnt\profiles\TRAFICO>" prompt.
Can someone tell me why not work??
Any question or extra detail please let me know.

10 years ago

shivang sarawagi wrote:Is there any way of copying a javascript variable value into a JSP variable ???

Can you explain a little What do you want to do??
May be there is other way for solve you problem.
10 years ago
Please read this article. May be it help you.

Good Luck
10 years ago
Try replacing in you Welcome.jsp the line:

10 years ago
Sorry fro delay.
Thanks all for the answers. You win!!!
From now I will try to use other ways(javascript, ajax, etc) to call servlets.

Thank you.
10 years ago
Thanks for all the replies.
Then i would conclude that is not bad use javascript or ajax for call servlet (redirect).
Yes Tim, you are right when you say than the most important is the web application design.
Particularly i dont like when i can see the code of any file (.js.jsp.php, etc) from of my web browser.!
That is this case. I can access to the javascript files from the browser. That is a design problem definitively.!

Thanks again.
10 years ago

Junilu Lacar wrote:There are many fine applications that use Ajax/Javascript to make calls to a Servlet. What in particular do find unappealing in the way your application is doing it? Can you post an example?

I just was curious. I guess is not good practice for security. Or i am wrong?
Here a line example:

where 'ProgramLauncher4' is a servlet.

Thanks for the reply.
10 years ago