Scenario:
OS: Linux Debian 11
Kernel: 5.1.21
Browser: Mozilla Firefox 102.8.0esr
IDE: Netbeans 16
JDK: JAVA SE 19
Tomcat 10 (configured in netbeans)
In this scenario servlets run fine on tomcat writing URL on address bar. Trying to open the same URL with Browser in Netbeans fails because Browser doesn't come-up.
I perform following steps:
Single click on left button upon tomcat icon, then a Drop list come down with my Servlets
Right click Button on a Servlet (or tomcat main page), a second drop-list come down
Selecting "open in a Browser"
Browser doesn't start
Message info come-uo "Browser cannot Run): This message appears below in IDE netbeans and after few second vanished
I have also tried to compile index.html and as usual browser is expected to run, but in my case no! compiling process return no message error.
Looking for IDE Browser Configuration (TOOL>OPTION>GENERAL>EDIT) give me this set-up:
External Browser
Others browsers showed in the image above doesn't work. More-over next image shows IDE DEFAULT BROWSER without configuration. I tried to edit blank field but data were not saved after OK button click:
IDE DEFAULT BROWSER
I tried to edit blank field but data were not saved after OK button click. I have to admit that this last trouble is my fault because I blanked them and now re-edit it again is impossible.
Related
I have this strange problem with img tags, my sample HTML code below
<html>
<input type='text' id='1111' MaxLength='10'/>
<img id='imageId001' title='hello' name='Done'/>
</html>
System.out.println(driver.findElement(By.id("imageId001")).getAttribute("title"));
Using Chrome Driver, getting output as hello.
However with IE 64/32 webdrivers,
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with id == imageId001(WARNING: The server did not provide any stacktrace information)
Whats wrong here???
Selenium WebDriver Version: 2.53.1.0
Internet Explorer : IE11
OS: Windows 7
JDK 1.7
After hours of effort spent, i figured out the cause. When i ran above code, i noticed a warning text displayed at bottom of IE as "Internet Explorer restricted this webpage from running scripts or ActiveX controls. " along with button "Allow blocked content". Since i have webdriverwait waiting for my img element, i clicked on this button and i saw that driver started printing the output which i was looking for (Same as chrome).
So i think driver object is not attached to browser if IE throws up some warnings like thsi. I solved it by disabling 2 options in Internet Options > Advanced Tab > Security section >
Allow active content from CDs to run on My Computer -> Set to Yes (ticked)
Allow active content to run in files on My Computer -> Set to Yes (ticked)
After this, my driver started identifying objects and works like chrome.
Note: Also i wanted to narrow down if registry setting played a role here as suggested by #Grasshopper. So I did same experiment in my colleague's machine (doesn't have registry settings for IE11) and this resolved for him as well. So registry setting does not play role here.
I followed the instruction on this page to create a simple maven web app:
However, when on step 11: Right click on project -> run as -> run on server, there is no "tomcat" and i got an error message: the selection did not contain any resources that can run on a server.
image
Also as the picture shown, I have successfully added tomcat in servers view and the app is also shown in the server list unfer tomcat 8.0. In the property->runtimes window, tomcat is in the list and checked. but 'make it primary" is disabled and in the "runtime composition" panel the message is <no runtime selected>.
localhost:8080/mavenWebApp got 404 error.
What could be the problem?
I am using SWT 3.7 to create an RCP application. Windows is my OS and IE is set as the default SWT browser. I want to change the default browser from IE to Mozilla. I've read a few articles and learned that by adding arguments to the eclipse.ini file (-Dorg.eclipse.swt.browser.DefaultType=mozilla) one can set the default SWT browser.
But after adding it to vm arguments (because when adding to the .ini file it is not doing anything), I get the error below:
org.eclipse.swt.SWTError: No more handles [Could not detect registered XULRunner to use]
at org.eclipse.swt.SWT.error(SWT.java:4308)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:683)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)
The code is breaking on line:
Browser browser = new Browser(parent, SWT.None);
I have already downloaded xulrunner, ran the register command, checked in registry (it's there), added -Dorg.eclipse.swt.browser.XULRunnerPath="C://Program Files (x86)//Mozilla XULRunner//1.9.1//xulrunner" to vmargs but I still get the same error.
Can anyone help me on this issue?
Found this in the eclipse forum:
"Found the problem. I needed to do xulrunner --register-global as administrator. Since there is no difference in the xulrunner output, the only way to tell if the registration occurred is to look in HKLM\SOFTWARE\Wow6432Node\mozilla.org\GRE"
http://www.eclipse.org/forums/index.php/mv/msg/199032/#msg_634819
Well I was trying to follow the first cup tutorial, but I'm stuck with a Glassfish error.
I'm supposed to this:
1.2.4 Getting the Latest Updates to the Tutorial
Check for any updates to this tutorial by using the Update Center
included with the Java EE 7 SDK.
1.2.4.1 Update the Tutorial Through the Update Center Open the Update Center and check for any updates to the tutorial.
In NetBeans IDE, select the Services tab and expand the Servers node.
Right-click the GlassFish Server instance and select View Update
Center to display the Update Tool. In the tree, select Available
Updates to display a list of updated packages. Look for updates to the
First Cup for Java EE 7 (javaee-firstcup-tutorial) package. If there
is an updated version of First Cup, select First Cup 7.0 for Java EE 7
(javaee-firstcup-tutorial) and click Install.
The thing is, when I try to open the Update Center, this is what I get:
The software needed for this command (updatetool) is not installed.
If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:658)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at com.sun.pkg.client.Image.checkRepositoryConnection(Image.java:1225)
at com.sun.pkg.client.Catalog.refresh(Catalog.java:132)
at com.sun.pkg.client.Image.refreshCatalogs(Image.java:1627)
at com.sun.pkg.client.Client.main(Client.java:109)
When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:
http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2
Once installation is complete you may re-run this command.
Would you like to install Update Tool now (y/n):
C:\Program Files\glassfish-4.0>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dimage.path="C:\Program Files\glassfish-4.0\bin\\.." -jar "C:\Program Files\glassfish-4.0\bin\\..\pkg/lib/pkg-client.jar" refresh
C:\Program Files\glassfish-4.0>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dimage.path="C:\Program Files\glassfish-4.0\bin\\.." -jar "C:\Program Files\glassfish-4.0\bin\\..\pkg/lib/pkg-bootstrap.jar" "C:\Users\Fabio\AppData\Local\Temp\pkg-bootstrap11073.props"
Proxy: Using system proxy settings.
Input/output error: Connection reset
Could not download application packages. This could be because:
- a proxy server is needed to access the internet. Please ensure that
the system proxy server settings in your Internet Options control panel
(under Connections:LAN Settings) are correct, or set the HTTP_PROXY
environment variable to the full URL of the proxy server.
- the package server or network connection is slow.
If you are getting time out errors you can try setting the
PKG_CLIENT_CONNECT_TIMEOUT and PKG_CLIENT_READ_TIMEOUT
environment variables and try again. For example to increase
the timeouts to 300 seconds set them to 300
- the package server is down or otherwise inaccessible or it is
generating invalid data. Please contact the provider of the package
server.
This may be a problem with the slow GlassFish update server. Here are some steps you can try:
You should retry first to see if the error occurs again. You can start a cmd, navigate to the \glassfish\bin directory and run updatetool.bat so you can see the output which is printed after the one you posted.
If you are behind a proxy you should make sure it is setup correctly in the system settings.
You can also try to install the updates through the GlassFish admin console. Start your GlassFish instance and navigate to http:\\localhost:4848. On the bottom of the left menu click on Updatetool. There you can choose and install the desired updates.
Another option is to change the timeouts of the pkg tool. To set the timeout to 300 seconds do the following in a cmd (on Windows):
set PKG_CLIENT_CONNECT_TIMEOUT=300
set PKG_CLIENT_READ_TIMEOUT=300
Your last (ok, there may be other ones) option is to just skip the update process and do the tutorial with the current version. It should work anyway and I can see in my GlassFish update center that there is only an update for the tutorial documentation at the moment.
Just set this line into cmd (like administrator):
set PKG_CLIENT_CONNECT_TIMEOUT=300
set PKG_CLIENT_READ_TIMEOUT=300
Maybe the firstcup example is already existed in the install directory. Try to find it in the directory_install_glassfish/glassfish4/docs. The mine contain even javaee-tutorial and firstcup. For the next part, you maybe continue after guide in firstcup.pdf with the part of : Creating Your First Java by create archetype of java project. Good luck !
For the lazy of you the pkg Unix command is:
export PKG_CLIENT_CONNECT_TIMEOUT=300
export PKG_CLIENT_READ_TIMEOUT=300
After being stuck for a while on the installation of GlassFish update server from Netbeans (in my company network, proxy issues), I got it this way:
- Advanced System Settings > System Properties window > Advanced tab, New System Variable: http_proxy, http://username:password#your_proxy:your_port
- Netbeans (running as admin just in case), Services > Server > Glassfish Server > Right button View Domain Update Center, then install
It worked for me, Hope it helps!
This question already has answers here:
Tomcat started in Eclipse but unable to connect to http://localhost:8085/
(6 answers)
Closed 9 years ago.
i am trying to create application in struts2 so i have downloaded apache-tomcat7.0,eclipse juno and i am trying to use this server in eclipse juno , i have configure it properly in eclipse and it is starting in eclipse fine ,but when i am typing localhost:8080 in my web browser after my server started in eclipse then it is me showing error
HTTP Status 404 - /
type Status report
message /
description The requested resource is not available.
Apache Tomcat/7.0.35
You have to select the correct server location. Please follow bellow steps.
Select Window => Show view => Servers
Then add the server if you want. If already added skip this step
Double click on the server which you have added
Then the Server overview will open. From there click on Server Locations.
Then select second option(Use Tomcat Installation).
Then save and restart the server.
Now you should be able to access your server.
Note: By default selecttion is Use workspace meta data. This does not modify the tomcat installation. But with this selection you can run the web application in the eclipse internal browser.