Configuring JSP with J2EE server in eclipse - html

I'm having a specific configuration here. Trying to run JSP on J2EE preview server in a Dynamic Web Project in Eclipse. I'm aware through other answers that it can be made to work by changing to a Maven project, adding dependencies and/or by using a Tomcat server. But I want to know if there's anything to be re-configured to make it work with my configuration or is it simply that a J2EE preview server cannot handle .jsp ?
The error I get on console is:
No JSP support. Check that JSP jars are in lib/jsp and that JSP option has been specified to start.jar
And the error on browser is: `
HTTP ERROR 500 JSP support not configured

The Preview server doesn't support JSPs. You will have to use a full Servlet container like Apache Tomcat.

Related

Multiple error for creating html, JSP page and run server

I try to build a web application using java. The software that I have used Eclipse, mysql workbench, mysql connector/J, jdk-17.0.1. The environment variable that I have set are like
After that I followed How to Connect a MySQL Database to a Tomcat Server in Eclipse video tutorial upto 12:39 min to create a html and jsp page and run the server.
HTML page:
JSP page:
The error in the JSP page is Multiple annotations found at this line:
- The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java
Build Path
- Line breakpoint:P_reg.jsp [line: 1]
Also if I start the server as directed in the video lecture I got the error
I tried to solve this error seeing How do I import the javax.servlet / jakarta.servlet API in my Eclipse project? link.
I went through this link as well. But nothing worked.
How can I fix this problem?

jsp page is not loaded from html page

jsp page is not loaded instead the browser shows "com.mysql.jdbc.Driver". Database is connected to MySQL query browser from Netbeans 8.1. Why the page is not loaded? What is the remedy?
Some of the possible Issues :-
JDBC Driver i.e thin driver seems to be missing or not getting loaded while establishing the connection using JDBC Code in your JSP File.
Try to do the following as mentioned below:-
1.Add your mysql-connector-java-5.1.13-bin.jar in the LIB folder of your Java Project .
2.Right click in you project; click on "Clean and Build";
After that go to the netbeans project folder;
3.Try executing a Your Project and your JSP page should be able to connect to the DB using JDBC API Code.

How to deploy service based web apps on apache in linux?

So i have a Linux based Server having webmin
And i made an web application having some css/js and a html and i put that folder in var/www/html/TestAPI
installed Apache Web server and every other module recommended
My question is ,how do i make this run as a service,like when i ping the HTML inside this folder it opens up but doesnt load any js/css
How do i execute this when i just open TestAPI
eg:- http://11.11.11.11/TestAPI
(Tried using index.html)
I dont want to use php
Any Help would be deeply appreciated

How to use live edit with router script in PhpStorm

I setup live edit in PhpStorm and it works great. While implementing routing in my application, I configured PhpStorm to use a routing script using the Built-in Web Server run configuration. At this point, live edit stopped working because it seems to work only with the built-in webserver and not the PHP built-in web server. (Technically, it didn't stop working, rather there were two run configurations: live edit where the links returned a 404 and a routing configuration that doesn't have live edit.)
Is it possible to use both live edit and a routing script?
Does anyone have any workarounds to using live edit or similar functionality when working on an app that uses routing? I currently have a keymap (Alt-R) setup for Reload in Browser.
I'm using PhpStorm 10.0.2 (PhpStorm-143.790) on CentOS 7.
Note: I found two issues relating to live edit and routing but neither was helpful.
https://youtrack.jetbrains.com/issue/WEB-15762
https://youtrack.jetbrains.com/issue/WI-20824
Thanks
A hint in the 2nd URL above provided a suitable workaround. The key lies in the fact the link between the browser and PhpStorm is not tied to the URL; only the tab. To make this work, you need two run configurations:
A JavaScript Debug configuration for live edit. Make sure live edit is working.
A PHP Built-in Web Server configuration with the router script enabled.
Run the JavaScript Debug configuration and it will open a tab in Chrome linked to PhpStorm. Then start the PHP Built-in Web Server configuration and change the "live edit" tab to the URL for the built-in web server. Any changes will automatically refresh the tab using the PHP Built-in Web Server configuration which contains the router functionality.
This concept can also be applied to any functionality not supported by the built-in web server, like SSL. You just need a 2nd web server (built-in or external) and change the live edit tab to the 2nd URL.

image on apache or weblogic interview question

I was asked an interview question where how can I tell if an image is coming from apache or weblogic. How can I determine if it is not a part of the war file?
Thanks
Usually there is a specific rule within the web server for static images (URI based) so just by looking at the full URL of the image, you should be able to tell if it's from Apache or WebLogic.
If the Apache / WebLogic proxy-plugin configuration seems overly complex, you could just try loading the image and tail the access logs on the WebLogic application server to see if the image is being served from it.
If that doesn't work, you can enabled the debug logs for the WebLogic proxy-plugin on apache and monitor the details of all outgoing connections.
If the question meant, from the front-end i.e. browser, can you tell whether the image was served from Apache or Weblogic - it would be from the URL.
I'm assuming you don't have access to the weblogic logs in this case.
Check the source for the other URLs in the application, such as JSPs and JS files. Usually the JSPs will be prepended by the web-app context-root URL, and if the images are served from weblogic the same context-root will be present.
If they are served from Apache, then it is likely to have no context-root or a different context-root like /static