JDBC / JSP / MySQL代码可以在本地计算机上运行,​​但不能在服务器上运行 [英] JDBC/JSP/MySQL Code works from my local machine, but not on server

查看:93
本文介绍了JDBC / JSP / MySQL代码可以在本地计算机上运行,​​但不能在服务器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我一直在努力解决这个问题。


我有一个数据库,我从中需要在浏览器上阅读和显示一些数据。 (数据库设置为远程访问)。


我正在使用以下JSP / JDBC代码来执行此操作。

Hello All!

I''ve been struggling with this problem for a while.

I have a database from which I need to read and display some data on a browser. (The database is set up for remote access).

I''m using the following JSP/JDBC code to do that.

展开 | 选择 | Wrap | 行号

推荐答案


当我运行本地机器时,它运行正常。但是当我将它上传到服务器时,它并没有完成。我没有收到连接或未连接的消息。

When I run this of my local machine, it works fine. But when I upload it to a server, it doesn''t run through. I dont get either the connected or not connected message.



页面上显示的错误是什么。

What''s the error that''s displayed on the page.


没有显示错误。


好​​像忽略了部分代码。


谢谢对于回复!
There is no error displayed.

Its as if that part of the code is ignored.

Thank you for the reply!


您的网址不正确;您使用1)本地

计算机上的数据库和2)在服务器上测试了两次,其中URL再次表示本地计算机。

您需要通过在URL中运行您的

数据库服务的机器的主机名或IP地址。


亲切的问候,


Jos
Your URL is incorrect; you tested it twice with 1) a database on your local
machine and 2) on a server, where the URL denotes that local machine again.
You need to pass the hostname or IP address of the machine that runs your
database services in the URL too.

kind regards,

Jos


这篇关于JDBC / JSP / MySQL代码可以在本地计算机上运行,​​但不能在服务器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆