I am trying to run a sign up page. The page is working properly and takes me to the login page when completed as it should. But when a field is left blank it is supposed to show an error message and keep them on the signup page, and it is not doing that. Sign Up Action:
I have a secured Struts application in WebSphere that uses FORM j_security_check for authentication.There is also a Post Logon "filter" defined which runs some code after a login is processed.The extract from web.xml showing the login configuration and filter is as follows:
If a user isn't logged into the application and they try to access one of the secured servlets, for example quotes.do, they are directed to the login page to enter their information.If they login successfully, they are then directed to quotes.do, rather than the default "welcome" page. Is there a setting in the web.xml or the post logon filter where I can force j_security_check to ALWAYS go to the default welcome page after a successful login?
I am trying Single signon to a different application from my application. i use redirect to open the new URL in a separate window. MY single signon works well. But i am losing the session values in my application.
Because of this when i close the new window and click on any link in my application, i am getting error sicne all application objects inside session are reset to null. how to retain the session values after Redirect.
I have write a SSO class for Single Sign on But i am getting one issue i am using JSF2 for my web application...here is my SSO class :
public class ApplicationSSO implements SSO { public String authenticateUser(RequestContext request) { UmUsersList user = (UmUsersList) request.getSessionContext().getAttribute("USER"); return user.getUmulEmailId(); }
[Code] .....
As you can see i have write below line
JSFUtils.redirectPage("../login/Login.xhtml");
It mean if User null it will redirect to Login page but it is not working. How to solve the issue i am end up with
An error has occurred.
For detailed error information, please see the HTML source code, and contact the forum Administrator.
Error while executing SSO actions: java.lang.NullPointerException
I have a JavaFX application with multiple scenes. In the application one scene plays the "master" role and the others are loaded according to actions . The issue i have is that i need to redirect all the PrintStream activity to a specific TextArea on the "master" scene, and by "all" i am meaning every PrintStream activity on every scene should be redirected to this specific TextArea . The code i am using on the "master" is :
Node node =primaryStage.getScene().lookup("#ShowInfo"); TextArea ta =(TextArea)node; FXConsole console = FXConsole.getInstance(ta); PrintStream ps = new PrintStream(console, true); System.setOut(ps); System.setErr(ps); System.out.println("Test");
I am using the Singleton pattern for the rest of the scenes :
I edited some lines from "[URL] ...." and saved it as html file; now if a friend want to do a search in Wikipedia for cats, the edited page should show up instead of original page.Is there a way to do this using java script.
I use the jsch libraries to create a SHH connection to a remote linux machine. In the next code, given from a tutorial of the JSCH creator, you can see it is implemented shell communication, it is a direct communication from a cmd window. You enter a command from the cmd window and you get aback the results in the cmd window.
How i can redirect the next two lines to jTextField1 and jTextField2. To give an example i want to sen the command from the jTextField1 and to get the results from the jTextField2.
I have a simple application ( only 2 JSPs files and one servlet the main components the whole webapp directory is attached ), I am using security constraint to redirect the user to HTTPS instead of HTTP when he submit from first page to the second page.
The problem is when the user submit the first page I get the error HTTP Status 405 - HTTP method GET is not supported by this URL although I m using only POST.
I have traced the firefox browser using httpfox and the result was the first HTTP request was done using POST correctly but after redirect the browser send GET.
This problem appears with FireFOx and IE but doesnot appear with google chrome.
i am doing a program that allow user to run and execute java language in this commandline.jsp, a servlet execute.java , jsp called get consoleout put.jsp to direct it to commandline.jsp...however there a compilation errors cos i could only get a line of string, and when i run loop in commandline.jsp it will not have the output. i could only run helloworld in it.therefore i need code that i can run multiple line in it. i suspect its the print stream error in execute.java
I have a JavaFX application with multiple scenes. In this applications one scene plays the role of "master" role and the others are loaded according to actions on the "master" scene(buttons,menu items)
The issue is that i need to redirect all the PrintStream activity to a specific TextArea on the "master" scene...
So everything that normally goes to the console to get redirected to that specific TextArea and this should be global,on every scene that is outputting something it should displayed on the specific TextArea on the "master" scene
The code i am using right now on the "master" scene is :
Node node =primaryStage.getScene().lookup("#ShowInfo"); TextArea ta =(TextArea)node; FXConsole console = FXConsole.getInstance(ta); PrintStream ps = new PrintStream(console, true); System.setOut(ps); System.setErr(ps); System.out.println("Test");
For the rest of the scenes i am using the Singleton Pattern to keep the pointing to the Specific TextArea
I have a scenario here where the JSF lifecycle is not getting invoked. I have a filter, whose responsibility is to filter only authorized requests.the code of the filter is given below
now in the else block i am filtering the unauthorized requests, and sending them back to the Login.xhtml page of the application.The problem i am encountering here is that, the images and styles associated with the page are not getting loaded, what i am thinking is that when i am using redirect or forward, the FacesServlet is not getting called, and it is directly going to Login page i.e. no Lifecyle is being called.how to Filter the requests and at same time not lose the styles?
I have a scenario here where the JSF lifecycle is not getting invoked. I have a filter, whose responsibility is to filter only authorized requests. The code of the filter is given below
Now in the else block I am filtering the unauthorized requests, and sending them back to the Login.xhtml page of the application.
The problem I am encountering here is that, the images and styles associated with the page are not getting loaded, what i am thinking is that when i am using redirect or forward, the FacesServlet is not getting called, and it is directly going to Login page i.e. no Lifecyle is being called.
Am I right on this?, if so how to Filter the requests and at same time not lose the style?
I am using a command button to post a form to backing bean method. At the end of that method I am attempting to redirect to an external site after setting various options in the response. I get an IllegalState Exception because of the redirect.
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendRedirectWithStatusCode (WebAppDispatcherContext.java:571) at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendRedirect (WebAppDispatcherContext.java:528) at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendRedirect(SRTServletResponse.java:1234) at com.sun.faces.context.ExternalContextImpl.redirect(ExternalContextImpl.java:426) at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:181)
here is the problem code from the backing bean method:
I have a java application in which when starting it a map is opened and a screen is captured. The capturing is in certain time interval. I want to enable the user to change the interval for the automatic capturing the map. I placed a text box in a JPanel. I want to pass the value which was entered in it to the html page which opens a Google map. Since I am new in java programming, I found that I can do it by using applets. I made an applet, and tried to call it in the html file. But now instead of opening the map file in a browser, it opens very quickly only black window.
Here is my applet:
package cege.ui; import java.applet.Applet; import java.io.IOException; import cege.ui.GuiMain; public class AppletTInterval extends Applet { private int TimeInterval=0;
[Code] .....
And the code in the html file where I try to call the applet, i.e. to pass the value which is returned by the applet is:
<script src= <!--"https://www.java.com/js/deployJava.js"></script> <script> var attributes = { id:'AppletTInterval', code:'cege.ui.AppletTInterval', width:1, height:1} ; var parameters = { jnlp_href: 'AppletTInterval.jnlp'} ;
[Code] .....
Can I use this way to pass a value from the java class file (from the JTextField into the html file?
I am taking Python this semester. Our teacher wants us to convert Python to JavaScript without really explaining how or/and expecting us to be familiar with it already.Python Program I have is pretty simple - it prompts you to enter your first and last name and end your DNA string, "CAG" repeats are counted by another function and the result is passed to function that identified weather you may have huntington's decease or not.
<body> <p>Enter First Name: <input type="text" size="25" id="firstname" value=""> <p>Enter Last Name: <input type="text" size="25" id="lastname" value=""> <p>Enter DNA: <input type="text" size="25" id="DNA" value="" > <p><button onclick="alertt(f,l,d,c,p)" style="background-color:pink"><b>PRESS TO FIND OUT RESULT</b></button></p> <script>
[code]...
When I run it there is an issue with countCAG and prediction functions :( I would run each one individually in JS console and I get Undefined, or InvalidString I read that I am supposed to use var in front of each variable, unlike in Python where you just assign variable a value without any add-ons in the front. But JS console seems to recognize both ways of assigning, however var smth=0 immediately evaluates to Undefined, and smth=0, gives me 0...
In my jsp, I have a table with some file paths with this I have to get the file and send it to server. I am able to read the file name, size and file as binary using files of javascript. But after that I need to send those files by storing in a byte array to servlet which I am not able to that. Is there any way I can send that. My requirement is I need to upload those files to server side.
I have a js code that finds out the timezone and then I am trying to "send" a value to a java backingbean. This code must be execute during the load of the xhtml page because in the process I use the "localTimeZone" bean.
I have a problem with a JavaScript application on Safari 6 and 7. The application updates a smartcard on a website, through a JAVA applet using JavaScript requests.
There is no problem with other browsers. On Safari , randomly (1 smartcard's update on 10), the javascript completely freezes in the middle of an update (on a random card).
After 5 minutes exactly, the javascript resumes, and 2 behaviors happens : the update wether continues or stops completely.
We investigated a lot about this problem , at network and memory level. We use a lot of "setTimeOut" function (approximately 1100 times), and read that setTimeOut could cause problems with memory management on Safari.