最近使用jstl 的 forTokens 抛出一下异常 前提条件使用jboss容器,后来发现是因为
项目的jstl.jar和 jboss.war下的 jstl.jar 冲突所致
所以解决办法如下
%jbossroot%server\default\deploy\jboss-web.deployer下的jstl 覆盖到
你项目下的...\WEB-INF\lib的jstl
一下是异常信息 供参考
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 123 in the jsp file: /contactus.jsp
The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)
120: <span class="k_title" style="color:#333;">涓北涓笓缃戞牎鏈嶅姟鐑嚎锛 /span><br />
121: <p><c:if test="${(sysinfor.servcephone==null or ''==sysinfor.servcephone)==false}">
122:
123: <c:forTokens items="${sysinfor.servcephone}" delims="," var="phone" varStatus="state">
124: <c:out value="${phone}"/>
125: <c:if test="${state.index==0}">锛 4灏忔椂鏈嶅姟鐑嚎锛 /c:if> <br />
126: </c:forTokens>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
分享到:
相关推荐
// If the text is empty, show all rows. } String lowerCaseFilter = newValue.toLowerCase(); if (person.getFirstName().toLowerCase().indexOf(lowerCaseFilter) != -1) { return true; // Match first ...
AlertDialog dialog=new AlertDialog.Builder(this).setTitle("请选择服务项目").setItems(new String[]{"拨打电话","发送短信"}, new OnClickListener() { @Override public void onClick...
spinner.setItems("Ice Cream Sandwich", "Jelly Bean", "KitKat", "Lollipop", "Marshmallow"); spinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener() { @Override public void ...
channel.setItems(items); /**用WireFeedOutput对象输出rss文本**/ WireFeedOutput out = new WireFeedOutput(); String rssString = ""; try { rssString = out.outputString(channel); } catch ...
.setItems(new String[]{"选项1", "选项2"}, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { switch (which) { case 0: // 选项1的逻辑 ...
b.setTitle(R.string.title);//设置标题 b.setItems(//设置列表中的各个属性 R.array.msa, //字符串数组 new DialogInterface.OnClickListener() { //为列表设置OnClickListener监听器 @...
public PageBean<Coupon> findByCoupon(String couponName, String couponStartPeriod, String couponEndPeriod, Integer pageNum, Integer pageSize) { PageHelper.startPage(pageNum, pageSize); List<Coupon> ...
当需要让用户在多个选项中选择时,可以使用 `setItems` 或 `setMultiChoiceItems`。以下是一个使用 `setItems` 的示例: ```java import android.app.Activity; import android.app.AlertDialog; import android....
listView.getAdapter().setItems(items);设置是否重新排列达到更好的显示效果:// Setting to true will move items up and down to better use the space // Defaults to false. listView....
tableView.setItems(data); // 设置舞台 VBox vbox = new VBox(tableView); Scene scene = new Scene(vbox, 300, 250); primaryStage.setScene(scene); primaryStage.show(); } // 数据模型类 public ...
.setMessage("Here is the prompt message") .setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // User clicked OK, ...
public void setItems(Object items) { this.items = items; if (items instanceof Map, ?>) { Map, ?> map = (Map, ?>) items; collection = map.entrySet(); } else if (items instanceof Collection) { ...
对于需要用户选择的场景,Builder还提供了几个方法来创建不同类型的列表:setItems()用于简单的列表展示,setSingleChoiceItems()和setMultiChoiceItems()分别用于单选列表和多选列表。此外,还可以添加确认按钮...
var setItems = db.SetMembers("myset"); // SortedSet db.SortedSetAdd("mysortedset", new[] { new SortedSetEntry("item1", 1.0), new SortedSetEntry("item2", 2.0) }); var sortedSetItems = db....
builder.setItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Toast.makeText(context, "选择了: " + items[which], Toast.LENGTH_...
- 可以通过 `isSelected()` 方法获取选中状态。 - 示例代码: ```java CheckBox checkBox = new CheckBox("I agree to the terms and conditions."); checkBox.setSelected(true); ``` 5. **RadioButton** -...
.setItems(items.toArray(new String[0]), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // 用户点击的选项处理 } }) .show(); ``` 此外...
final String[] mItems = {"item0", "item1", "itme2", "item3", "itme4", "item5", "item6"}; AlertDialog.Builder builder = new AlertDialog.Builder(MainDialog.this); builder.setTitle(" 列表选择框 "); ...
builder.setItems(namesArray, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // 当用户点击某个项时,可以通过which参数获取对应的索引 User ...
//ascv.setItems(new String[]{"Test1aaaaa", "Test2", "Test3"}, new String[]{"1", "2", "3"}); ascv.setOnSelectionChangedListener(new OnSelectionChangedListener(){ @Override public void ...