currently I'm starting to learn JavaEE. I created a simple donation-management-system which is secured by a login form. In the past I've just deployed my code to JBoss AS 7.1.1 and accessed it via browser.
However I would like to debug my application using Eclipse, as my application is starting to get bigger. I found several tutorials on the web and here at so but they didn't bring the expected result.
Here is what I did:
I edited the "standalone.conf.bat" and uncommented the line
set "JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
Then I created a new "Remote Java Application"-Configuration in Eclipse using localhost as hostname and 8787 as port.
Now my problem is as follows:
When I try to debug the application, the integrated eclipse browser opens up and show the expected web page, but when I enter the credentials and click "Login" I this exception:
HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
When I open my application in f.e. Firefox everything works fine.
Any ideas how to fix that? I'm already getting grey hair..
Edit: For the Login-Form I use the j_security_check
Could potentially be an issue with the integrated browser in Eclipse. Perhaps it's not handling session cookies properly.
To eliminate that possibility, I believe that in your general Eclipse preferences you can change the "Web Browser" setting to an external web browser (like Firefox) and see if you still have the issue.
Related
I have my apps running on java spring.
After i start the tomcat in eclipse, it runs well
But after certain minutes +- 30 minutes. It shows "This localhost page can’t be found
No webpage was found for the web address: http://localhost:8080/testadmin/Dashboard"
if i try http://localhost:8080/testadmin (it calls index.jsp), it shows the web. But function inside of index.jsp that call another controller function show 404 in the network console.
If i restart eclipse tomcat. The web runs well again. Is there any missing things on it ?
That type of problem I mostly found in eclipse so you can only clean the eclipse cache then it's gonna work fine but now I switched to IntelliJ now it's fine.
I have an application run on port 8082, config to working with spring security and keycloak (keycloak-springboot-2-adapter, spring-boot-starter-security, ..) And run the standalone keycloak server on port 8080.
Everything working well, but I meet an issue like that:
When I call a web-view by chrome to application 8082 without logging before, the request will be direct to login-page by keycloak manage (I'm using credentials), after I login success and go to the web-view have a button generate random string on the screen.
Stop here and then I restart the application on 8082 (server keycloak still running on 8080). when the application restarts success, I try to click on the button to make an AJAX request to application (api generate random string), but ajax response an error 401 Unauthorized and I don't see any error or exception on both application or keycloak server, just show on console of chrome like that
If I reload the page and click button again or open link error in console with new tab will return the random string I want. The important thing is I still logging and call another webview success.
If instead restart application 8082 I restart keycloak server and do everything as above again so the button still working well
I hope you can help me to find out the problem. Sorry for my English if you feel hard to understand my question because english isn't my native language.
Thank you very much for reading!
I'm starting Tomcat in Netbeans via the Services tab and see the output window as usual.
The problem is, I have a web application which needs a password to be typed in at runtime to be sent via console to the application.
I found this bug report (a bit old): https://netbeans.org/bugzilla/show_bug.cgi?id=47708&x=17&y=7 but i can't figure out whether it should be solved now or what to configure to get it run.
Any suggestions?
After running app-engine java project multiple times in eclipse, app-engine local server doesn't work. I am getting error "This webpage is not available" in Google chrome. But eclipse console says that "dev App Server is now running". But using dev_appserver.cmd works fine, it is too difficult when developing the project. Any ideas to solve this?
PS: rerunning is done after stopping the current execution of the server.
Choose 'Automatically select an unused port' in debug configuration.
Local server will start every time on different port, but it should solve your problem.
try to change the configuration by "run as" or "debug as" and check server and port no.
Also ensure that in Windows>>preference>>java>>jre a path to jdk (not jre) is selected.
Please provide more details of the problem if it is still there.
I am trying to set up a development environment to test Spring Portlet MVC for development of JSR 168 conforming portlets. I have the latest STS installed, which included Spring 2.5 and Eclipse (Catalina). This has been my environment to develop with Spring MVC, and that works fine using Apache as a local server for debugging.
I found some instructions on the Pluto portal site on using Pluto as a remote debugging host for portlets. I have implemented those instructions. I am sending Eclipse into debug mode by right clicking on one of the JSPs and going into "debug as". My problem is that when I log into Pluto, it is not sending me into debug mode. I am seeing the default Pluto page as opposed to my portlet. My portlet has not been installed onto Pluto, and the instructions do not seem to require the portlet to be installed.
To help, I have a screen shot at
http://www.ceruleaninc.ca/pluto_problem.jpg, showing the following:
Eclipse showing the remote debugging to localhost:8000
Tomcat showing the "Listening for transport dt_socket at address: 8000
The Catalina.bat jpda start command
The Pluto Portal screen after log in
Thanks much! I would welcome any advice on approaches to debugging portlets. I am not tied to pluto. There does seem to be a lack of detailed instructions on this topic.
When you run Pluto in debug mode, it is an external application, so you need to connect Eclipse to that external application rather than trying to debug a JSP.
The simplest way to do this is to select the project containing your sources, right-click and select Debug Configurations.... In the dialog's left-hand pane you should see an item called Remote Java application, double-click that and a new launch configuration should appear in the right-hand pane. Ensure the host and port is correct (it defaults to localhost, 8000) and it has a memorable name (it will default to the selected resource's name) and then click Debug.
remote debug configuration screenshot http://www.nakov.com/blog/wp-content/uploads/2008/08/eclipse-remote-debug-configuration.png
Eclipse will then attempt to attach the debugger to any process listening on the specified port.
On subsequent debug runs you can the simply select Run->[name of your external configuration].