Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从jsp向postgres数据库插入数据_Jsp_Postgresql - Fatal编程技术网

从jsp向postgres数据库插入数据

从jsp向postgres数据库插入数据,jsp,postgresql,Jsp,Postgresql,嘿,我想在jsp中插入5个文本字段,比如ID、名称、时间、纬度和经度。用户在文本字段中输入详细信息,我给出一个提交按钮。单击submit后,我需要将用户输入的所有数据发送到数据库,该数据库有一个表,例如sample。 我该怎么办 这是我的example.jsp <label> Name </label > <input type="text" name="name" id="test1" > </input> <label> ID &l

嘿,我想在jsp中插入5个文本字段,比如ID、名称、时间、纬度和经度。用户在文本字段中输入详细信息,我给出一个提交按钮。单击submit后,我需要将用户输入的所有数据发送到数据库,该数据库有一个表,例如sample。 我该怎么办

这是我的example.jsp

<label> Name </label > <input type="text" name="name" id="test1" > </input>
<label> ID </label > <input type="text" name="id" id="test2" > </input>
<label> Time </label > <input type="text" name="time" id="test3" > </input>
<label> Latitude </label > <input type="text" name="latitude" id="test4" > </input>
<label> Longitude </label > <input type="text" name="longitude" id="test5" > </input>
<input type= " button" id="test6" value="submit" > </input>
名称
身份证件
时间
纬度
经度

通过将JAR文件作为引用库包含在应用程序中来使用。

您知道servlet吗?我知道,但我如何连接数据库?