我正在开发JSF应用程序并将其部署到Glassfish中。 这是获取“ jdbc”连接的代码:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: MyButton(),
),
),
);
}
}
class MyButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DecoratedBox(
decoration:
ShapeDecoration(shape: CircleBorder(), color: Colors.pinkAccent),
child: Theme(
data: Theme.of(context).copyWith(
buttonTheme: ButtonTheme.of(context).copyWith(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap)),
child: OutlineButton(
shape: CircleBorder(),
child: Text('A'),
onPressed: () => {},
),
),
);
}
}
是否可以获取项目“ alternatedocroot_1”的“值/目录”? 这是glassfish-web.xml的内容:
Context initCtx = new InitialContext();
dataSource = (DataSource) initCtx.lookup("jdbc/hr-demo");
非常感谢你, VinhCC