I have an Eclipse workspace with a Web App (lets call it MyApp), and Tomcat server. When I run MyApp, Tomcat finds default.jsp and the opening page displays
http://localhost:8080/MyApp/Default.jsp?ActionPage=dashboard
- all fine and dandy.
This web page shows a menu. I choose a menu option from this page which should render
http://localhost:8080/MyApp/config.jsp,
and I get a HTTP Status 404 - /config.jsp ... ie it is looking for the page at
http://localhost:8080/config.jsp
and can't find it. Why is it looking there? It seems to have lost its context.
Netbeans doesn't exhibit this behaviour - it works fine. I just don't know where to look for a solution. Is it the Tomcat configuration or the Web App configuration?
All suggestions welcome!
When you choose your menu option, how is the URL called : simple form submit, ajax request?
In any case, you should have a URL looking like /MyApp/... in your code.
You can also check which URLs are effectively called by using a debug tool in your browser (ie Firebug for Firefox)
Another test to do if you use a Tomcat embedded in Eclipse is to start your Tomcat outside from your IDE, just to check the potential behaviour differences.
Related
I have a problem with my eclipse browser.
If i call the url of my sonarqube server (https://sonar) everthing works fine and eclipse shows me the page. But if i try to call the api (https://sonar/api/system/status) it returns with an error window which says that the page could not be opened. The same url worked for me in normal browsers.
Question
Does eclipse browser has problems with calling rest apis in general? Or is there something i could do to make it work?
System:
Windows 10 Pro (10.0.15063 Build 15063)
Eclipse Oxygen.1a Release (4.7.1a)
Ok, the problem seems to be in IE (which is used by eclipse in default). If i call the url in IE it wants to download the json answer. I changed some values in registry so IE just show me the json in browser directly. After that also eclipse could show me hte result without error.
Here is my ie_json.reg file i executed to change values in registry:
Windows Registry Editor Version 5.00;
; Tell IE 7,8,9,10 to open JSON documents in the browser on Windows XP and later.
; 25336920-03F9-11cf-8FD0-00AA00686F13 is the CLSID for the "Browse in place" .
;
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00
I found this solution at http://developers.de/blogs/holger_vetter/archive/2013/12/13/view-json-in-internet-explorer-7-11.aspx
After compiler my application in GWT Super Dev Mode,
Run: "http://localhost:9876/" in IE 11,
see the followings,
GWT Code Server
1.Drag these two bookmarklets to your browser's bookmark bar:
Dev Mode On Dev Mode Off
................
3.Click "Dev Mode On" to start development mode.
when click "Dev Mode On", is shows "Can't find any GWT Modules on this page."
Anyone knows how to debug GWT in IE 11?
Thanks!
Phase 1
Compile your project
Host it in some webserver
Test it by surfing to this URL
Now phase 2
Run as superdevmode
The SuperDevMode page opens
Surf to the website you created in phase 1
Click the DevMode on bookmarklet you placed in your bookmarks bar
The app should compile
You are missing point 2 (which you left out here):
Visit a web page that uses one of these modules: [your_module_name]
So probably you didn't define a startup url for your run configuration (which IDE are you using?). You can do this with the argument -startupUrl index.html. The index.html should be placed in your output war directory.
Depeding on the port you configured (default 8888) you have to visit this html-page (with the module.js injected of course) to start the compilation. An example url would be:
127.0.0.1:8888/index.html
To debug your application in IE 11 you have to set breakpoints with GWT.debugger() for the client code. For the server code you can use the breakpoints of your IDE. To use the clientside-breakpoints you have to open the Developer Tools of your browser (F12 in case of IE11). There go to debugger/sources or however the tab is called in the case of your browser and debug your application client code directly in the browser. Keep in mind to use source maps to map your Java source code to the generated JS file.
I am new to ColdFusion and just inherited a ColdFusion project that I need to debug.
So far I have installed ColdFusion 11, Eclipse (LUNA), and CFEclipse.
From CFEclipse I am able to import my project from a location like C:\Users\MyName\MyProjectName and view all the files. However, when I tried to add coldfusion server using the Servers tab, I don't see ColdFusion among the server types. I tried the "Download additional server adapters" link, no luck.
When I tried to use Browser View tab at the lower panel of the editor to see the index.cfm page, I get a "This program cannot display the webpage" error.
What have I missed? Please help.
According to the following article, I found and ran cfstart.bat under my /ColdFusion/cfusion/bin folder, and apache is up and running.
http://blog.adamcameron.me/2014/02/coldfusion-11-getting-started-server.html
I am still hazy about how the whole thing works, but at least now I can access to the ColdFusion Administrator at http://localhost/CFIDE/administrator/ with password 'admin' like the article suggests, and the 'Browser View' tab in CFEclipse is now working properly.
I am new to servlets and I am trying to debug one in Eclipse (Helios Service Release 2). I started with a Maven project and imported it to Eclipse, using the m2Eclipse plugin. I am using the Debug As -> Debug on Server option with JBoss 4.0 as my server. I can set a breakpoint and step through the code, until I need a domain name. I have not passed the servlet a URL, and it's not finding one. I have searched in Eclipse for a place to set the URL (perhaps as a parameter?) but I haven't found anywhere for that. The server is using localhost as host name and 8080 for the port. Am I supposed to refresh my browser, which is pointing to a test URL (http://localhost:8080/?site=www.testsite.com), at some point in the debugging process? Thanks in advance for any light you can shed on this conundrum.
I apologize for not being clearer. I think I figured it out. What I was looking for was somewhere to enter my URL request and I found it. After I started my debug session in Eclipse, I changed the perspective to Web Development and that gave me a browser window in the IDE for entering my URL. I then went back to the Debug perspective and the browser window stayed. So I could set my breakpoints and step through the code. I control the servlet through that browser window in Eclipse. There are still a few things that are a little murky about the whole process, but I think I can do this at will now. I hope this helps any other newbies in the same position.
Okay. I feel pretty stupid. I didn't need to enter the URL in Eclipse; I can use any browser and go back and forth between the debug session in Eclipse and the browser. Sorry if I wasted anyone's time.
I am new to tomcat and servlets and am trying to deploy my first web application in tomcat and the index.jsp page is showing up blank.
It works fine in eclipse. I have the web.xml for the application setup to have the index.jsp as the default page. I am able to run the application and debug it in eclipse but when I export it as a WAR file and deploy it in tomcat and try to access it through a regular browser I get a blank page.
What am I missing here? Any help is greatly appreciated.
Thanks,
- Vas
If you ever get a blank page, the most important information you (and we) need are:
The request URL.
The already sent data -if any- (webbrowser > View Source).
The response headers (Firebug? Webdeveloper Toolbar?).
The server logs (stdout, stderr, webapp).
This usually indicate a wrong URL (to be proven by 1), or an exception halfway a JSP page (to be proven by 2 and 4), or an internal server error without an error page (to be proven by 3 and 4).
You need to configure your server.xml file and declare a context for your web application. You can find the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
But a blank page is kind of weird, because I think if your web application wasn't deploy correctly, you will get a Http 404 error.